* SPAM: [RFC cluster/docs/ifupdown2/manager/network/proxmox{-ve-rs,-ebpf,-perl-rs} v2 00/27] sdn: add microsegmentation support
@ 2026-07-09 9:18 6% Hannes Laimer
2026-10-27 8:57 2% ` superseded: " Hannes Laimer
0 siblings, 1 reply; 25+ results
From: Hannes Laimer @ 2026-07-09 9:18 UTC (permalink / raw)
To: pve-devel
This adds support for microsegmentation using eBPF programs attached to
interfaces. Mostly the tap/veth interfaces on the guests directly.
# Overview
Each guest interface is assigned a *set* of groups. Rather than a hierarchy,
group membership is treated as a signature. The agent compiles each interface's
group set into a single per-NIC *identity*, and policies are rules between
groups, matched against those sets with predicates.
A rule is a `src` predicate and a `dst` predicate plus a verdict and a
priority, where a predicate is a match kind over a list of groups:
- any{...} the interface shares at least one of the listed groups
- all{...} the interface has all of the listed groups
- exact{...} the interface's groups are exactly the listed set
For a packet, the `src` predicate is evaluated against the sender's set and the
`dst` predicate against the receiver's. Among the rules that fire the highest
`prio` wins, a conflicting tie (with different verdicts) denies, and if no rule
fires the packet is denied (default-deny). For example, with the groups
web/app/db/prod, specific allows punched through a broad deny:
- any{web} -> any{app} : allow prio 10
- any{app} -> any{db} : allow prio 10
- all{prod} -> all{prod} : allow prio 10 # these three carve out east-west...
- any{web,app,db} -> any{web,app,db} : deny prio 5 # ...through a broad tier-to-tier deny
(the last is technically not needed cause the default is deny, in a larger
context having this explicitly can be necesarry though)
The allows above are one-directional. Rules are stateless and per-packet, there
is no connection tracking. The reply needs its own allow, so for TCP between web
and app both any{web} -> any{app} and any{app} -> any{web} have to be allowed.
Groups land on an interface either directly (a guest matcher: a `vmid`,
optionally a single `iface`), by tag (a tag matcher: every guest carrying the
named tags, e.g. `prod`/`staging`/`web`), or by name (a regex matcher: every
guest whose name matches a regular expression). Assignments are additive, an
interface's set is the union of every assignment that resolves to it, so the
matchers compose.
`untagged` is a reserved built-in group (mark 0) for traffic that arrives
unstamped (gateways, DHCP/ARP, cross-node frames without a tag). It can be
named in a predicate and composed with real groups (e.g. `any{untagged, web}`),
but it is not assignable.
Enforcement happens on the receiving side, cause that's where we for sure know both
- where the packet is from
- and, its destination (us)
# config and API
The config is a single section-config, `sdn/microseg.cfg`. It holds these
object types, keyed by section id:
- group, a numeric `mark` (auto-assigned if omitted) and an optional comment
- rule, a `src`/`dst` predicate pair (`*_match` is any/all/exact over a group list),
a `prio` and `allow`
- guestassignment, binds a guest's NIC(s) (`vmid`, optional `iface`) to a group set
- tagassignment, binds the NICs of every guest matching `tags` (by `tag_match`) to a
group set, expanded against the live guest inventory on render
- regexassignment, same but for every guest whose name matches a regular
expression
- bridge, marks a bridge-facing interface as an SRv6 carrier (no UI yet)
The API exposes endpoints under
`/cluster/sdn/microseg/{group,rule,assignment,bridge}`, guarded by SDN.Audit for reads
and SDN.Allocate for writes. The assignment endpoint discriminates the two matcher
kinds on a `type` property (like the fabric `protocol`).
Rule and tag/regex-assignment ids are derived from their contents (an FNV-1a hash),
guest assignments from `vm{vmid}i{iface}`, groups and bridges take a chosen id. On
commit the config is rendered into `.running-config`, which is what the agent reads.
Rendering resolves each interface's group set to a wire identity and expands the
dynamic matchers against the inventory.
# identity
An identity is not one id per group set but one id per *signature*. Two
interfaces share an id when every rule predicate fires the same way on both, so
no rule can tell them apart. The identities are the classes of that partition,
each named by a 16-bit id, and that id is what rides on the wire.
Editing rules reshapes the partition. A new predicate that separates two sets
which used to look alike *splits* their class in two, and dropping the
predicate that told two classes apart *merges* them back into one. On a split
the subclass that still carries the old representative keeps the id and the
other gets a fresh one, on a merge the surviving class keeps its id and the
fused-away ones retire.
New ids come fresh-first from a counter. A retired id is not reused right away,
it sits in a time quarantine long enough that no packet stamped under its old
meaning can still be in flight. Only once the fresh space is exhausted does
allocation fall back to reusing a retired id whose quarantine has passed, so
config churn alone cannot exhaust the 16-bit id space. Actually running out
would take more than 65534 identities the policies can tell apart. So it
doesn't scale with count of group combinations in use, but with the distinct
semantic meaning they carry.
# skb->mark
Every packet in the kernel lives in a `sk_buff` struct, which has a 32-bit
`mark` field you can read and write while the packet moves through the kernel.
Nothing else in our SDN stack touches `mark` today, so microseg has it to
itself. Worth keeping in mind if that ever changes. For now we only use the
lower 16 bits, to carry the interface's identity (mark 0 is reserved for
unstamped traffic), so up to 65535 identities.
The catch is `mark` only lives as long as the packet stays in the kernel, and
sooner or later it leaves. To carry the identity between hosts we have to put it
on the wire itself. For that we support two carriers:
- VXLAN-GBP, the 16-bit GBP field on the VXLAN encapsulation
- SRv6, the 16-bit Tag field on the SRH
The kernel already moves `mark` in and out of the VXLAN-GBP field for us (found
that out way too late :P). For SRv6 we do it ourselves with a small eBPF program.
# eBPF
Both tagging (setting `mark`) and enforcement happen in an eBPF program
directly attached to the guest's interface. The programs themselves read and
write to/from two maps:
- tap_to_group, the identity to stamp for a given interface
- rules, a map of (src_id, dst_id) -> action, where src is the `mark` the
packet carries and dst is our own interface's identity
Specifically, on ingress we set the mark, and on egress we enforce.
# Implementation
We have an `agent` that reads the running sdn config, and applies that state to
the kernel. The binary is stateless and one-shot, not a long running daemon. It
runs on SDN apply, on tap_plug of a guest interface, and on boot after
pve-sdn-commit but before guests start. Those triggers cover every situation
where we have to touch kernel state.
It compiles the config into what the data plane needs. It folds each
interface's group set into a wire identity (a registry kept stable across
renders so identities agree across hosts, allocated as described above), and
folds the rules into the `(src_id, dst_id)` action map by priority (highest
wins, conflicting ties deny).
It keeps track of what is currently loaded in the kernel with two files under
`/run/proxmox-ebpf`. One keeping track of the bpf program that was compiled
into the binary, and one for keeping track of changes to the data structures
the bpf program accesses. The distinction is useful cause for only a program
change we can swap the currently attached program with the updated one
atomically. In case the data structure (the maps) changed there is no other way
than to tear-down all the current state and repopulate the maps and re-attach
the programs. Swapping out the maps first would have old programs interact with
a new data schema, and swapping the programs first will lead to new programs
accessing an old data schema. Either way, not good, so we wipe the state in
that case and re-build it. So, in case we change the structure of the data our
bpf programs access, there will be a bunch of ms where the configured
segmentation is not enforced. But that is the only scenario where that can
happen.
## aya, aya-ebpf
Aya is a rust lib that helps with working with BPF more easily. It has both a
userspace part (`aya`) and a part (`aya-ebpf`) that compiles to bpf. I chose to
only use the userspace part, and use C for the BPF programs themselves. The
reasons were:
- we don't have `aya-ebpf` packaged
- `aya-ebpf` *requires* nightly toolchain to compile
- the bpf programs are very small, in case this should change at some point we
can reconsider. Also, it doesn't matter what produces the .o file, so this
could be swapped in really easily if we decided to
So we compile the bpf program written in C to a .o targeting bpf using clang
and include it when compiling the agent binary.
## SRv6
Besides VXLAN-GBP, the identity can also ride in the 16-bit Tag field of an SRv6
SRH. The kernel already does this move for VXLAN-GBP but not for SRv6, so this
adds a small eBPF program that writes the identity into the SRH on egress and
reads it back on ingress. The `bridge` object marks the bridge-facing interface
it runs on.
This is only the tag carrier, not an SRv6 transport. Our SDN stack has no SRv6
zone yet, so there is nothing configured to route it over, and there is no UI.
If SDN grows an SRv6 transport later (a small L3, EVPN-lite style option), the
carrier is already in place.
It is packaged as a droppable tail. The carrier bridge section (proxmox-ve-config),
the bridge API (pve-network) and the bridge subsystem (proxmox-ebpf) are each the
last patch of their repo's series, so SRv6 can be deferred without touching the rest.
# enabling VXLAN-GBP
The kernel only moves the mark into the GBP field if the vxlan device was
created with the GBP flag set, and it's create-only, the kernel won't
toggle it on a running device. ifupdown2 had no attribute for this, so
this series includes a small ifupdown2 patch adding `vxlan-gbp`, which
threads the flag through to the netlink/iproute2 create path.
# testing
I have put pre-built packages on sani, these include ifupdown2 with the patch
# building
1. proxmox-ve-rs (install)
2. proxmox-ebpf
3. pve-cluster (install)
4. proxmox-perl-rs (install)
5. pve-network
6. pve-manager
# notes
* everything eBPF related did not change since v1, this v2 only really changes identity semantics
* using GENEVE would also be an option, but with this current approach we gain
a lot of flexibility. Expanding predicate logic, or having not just
allow/deny but also match ports or alike is possible without touching the
underlying identity system. (limiting the per-packet overhead to just 16
bits is also good I'd argue)
* the enforement mechanism is not set in stone, weather this is eBPF or maybe
nftables with a map we populate as shortly discussed with @Stefan. The
current approach plays nicely with both since it conveys identity through
`skb->mark` that nft can access as well
* I did not send the first commit for `proxmox-ebpf` since it contains a
`vmlinux.h` which is rather large but is needed for compiling. The commit is in
my staff repo.
# changelog
v2:
- core model reworked: each interface now holds a *set* of groups compiled
into a per-NIC wire identity, replacing the single-group parent/child tree
- rules gained explicit `src`/`dst` predicates (any/all/exact) and a `prio`,
replacing the implicit tree-distance ordering
- `untagged` is now a nameable built-in group (mark 0)
- assignments are additive: a NIC's set is the union of all that resolve to it
- added tag-matcher and name-regex assignments
- rule and dynamic-assignment ids are now generated
- identity allocation is fresh-first with quarantined reclamation, so churn
cannot exhaust the id space
- split the SRv6 carrier support into droppable tail patches
- updated docs
- updated cover-letter
proxmox-ve-rs:
Hannes Laimer (5):
ve-config: sdn: add microseg signature-identity engine
ve-config: sdn: add microseg config types
ve-config: sdn: microseg: add tag matcher
ve-config: sdn: microseg: add name regex matcher
ve-config: sdn: microseg: add carrier bridge section
proxmox-ve-config/src/sdn/config.rs | 9 +-
.../src/sdn/microseg/identity.rs | 624 +++++
proxmox-ve-config/src/sdn/microseg/mod.rs | 2349 +++++++++++++++++
proxmox-ve-config/src/sdn/mod.rs | 1 +
4 files changed, 2982 insertions(+), 1 deletion(-)
create mode 100644 proxmox-ve-config/src/sdn/microseg/identity.rs
create mode 100644 proxmox-ve-config/src/sdn/microseg/mod.rs
proxmox-ebpf:
Hannes Laimer (3):
agent: add userspace coordinator and stateless policy subsystem
bpf: add bridge subsystem
debian: add packaging and boot-time oneshot unit
Makefile | 66 +++++++
debian/changelog | 5 +
debian/control | 35 ++++
debian/copyright | 18 ++
debian/proxmox-ebpf.install | 1 +
debian/proxmox-ebpf.postrm | 11 ++
debian/proxmox-ebpf.prerm | 12 ++
debian/proxmox-ebpf.service | 15 ++
debian/rules | 33 ++++
debian/source/format | 1 +
include/mark.h | 30 +++
src/agent.rs | 99 ++++++++++
src/bridge/bpf/srv6.bpf.c | 76 +++++++
src/bridge/mod.rs | 76 +++++++
src/main.rs | 69 +++++++
src/policy/bpf/tap.bpf.c | 68 +++++++
src/policy/bpf/types.h | 23 +++
src/policy/mod.rs | 268 +++++++++++++++++++++++++
src/policy/types.rs | 45 +++++
src/running_config.rs | 38 ++++
src/state.rs | 149 ++++++++++++++
src/subsystem.rs | 385 ++++++++++++++++++++++++++++++++++++
src/tc.rs | 152 ++++++++++++++
23 files changed, 1675 insertions(+)
create mode 100644 Makefile
create mode 100644 debian/changelog
create mode 100644 debian/control
create mode 100644 debian/copyright
create mode 100644 debian/proxmox-ebpf.install
create mode 100755 debian/proxmox-ebpf.postrm
create mode 100755 debian/proxmox-ebpf.prerm
create mode 100644 debian/proxmox-ebpf.service
create mode 100755 debian/rules
create mode 100644 debian/source/format
create mode 100644 include/mark.h
create mode 100644 src/agent.rs
create mode 100644 src/bridge/bpf/srv6.bpf.c
create mode 100644 src/bridge/mod.rs
create mode 100644 src/main.rs
create mode 100644 src/policy/bpf/tap.bpf.c
create mode 100644 src/policy/bpf/types.h
create mode 100644 src/policy/mod.rs
create mode 100644 src/policy/types.rs
create mode 100644 src/running_config.rs
create mode 100644 src/state.rs
create mode 100644 src/subsystem.rs
create mode 100644 src/tc.rs
pve-cluster:
Hannes Laimer (1):
cfs: add 'sdn/microseg.cfg' to observed files
src/PVE/Cluster.pm | 1 +
1 file changed, 1 insertion(+)
proxmox-perl-rs:
Hannes Laimer (1):
pve-rs: sdn: add microseg config binding
pve-rs/Makefile | 1 +
pve-rs/src/bindings/sdn/microseg.rs | 235 ++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
3 files changed, 237 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/microseg.rs
ifupdown2:
Hannes Laimer (1):
d/patches: add support for VXLAN-GBP flag
...addons-vxlan-add-vxlan-gbp-attribute.patch | 228 ++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 229 insertions(+)
create mode 100644 debian/patches/pve/0016-addons-vxlan-add-vxlan-gbp-attribute.patch
pve-network:
Hannes Laimer (8):
sdn: microseg: add config, API and guest inventory
sdn: dry-run: surface pending microseg changes
sdn: zones: trigger microseg apply on tap_plug
sdn: zones: add vxlan-gbp option to vxlan and evpn zones
evpn: disable vxlan-learning on create if GBP is enabled
sdn: microseg: add tag matcher
sdn: microseg: add name regex matcher
sdn: microseg: add carrier bridge API
src/PVE/API2/Network/SDN.pm | 31 ++
src/PVE/API2/Network/SDN/Makefile | 2 +
src/PVE/API2/Network/SDN/Microseg.pm | 204 +++++++
.../API2/Network/SDN/Microseg/Assignment.pm | 185 +++++++
src/PVE/API2/Network/SDN/Microseg/Bridge.pm | 179 ++++++
src/PVE/API2/Network/SDN/Microseg/Group.pm | 179 ++++++
src/PVE/API2/Network/SDN/Microseg/Makefile | 8 +
src/PVE/API2/Network/SDN/Microseg/Rule.pm | 180 +++++++
src/PVE/Network/SDN.pm | 37 ++
src/PVE/Network/SDN/Makefile | 1 +
src/PVE/Network/SDN/Microseg.pm | 509 ++++++++++++++++++
src/PVE/Network/SDN/Zones.pm | 6 +
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 11 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 +
14 files changed, 1541 insertions(+)
create mode 100644 src/PVE/API2/Network/SDN/Microseg.pm
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Assignment.pm
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Bridge.pm
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Group.pm
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Makefile
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Rule.pm
create mode 100644 src/PVE/Network/SDN/Microseg.pm
pve-manager:
Hannes Laimer (6):
ui: sdn: add microsegmentation panel
ui: sdn: dry-run: show pending microseg diff
network: apply microseg state on reload
ui: sdn: zones: add vxlan-gbp checkbox to vxlan and evpn
ui: sdn: microseg: add tag matcher
ui: sdn: microseg: add name regex matcher
PVE/API2/Network.pm | 4 +
www/manager6/Makefile | 9 +
www/manager6/Utils.js | 34 ++
www/manager6/dc/Config.js | 8 +
www/manager6/form/MicrosegGroupSelector.js | 77 +++++
www/manager6/form/MicrosegGuestSelector.js | 83 +++++
www/manager6/sdn/MicrosegView.js | 143 ++++++++
www/manager6/sdn/SdnDiffView.js | 24 ++
www/manager6/sdn/microseg/AssignmentEdit.js | 245 ++++++++++++++
www/manager6/sdn/microseg/Base.js | 137 ++++++++
www/manager6/sdn/microseg/GroupEdit.js | 45 +++
www/manager6/sdn/microseg/PolicyView.js | 181 ++++++++++
www/manager6/sdn/microseg/RuleEdit.js | 104 ++++++
www/manager6/sdn/microseg/Tree.js | 356 ++++++++++++++++++++
www/manager6/sdn/zones/EvpnEdit.js | 8 +
www/manager6/sdn/zones/VxlanEdit.js | 11 +
16 files changed, 1469 insertions(+)
create mode 100644 www/manager6/form/MicrosegGroupSelector.js
create mode 100644 www/manager6/form/MicrosegGuestSelector.js
create mode 100644 www/manager6/sdn/MicrosegView.js
create mode 100644 www/manager6/sdn/microseg/AssignmentEdit.js
create mode 100644 www/manager6/sdn/microseg/Base.js
create mode 100644 www/manager6/sdn/microseg/GroupEdit.js
create mode 100644 www/manager6/sdn/microseg/PolicyView.js
create mode 100644 www/manager6/sdn/microseg/RuleEdit.js
create mode 100644 www/manager6/sdn/microseg/Tree.js
pve-docs:
Hannes Laimer (2):
sdn: add microsegmentation section
sdn: add VXLAN-GBP flag to evpn/vxlan zone sections
pvesdn.adoc | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 134 insertions(+)
Summary over all repositories:
64 files changed, 8268 insertions(+), 1 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 6%]
* [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF
@ 2026-09-02 12:47 13% Hannes Laimer
2026-09-02 12:47 17% ` [PATCH pve-network 10/12] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
` (3 more replies)
0 siblings, 4 replies; 25+ results
From: Hannes Laimer @ 2026-09-02 12:47 UTC (permalink / raw)
To: pve-devel
Adds a second DHCP backend, `ebpf`, next to dnsmasq, selectable per
zone. It aims to replace dnsmasq eventually, for now it is a second
implementation, which keeps a migration simple. Every zone type can
enable DHCP through a dropdown selector, `dnsmasq` stays limited to
simple zones.
The responder is a subsystem of `proxmox-ebpf` [1], Perl reaches it
through new pve-rs bindings (PVE::RS::SDN::Dhcp), so the pve-network
patches need the pve-rs of this series.
Currently only supports DHCPv4, but adding v6 is very possible once we're happy
with the overall design.
# How
An eBPF program on the ingress of every guest tap parses DHCP requests,
looks the client MAC up in a mac -> ip+options map and rewrites the
request into the reply in place, redirected back out of the tap. The
exchange never reaches the bridge. Everything else, including MACs
without a map entry, passes untouched, so attaching is a no-op for
unmanaged MACs.
IPAM is the source of the assignments, the map is a per-node copy of
the records, kept current by:
- guest start / NIC hotplug / migration: add_dhcp_mapping already
fires here and pushes the MAC's record before the interface is
plugged, tap_plug then attaches the program.
- mapping create/update/delete through the API: the editing node
updates its own map and pokes the node running the guest to do the
same, detached from the request. Best effort, an unreachable node
catches up on its next apply or the guest's next start.
- SDN apply: refreshes the programs, drops the link pins of departed
guests and rebuilds the map from the current records.
- boot: maps start empty, every guest start seeds its own record.
Changes made directly on an external IPAM service are not detectable
and the per-MAC answers are cached, so they are not picked up on apply
either, exactly like with dnsmasq today.
The pve-network part applies on top of the separately posted patch
pushing ipam API mapping changes to the dhcp backend. Its first
patches are preparatory, no negative per-MAC cache entries and a
locked cache write, a lease time property on subnets, and asserting a
backend's availability only for zones using it.
[1] https://lore.proxmox.com/pve-devel/8d63974f-0a73-480b-9407-c6bdc2d576d7@proxmox.com
proxmox-ebpf:
Hannes Laimer (2):
dhcp: add per-tap responder BPF program
dhcp: add responder subsystem
Cargo.toml | 5 +
debian/control | 6 +-
src/dhcp/bpf/dhcp.bpf.c | 324 +++++++++++++++++++
src/dhcp/bpf/types.h | 25 ++
src/dhcp/mod.rs | 288 +++++++++++++++++
src/dhcp/types.rs | 53 ++++
src/lib.rs | 3 +
src/subsystem.rs | 35 +++
tests/dhcp.rs | 668 ++++++++++++++++++++++++++++++++++++++++
9 files changed, 1406 insertions(+), 1 deletion(-)
create mode 100644 src/dhcp/bpf/dhcp.bpf.c
create mode 100644 src/dhcp/bpf/types.h
create mode 100644 src/dhcp/mod.rs
create mode 100644 src/dhcp/types.rs
create mode 100644 tests/dhcp.rs
proxmox-perl-rs:
Hannes Laimer (1):
pve-rs: sdn: add dhcp responder bindings
pve-rs/Cargo.toml | 2 +
pve-rs/Makefile | 1 +
pve-rs/debian/control | 2 +
pve-rs/src/bindings/sdn/dhcp.rs | 91 +++++++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
5 files changed, 97 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
pve-network:
Hannes Laimer (8):
sdn: ipam: do not cache negative per-MAC answers, lock the write
sdn: subnets: add dhcp-lease-time property
sdn: dhcp: only assert a backend's availability for zones using it
sdn: dhcp: add ebpf plugin
sdn: zones: attach the dhcp responder on tap plug
sdn: dhcp: apply mapping edits on the node serving the guest
sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
tests: cover the ebpf dhcp backend and ipam API mapping pushes
src/PVE/API2/Network/SDN/Ips.pm | 5 +-
src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 ++++-
src/PVE/API2/Network/SDN/Zones.pm | 8 +-
src/PVE/Network/SDN/Dhcp.pm | 87 ++++++++++-
src/PVE/Network/SDN/Dhcp/Ebpf.pm | 173 ++++++++++++++++++++++
src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
src/PVE/Network/SDN/Ipams.pm | 20 ++-
src/PVE/Network/SDN/SubnetPlugin.pm | 7 +
src/PVE/Network/SDN/Zones.pm | 4 +
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 ++
src/test/run_test_vnets_blackbox.pl | 147 ++++++++++++++++++
15 files changed, 502 insertions(+), 13 deletions(-)
create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
pve-manager:
Hannes Laimer (1):
ui: sdn: dhcp backend selector on all zones, expose dhcp options
www/manager6/sdn/SubnetEdit.js | 24 ++++++++++++++++++++++++
www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
3 files changed, 41 insertions(+), 11 deletions(-)
Summary over all repositories:
32 files changed, 2046 insertions(+), 25 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 13%]
* [PATCH pve-network 10/12] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
2026-09-02 12:47 13% [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
@ 2026-09-02 12:47 17% ` Hannes Laimer
2026-09-02 12:54 7% ` [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
` (2 subsequent siblings)
3 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-09-02 12:47 UTC (permalink / raw)
To: pve-devel
The dnsmasq backend is confined to simple zones because it is a
node-local process on the vnet bridge, on a zone spanning nodes
every node's instance would answer the shared broadcast domain. The
ebpf backend answers on the guest's own tap and has no such
restriction, so the dhcp property moves from a simple-zone option to
a common one, with dnsmasq rejected on other zone types.
The backends ask the zone for the guest-facing MTU to serve, so the
zone types gaining dhcp implement get_mtu, with vxlan derived zones
accounting for the encapsulation overhead.
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
src/PVE/API2/Network/SDN/Zones.pm | 6 ++++++
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +++++++
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +++++++
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 +++++++++
6 files changed, 31 insertions(+)
diff --git a/src/PVE/API2/Network/SDN/Zones.pm b/src/PVE/API2/Network/SDN/Zones.pm
index ad16bef..b39c0c9 100644
--- a/src/PVE/API2/Network/SDN/Zones.pm
+++ b/src/PVE/API2/Network/SDN/Zones.pm
@@ -447,6 +447,9 @@ __PACKAGE__->register_method({
raise_param_exc({ ipam => "$ipam not existing" })
if $ipam && !$ipam_cfg->{ids}->{$ipam};
+ raise_param_exc({ dhcp => "the dnsmasq backend only supports simple zones" })
+ if ($opts->{dhcp} // '') eq 'dnsmasq' && $plugin->type() ne 'simple';
+
$zone_cfg->{ids}->{$id} = $opts;
$plugin->on_update_hook($id, $zone_cfg, $controller_cfg);
@@ -543,6 +546,9 @@ __PACKAGE__->register_method({
raise_param_exc({ ipam => "$ipam not existing" })
if $ipam && !$ipam_cfg->{ids}->{$ipam};
+ raise_param_exc({ dhcp => "the dnsmasq backend only supports simple zones" })
+ if ($opts->{dhcp} // '') eq 'dnsmasq' && $plugin->type() ne 'simple';
+
$plugin->on_update_hook($id, $zone_cfg, $controller_cfg);
PVE::Network::SDN::Zones::write_config($zone_cfg);
diff --git a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 0e79707..7f1fd90 100644
--- a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -125,6 +125,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/FaucetPlugin.pm b/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
index 5f069ae..4e3f5ef 100644
--- a/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
@@ -30,6 +30,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/QinQPlugin.pm b/src/PVE/Network/SDN/Zones/QinQPlugin.pm
index a75940c..e70912a 100644
--- a/src/PVE/Network/SDN/Zones/QinQPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/QinQPlugin.pm
@@ -36,6 +36,12 @@ sub properties {
};
}
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu};
+}
+
sub options {
return {
nodes => { optional => 1 },
@@ -48,6 +54,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/VlanPlugin.pm b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
index 9102b34..4f24b2a 100644
--- a/src/PVE/Network/SDN/Zones/VlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
@@ -36,6 +36,12 @@ sub properties {
};
}
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu};
+}
+
sub options {
return {
@@ -47,6 +53,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
index a408261..6ae1998 100644
--- a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
@@ -47,6 +47,14 @@ sub properties {
};
}
+# without an explicit zone MTU the vnet bridges default to 1450,
+# leaving room for the vxlan encapsulation
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu} // 1450;
+}
+
sub options {
return {
nodes => { optional => 1 },
@@ -58,6 +66,7 @@ sub options {
dnszone => { optional => 1 },
ipam => { optional => 1 },
fabric => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
--
2.47.3
^ permalink raw reply related [relevance 17%]
* Re: [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF
2026-09-02 12:47 13% [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
2026-09-02 12:47 17% ` [PATCH pve-network 10/12] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
@ 2026-09-02 12:54 7% ` Hannes Laimer
2026-09-03 4:26 7% ` Hannes Laimer
2026-09-04 9:39 7% ` superseded: " Hannes Laimer
3 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-09-02 12:54 UTC (permalink / raw)
To: pve-devel
On 2026-09-02 14:48, Hannes Laimer wrote:
> Adds a second DHCP backend, `ebpf`, next to dnsmasq, selectable per
> zone. It aims to replace dnsmasq eventually, for now it is a second
> implementation, which keeps a migration simple. Every zone type can
> enable DHCP through a dropdown selector, `dnsmasq` stays limited to
> simple zones.
>
> The responder is a subsystem of `proxmox-ebpf` [1], Perl reaches it
> through new pve-rs bindings (PVE::RS::SDN::Dhcp), so the pve-network
> patches need the pve-rs of this series.
>
> Currently only supports DHCPv4, but adding v6 is very possible once we're happy
> with the overall design.
>
> # How
> An eBPF program on the ingress of every guest tap parses DHCP requests,
> looks the client MAC up in a mac -> ip+options map and rewrites the
> request into the reply in place, redirected back out of the tap. The
> exchange never reaches the bridge. Everything else, including MACs
> without a map entry, passes untouched, so attaching is a no-op for
> unmanaged MACs.
>
> IPAM is the source of the assignments, the map is a per-node copy of
> the records, kept current by:
> - guest start / NIC hotplug / migration: add_dhcp_mapping already
> fires here and pushes the MAC's record before the interface is
> plugged, tap_plug then attaches the program.
> - mapping create/update/delete through the API: the editing node
> updates its own map and pokes the node running the guest to do the
> same, detached from the request. Best effort, an unreachable node
> catches up on its next apply or the guest's next start.
> - SDN apply: refreshes the programs, drops the link pins of departed
> guests and rebuilds the map from the current records.
> - boot: maps start empty, every guest start seeds its own record.
>
> Changes made directly on an external IPAM service are not detectable
> and the per-MAC answers are cached, so they are not picked up on apply
> either, exactly like with dnsmasq today.
>
> The pve-network part applies on top of the separately posted patch
> pushing ipam API mapping changes to the dhcp backend. Its first
> patches are preparatory, no negative per-MAC cache entries and a
> locked cache write, a lease time property on subnets, and asserting a
> backend's availability only for zones using it.
oops, did not send that yet, it's [2]
>
> [1] https://lore.proxmox.com/pve-devel/8d63974f-0a73-480b-9407-c6bdc2d576d7@proxmox.com
[2]
https://lore.proxmox.com/pve-devel/20260902125357.757029-1-h.laimer@proxmox.com/T/#u
>
>
> proxmox-ebpf:
>
> Hannes Laimer (2):
> dhcp: add per-tap responder BPF program
> dhcp: add responder subsystem
>
> Cargo.toml | 5 +
> debian/control | 6 +-
> src/dhcp/bpf/dhcp.bpf.c | 324 +++++++++++++++++++
> src/dhcp/bpf/types.h | 25 ++
> src/dhcp/mod.rs | 288 +++++++++++++++++
> src/dhcp/types.rs | 53 ++++
> src/lib.rs | 3 +
> src/subsystem.rs | 35 +++
> tests/dhcp.rs | 668 ++++++++++++++++++++++++++++++++++++++++
> 9 files changed, 1406 insertions(+), 1 deletion(-)
> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 src/dhcp/bpf/types.h
> create mode 100644 src/dhcp/mod.rs
> create mode 100644 src/dhcp/types.rs
> create mode 100644 tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add dhcp responder bindings
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 1 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 91 +++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 97 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (8):
> sdn: ipam: do not cache negative per-MAC answers, lock the write
> sdn: subnets: add dhcp-lease-time property
> sdn: dhcp: only assert a backend's availability for zones using it
> sdn: dhcp: add ebpf plugin
> sdn: zones: attach the dhcp responder on tap plug
> sdn: dhcp: apply mapping edits on the node serving the guest
> sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
> tests: cover the ebpf dhcp backend and ipam API mapping pushes
>
> src/PVE/API2/Network/SDN/Ips.pm | 5 +-
> src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 ++++-
> src/PVE/API2/Network/SDN/Zones.pm | 8 +-
> src/PVE/Network/SDN/Dhcp.pm | 87 ++++++++++-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 173 ++++++++++++++++++++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Ipams.pm | 20 ++-
> src/PVE/Network/SDN/SubnetPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones.pm | 4 +
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 ++
> src/test/run_test_vnets_blackbox.pl | 147 ++++++++++++++++++
> 15 files changed, 502 insertions(+), 13 deletions(-)
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
>
>
> pve-manager:
>
> Hannes Laimer (1):
> ui: sdn: dhcp backend selector on all zones, expose dhcp options
>
> www/manager6/sdn/SubnetEdit.js | 24 ++++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 3 files changed, 41 insertions(+), 11 deletions(-)
>
>
> Summary over all repositories:
> 32 files changed, 2046 insertions(+), 25 deletions(-)
>
^ permalink raw reply [relevance 7%]
* Re: [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF
2026-09-02 12:47 13% [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
2026-09-02 12:47 17% ` [PATCH pve-network 10/12] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
2026-09-02 12:54 7% ` [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
@ 2026-09-03 4:26 7% ` Hannes Laimer
2026-09-04 9:39 7% ` superseded: " Hannes Laimer
3 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-09-03 4:26 UTC (permalink / raw)
To: pve-devel
just noticed a problem with this, I'll send another version soon.
sorry for the noise
On 2026-09-02 14:48, Hannes Laimer wrote:
> Adds a second DHCP backend, `ebpf`, next to dnsmasq, selectable per
> zone. It aims to replace dnsmasq eventually, for now it is a second
> implementation, which keeps a migration simple. Every zone type can
> enable DHCP through a dropdown selector, `dnsmasq` stays limited to
> simple zones.
>
> The responder is a subsystem of `proxmox-ebpf` [1], Perl reaches it
> through new pve-rs bindings (PVE::RS::SDN::Dhcp), so the pve-network
> patches need the pve-rs of this series.
>
> Currently only supports DHCPv4, but adding v6 is very possible once we're happy
> with the overall design.
>
> # How
> An eBPF program on the ingress of every guest tap parses DHCP requests,
> looks the client MAC up in a mac -> ip+options map and rewrites the
> request into the reply in place, redirected back out of the tap. The
> exchange never reaches the bridge. Everything else, including MACs
> without a map entry, passes untouched, so attaching is a no-op for
> unmanaged MACs.
>
> IPAM is the source of the assignments, the map is a per-node copy of
> the records, kept current by:
> - guest start / NIC hotplug / migration: add_dhcp_mapping already
> fires here and pushes the MAC's record before the interface is
> plugged, tap_plug then attaches the program.
> - mapping create/update/delete through the API: the editing node
> updates its own map and pokes the node running the guest to do the
> same, detached from the request. Best effort, an unreachable node
> catches up on its next apply or the guest's next start.
> - SDN apply: refreshes the programs, drops the link pins of departed
> guests and rebuilds the map from the current records.
> - boot: maps start empty, every guest start seeds its own record.
>
> Changes made directly on an external IPAM service are not detectable
> and the per-MAC answers are cached, so they are not picked up on apply
> either, exactly like with dnsmasq today.
>
> The pve-network part applies on top of the separately posted patch
> pushing ipam API mapping changes to the dhcp backend. Its first
> patches are preparatory, no negative per-MAC cache entries and a
> locked cache write, a lease time property on subnets, and asserting a
> backend's availability only for zones using it.
>
> [1] https://lore.proxmox.com/pve-devel/8d63974f-0a73-480b-9407-c6bdc2d576d7@proxmox.com
>
>
> proxmox-ebpf:
>
> Hannes Laimer (2):
> dhcp: add per-tap responder BPF program
> dhcp: add responder subsystem
>
> Cargo.toml | 5 +
> debian/control | 6 +-
> src/dhcp/bpf/dhcp.bpf.c | 324 +++++++++++++++++++
> src/dhcp/bpf/types.h | 25 ++
> src/dhcp/mod.rs | 288 +++++++++++++++++
> src/dhcp/types.rs | 53 ++++
> src/lib.rs | 3 +
> src/subsystem.rs | 35 +++
> tests/dhcp.rs | 668 ++++++++++++++++++++++++++++++++++++++++
> 9 files changed, 1406 insertions(+), 1 deletion(-)
> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 src/dhcp/bpf/types.h
> create mode 100644 src/dhcp/mod.rs
> create mode 100644 src/dhcp/types.rs
> create mode 100644 tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add dhcp responder bindings
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 1 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 91 +++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 97 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (8):
> sdn: ipam: do not cache negative per-MAC answers, lock the write
> sdn: subnets: add dhcp-lease-time property
> sdn: dhcp: only assert a backend's availability for zones using it
> sdn: dhcp: add ebpf plugin
> sdn: zones: attach the dhcp responder on tap plug
> sdn: dhcp: apply mapping edits on the node serving the guest
> sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
> tests: cover the ebpf dhcp backend and ipam API mapping pushes
>
> src/PVE/API2/Network/SDN/Ips.pm | 5 +-
> src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 ++++-
> src/PVE/API2/Network/SDN/Zones.pm | 8 +-
> src/PVE/Network/SDN/Dhcp.pm | 87 ++++++++++-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 173 ++++++++++++++++++++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Ipams.pm | 20 ++-
> src/PVE/Network/SDN/SubnetPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones.pm | 4 +
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 ++
> src/test/run_test_vnets_blackbox.pl | 147 ++++++++++++++++++
> 15 files changed, 502 insertions(+), 13 deletions(-)
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
>
>
> pve-manager:
>
> Hannes Laimer (1):
> ui: sdn: dhcp backend selector on all zones, expose dhcp options
>
> www/manager6/sdn/SubnetEdit.js | 24 ++++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 3 files changed, 41 insertions(+), 11 deletions(-)
>
>
> Summary over all repositories:
> 32 files changed, 2046 insertions(+), 25 deletions(-)
>
^ permalink raw reply [relevance 7%]
* [PATCH manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF
@ 2026-09-04 9:38 13% Hannes Laimer
2026-09-04 9:38 17% ` [PATCH pve-network 10/12] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
2026-09-09 10:43 7% ` superseded: [PATCH manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
0 siblings, 2 replies; 25+ results
From: Hannes Laimer @ 2026-09-04 9:38 UTC (permalink / raw)
To: pve-devel
Adds a second DHCP backend, `ebpf`, next to dnsmasq, selectable per
zone. It aims to replace dnsmasq eventually, for now it is a second
implementation, which keeps a migration simple. Every zone type can
enable DHCP through a dropdown selector, `dnsmasq` stays limited to
simple zones.
The responder is a subsystem of `proxmox-ebpf` [1], Perl reaches it
through new pve-rs bindings (PVE::RS::SDN::Dhcp), so the pve-network
patches need the pve-rs of this series.
Currently only supports DHCPv4, but adding v6 is very possible once
we're happy with the overall design.
# How
An eBPF program on the ingress of every guest tap parses DHCP requests,
looks the client MAC up in a mac -> ip+options map and rewrites the
request into the reply in place, redirected back out of the tap. The
exchange never reaches the bridge. Everything else, including MACs
without a map entry, passes untouched, so attaching is a no-op for
unmanaged MACs.
IPAM is the source of the assignments, the map is a per-node copy of
the records. Every trigger below runs the same full pass, the plugin
collects all records of the ebpf zones and the guest interfaces on
their vnets, the responder diffs both against the kernel state, so
programs, links and records converge from any starting point:
- guest start / NIC hotplug / migration: add_dhcp_mapping already
fires here, before the interface is plugged, a new tap_plug hook of
the dhcp plugins then attaches the program.
- mapping create/update/delete through the API: the editing node runs
it and pokes the node running the guest to do the same through a
new node endpoint (POST /nodes/{node}/sdn/dhcp-mapping), detached
from the request. Best effort, an unreachable node catches up on its
next apply or the guest's next start.
- SDN apply: also refreshes the programs, a rebuild on a schema change
is refilled in the same pass, and a zone switching its backend takes
effect for running guests too.
- boot: nothing is pinned, the first pass after boot loads the
programs and fills the map.
Subnets get a `dhcp-lease-time` property, used by both backends,
dnsmasq keeps handing out infinite leases without it and the responder
defaults to ten minutes. The responder identifies itself with the
subnet gateway, so a subnet without one is not served, and it hands out
IPv4 resolvers only, a v6 one configured on a v4 subnet is left out of
the answers.
Changes made directly on an external IPAM service are not detectable
and the per-MAC answers are cached, so they are not picked up on apply
either, exactly like with dnsmasq today.
The pve-network patches apply on top of the separately posted patch
pushing ipam API mapping changes to the dhcp backend [2].
pre-build packages are on sani(`packages/ebpf-dhcp-v1`)
since the RFC:
- every trigger runs the same full pass instead of per-trigger map
updates, the responder diffs programs, links and records against
the kernel state, so a schema rebuild is refilled by the pass that
caused it and a zone switching to ebpf serves its running guests
- the guest node is poked through a node endpoint, not all nodes
- the tap plug goes through a hook of the dhcp plugin base
- the bridge-change paths of guests push their record changes too
- the records are collected under the macdb lock
- a v6 resolver on a v4 subnet is left out instead of failing the
pass, a subnet without a gateway is skipped with a warning
- dnsmasq honours dhcp-lease-time as well
- the mapping push endpoint checks the vnet belongs to the zone
[1] https://lore.proxmox.com/pve-devel/20260904090458.990888-1-h.laimer@proxmox.com/T/#t
[2] https://lore.proxmox.com/pve-devel/20260902125357.757029-1-h.laimer@proxmox.com/T/#u
proxmox-ebpf:
Hannes Laimer (2):
dhcp: add per-tap responder BPF program
dhcp: add responder subsystem
Cargo.toml | 5 +
debian/control | 6 +-
src/dhcp/bpf/dhcp.bpf.c | 324 +++++++++++++++++++
src/dhcp/bpf/types.h | 25 ++
src/dhcp/mod.rs | 247 +++++++++++++++
src/dhcp/types.rs | 53 ++++
src/lib.rs | 3 +
tests/dhcp.rs | 668 ++++++++++++++++++++++++++++++++++++++++
8 files changed, 1330 insertions(+), 1 deletion(-)
create mode 100644 src/dhcp/bpf/dhcp.bpf.c
create mode 100644 src/dhcp/bpf/types.h
create mode 100644 src/dhcp/mod.rs
create mode 100644 src/dhcp/types.rs
create mode 100644 tests/dhcp.rs
proxmox-perl-rs:
Hannes Laimer (1):
pve-rs: sdn: add dhcp responder bindings
pve-rs/Cargo.toml | 2 +
pve-rs/Makefile | 1 +
pve-rs/debian/control | 2 +
pve-rs/src/bindings/sdn/dhcp.rs | 81 +++++++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
5 files changed, 87 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
pve-network:
Hannes Laimer (8):
sdn: ipam: do not cache negative per-MAC answers, lock the write
sdn: subnets: add dhcp-lease-time property
sdn: dhcp: only assert a backend's availability for zones using it
sdn: dhcp: add ebpf plugin
sdn: zones: attach the dhcp responder on tap plug
sdn: dhcp: apply mapping edits on the node serving the guest
sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
tests: cover the ebpf dhcp backend and ipam API mapping pushes
src/PVE/API2/Network/SDN/Ips.pm | 3 +
src/PVE/API2/Network/SDN/Nodes/Status.pm | 42 +++-
src/PVE/API2/Network/SDN/Zones.pm | 8 +-
src/PVE/Network/SDN/Dhcp.pm | 87 +++++++-
src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 3 +-
src/PVE/Network/SDN/Dhcp/Ebpf.pm | 187 ++++++++++++++++++
src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
src/PVE/Network/SDN/Dhcp/Plugin.pm | 6 +
src/PVE/Network/SDN/Ipams.pm | 24 ++-
src/PVE/Network/SDN/SubnetPlugin.pm | 9 +
src/PVE/Network/SDN/Zones.pm | 3 +
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 +
src/test/run_test_vnets_blackbox.pl | 231 ++++++++++++++++++++++
17 files changed, 619 insertions(+), 11 deletions(-)
create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
pve-manager:
Hannes Laimer (1):
ui: sdn: dhcp backend selector on all zones, expose dhcp options
www/manager6/sdn/SubnetEdit.js | 24 ++++++++++++++++++++++++
www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
3 files changed, 41 insertions(+), 11 deletions(-)
Summary over all repositories:
33 files changed, 2077 insertions(+), 23 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 13%]
* [PATCH pve-network 10/12] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
2026-09-04 9:38 13% [PATCH " Hannes Laimer
@ 2026-09-04 9:38 17% ` Hannes Laimer
2026-09-09 10:43 7% ` superseded: [PATCH manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
1 sibling, 0 replies; 25+ results
From: Hannes Laimer @ 2026-09-04 9:38 UTC (permalink / raw)
To: pve-devel
The dnsmasq backend is confined to simple zones because it is a
node-local process on the vnet bridge, on a zone spanning nodes
every node's instance would answer the shared broadcast domain. The
ebpf backend answers on the guest's own tap and has no such
restriction, so the dhcp property moves from a simple-zone option to
a common one, with dnsmasq rejected on other zone types.
The backends ask the zone for the guest-facing MTU to serve, so the
zone types gaining dhcp implement get_mtu, with vxlan derived zones
accounting for the encapsulation overhead.
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
src/PVE/API2/Network/SDN/Zones.pm | 6 ++++++
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +++++++
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +++++++
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 +++++++++
6 files changed, 31 insertions(+)
diff --git a/src/PVE/API2/Network/SDN/Zones.pm b/src/PVE/API2/Network/SDN/Zones.pm
index ad16bef..b39c0c9 100644
--- a/src/PVE/API2/Network/SDN/Zones.pm
+++ b/src/PVE/API2/Network/SDN/Zones.pm
@@ -447,6 +447,9 @@ __PACKAGE__->register_method({
raise_param_exc({ ipam => "$ipam not existing" })
if $ipam && !$ipam_cfg->{ids}->{$ipam};
+ raise_param_exc({ dhcp => "the dnsmasq backend only supports simple zones" })
+ if ($opts->{dhcp} // '') eq 'dnsmasq' && $plugin->type() ne 'simple';
+
$zone_cfg->{ids}->{$id} = $opts;
$plugin->on_update_hook($id, $zone_cfg, $controller_cfg);
@@ -543,6 +546,9 @@ __PACKAGE__->register_method({
raise_param_exc({ ipam => "$ipam not existing" })
if $ipam && !$ipam_cfg->{ids}->{$ipam};
+ raise_param_exc({ dhcp => "the dnsmasq backend only supports simple zones" })
+ if ($opts->{dhcp} // '') eq 'dnsmasq' && $plugin->type() ne 'simple';
+
$plugin->on_update_hook($id, $zone_cfg, $controller_cfg);
PVE::Network::SDN::Zones::write_config($zone_cfg);
diff --git a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 0e79707..7f1fd90 100644
--- a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -125,6 +125,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/FaucetPlugin.pm b/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
index 5f069ae..4e3f5ef 100644
--- a/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
@@ -30,6 +30,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/QinQPlugin.pm b/src/PVE/Network/SDN/Zones/QinQPlugin.pm
index a75940c..e70912a 100644
--- a/src/PVE/Network/SDN/Zones/QinQPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/QinQPlugin.pm
@@ -36,6 +36,12 @@ sub properties {
};
}
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu};
+}
+
sub options {
return {
nodes => { optional => 1 },
@@ -48,6 +54,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/VlanPlugin.pm b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
index 9102b34..4f24b2a 100644
--- a/src/PVE/Network/SDN/Zones/VlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
@@ -36,6 +36,12 @@ sub properties {
};
}
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu};
+}
+
sub options {
return {
@@ -47,6 +53,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
index a408261..6ae1998 100644
--- a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
@@ -47,6 +47,14 @@ sub properties {
};
}
+# without an explicit zone MTU the vnet bridges default to 1450,
+# leaving room for the vxlan encapsulation
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu} // 1450;
+}
+
sub options {
return {
nodes => { optional => 1 },
@@ -58,6 +66,7 @@ sub options {
dnszone => { optional => 1 },
ipam => { optional => 1 },
fabric => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
--
2.47.3
^ permalink raw reply related [relevance 17%]
* superseded: [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF
2026-09-02 12:47 13% [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
` (2 preceding siblings ...)
2026-09-03 4:26 7% ` Hannes Laimer
@ 2026-09-04 9:39 7% ` Hannes Laimer
3 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-09-04 9:39 UTC (permalink / raw)
To: pve-devel
superseded-by:
https://lore.proxmox.com/pve-devel/20260904093835.1050030-1-h.laimer@proxmox.com/T/#t
On 2026-09-02 14:48, Hannes Laimer wrote:
> Adds a second DHCP backend, `ebpf`, next to dnsmasq, selectable per
> zone. It aims to replace dnsmasq eventually, for now it is a second
> implementation, which keeps a migration simple. Every zone type can
> enable DHCP through a dropdown selector, `dnsmasq` stays limited to
> simple zones.
>
> The responder is a subsystem of `proxmox-ebpf` [1], Perl reaches it
> through new pve-rs bindings (PVE::RS::SDN::Dhcp), so the pve-network
> patches need the pve-rs of this series.
>
> Currently only supports DHCPv4, but adding v6 is very possible once we're happy
> with the overall design.
>
> # How
> An eBPF program on the ingress of every guest tap parses DHCP requests,
> looks the client MAC up in a mac -> ip+options map and rewrites the
> request into the reply in place, redirected back out of the tap. The
> exchange never reaches the bridge. Everything else, including MACs
> without a map entry, passes untouched, so attaching is a no-op for
> unmanaged MACs.
>
> IPAM is the source of the assignments, the map is a per-node copy of
> the records, kept current by:
> - guest start / NIC hotplug / migration: add_dhcp_mapping already
> fires here and pushes the MAC's record before the interface is
> plugged, tap_plug then attaches the program.
> - mapping create/update/delete through the API: the editing node
> updates its own map and pokes the node running the guest to do the
> same, detached from the request. Best effort, an unreachable node
> catches up on its next apply or the guest's next start.
> - SDN apply: refreshes the programs, drops the link pins of departed
> guests and rebuilds the map from the current records.
> - boot: maps start empty, every guest start seeds its own record.
>
> Changes made directly on an external IPAM service are not detectable
> and the per-MAC answers are cached, so they are not picked up on apply
> either, exactly like with dnsmasq today.
>
> The pve-network part applies on top of the separately posted patch
> pushing ipam API mapping changes to the dhcp backend. Its first
> patches are preparatory, no negative per-MAC cache entries and a
> locked cache write, a lease time property on subnets, and asserting a
> backend's availability only for zones using it.
>
> [1] https://lore.proxmox.com/pve-devel/8d63974f-0a73-480b-9407-c6bdc2d576d7@proxmox.com
>
>
> proxmox-ebpf:
>
> Hannes Laimer (2):
> dhcp: add per-tap responder BPF program
> dhcp: add responder subsystem
>
> Cargo.toml | 5 +
> debian/control | 6 +-
> src/dhcp/bpf/dhcp.bpf.c | 324 +++++++++++++++++++
> src/dhcp/bpf/types.h | 25 ++
> src/dhcp/mod.rs | 288 +++++++++++++++++
> src/dhcp/types.rs | 53 ++++
> src/lib.rs | 3 +
> src/subsystem.rs | 35 +++
> tests/dhcp.rs | 668 ++++++++++++++++++++++++++++++++++++++++
> 9 files changed, 1406 insertions(+), 1 deletion(-)
> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 src/dhcp/bpf/types.h
> create mode 100644 src/dhcp/mod.rs
> create mode 100644 src/dhcp/types.rs
> create mode 100644 tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add dhcp responder bindings
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 1 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 91 +++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 97 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (8):
> sdn: ipam: do not cache negative per-MAC answers, lock the write
> sdn: subnets: add dhcp-lease-time property
> sdn: dhcp: only assert a backend's availability for zones using it
> sdn: dhcp: add ebpf plugin
> sdn: zones: attach the dhcp responder on tap plug
> sdn: dhcp: apply mapping edits on the node serving the guest
> sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
> tests: cover the ebpf dhcp backend and ipam API mapping pushes
>
> src/PVE/API2/Network/SDN/Ips.pm | 5 +-
> src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 ++++-
> src/PVE/API2/Network/SDN/Zones.pm | 8 +-
> src/PVE/Network/SDN/Dhcp.pm | 87 ++++++++++-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 173 ++++++++++++++++++++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Ipams.pm | 20 ++-
> src/PVE/Network/SDN/SubnetPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones.pm | 4 +
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 ++
> src/test/run_test_vnets_blackbox.pl | 147 ++++++++++++++++++
> 15 files changed, 502 insertions(+), 13 deletions(-)
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
>
>
> pve-manager:
>
> Hannes Laimer (1):
> ui: sdn: dhcp backend selector on all zones, expose dhcp options
>
> www/manager6/sdn/SubnetEdit.js | 24 ++++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 3 files changed, 41 insertions(+), 11 deletions(-)
>
>
> Summary over all repositories:
> 32 files changed, 2046 insertions(+), 25 deletions(-)
>
^ permalink raw reply [relevance 7%]
* [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v2 00/16] sdn: implement DHCP for all zones using eBPF
@ 2026-09-09 10:41 10% Hannes Laimer
2026-09-09 10:41 23% ` [PATCH pve-network v2 11/16] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
2026-10-20 8:01 7% ` superseded: [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v2 00/16] sdn: implement DHCP for all zones using eBPF Hannes Laimer
0 siblings, 2 replies; 25+ results
From: Hannes Laimer @ 2026-09-09 10:41 UTC (permalink / raw)
To: pve-devel
Adds a second DHCP backend, `ebpf`, next to dnsmasq, selectable per
zone. It aims to replace dnsmasq eventually and keeping both for now
makes a migration simple. Every zone type can enable DHCP and the UI
offers the selector on the zone types it edits. `dnsmasq` stays limited
to simple zones.
The responder lives in proxmox-ebpf [1]. The two patches for it apply
on top of the v3 of that series, which follows separately. pve-rs gains
a build dependency on the librust-proxmox-ebpf-dev it provides.
pve-network needs this series' pve-rs at build time and at run time.
qemu-server needs this series' pve-network as a Depends. pve-container
works without the package and needs a Breaks on the older versions.
Both pve-manager patches need it as well.
# On the tap
An eBPF program on the ingress of every guest tap on a vnet of an ebpf
zone parses DHCP requests. It looks the interface up in an
interface -> ip+options map and turns the request into the reply in
place, back out of the tap. The exchange never reaches the bridge.
Everything else passes untouched to the bridge and through the firewall
as before. The answer is the interface's and only a request carrying
its NIC's MAC gets it. Another MAC is passed on unanswered. So no guest
can read another one's record by asking with its MAC, and a nested
client is not handed the outer guest's address. Equal subnets in two
zones do not mix either, each interface is answered from its own vnet's
subnet.
# The records and who writes them
IPAM is the source and the map holds the answer of every guest
interface on the node. A record change writes the records of the MAC's
interfaces here. A tap plug attaches its interface with its record and
an unplug drops it. All of that runs under a shared lock. The full pass
builds the desired state from the configs, every guest NIC in the
cluster with the vnet it sits on and the answer its MAC gets there from
the MAC cache. The responder gives every listed interface present here
its record, and a link where it is served. An interface the configs
serve without a mapping gets a marker, so a plug that read the cache
before the mapping went loses to it. It leaves a linked interface the
configs do not name yet alone, since a hotplug plugs before it writes
the config. It drops what a crashed guest left. A link on an interface
without a record is harmless, the program passes everything there. So
nothing is lost by attaching first and answering once the record is in.
A pass failing midway warns in its task, and what was served keeps
being served meanwhile. A change drawn before it is dropped, the next
apply carries its input.
- a guest start, NIC hotplug or migration allocates the record before
the interface is plugged. Then a new tap plug hook of the dhcp
plugins attaches the program, and a stop or unplug detaches it
- a mapping created, updated or deleted through the API is written by
the editing node. That node pokes the node running the guest through
a new node endpoint (POST /nodes/{node}/sdn/dhcp-mapping) with a
detached pvesh call, proxied over ssh like pvesh does. An
unreachable node catches up on its next apply
- an SDN apply runs the full pass and refreshes the programs, so a
schema rebuild is refilled and a zone switching its backend takes
effect for its running guests that hold a mapping as well
- after a boot nothing is pinned, so the SDN commit brings the
responder back before the guests start. A change that still finds
nothing loaded runs the full pass itself
# Ordering
Nothing forces the collection of that state into one order, so every
change carries a generation, a per-node counter the responder hands
out. There is one rule. A change draws after its input is written and
a reader before it reads. So two changes are ordered by the input they
saw and not by when they reach the kernel.
Who draws when:
- record change after the IPAM record and the cache are written
- full pass before it reads the configs and the cache
- tap plug before it reads the cache. Its number orders the
cache read and says nothing about the guest config,
which is not written yet
What the number decides:
- record keeps the generation that wrote it, an older change
never overwrites it. A removal by a record change
leaves a marker with its generation for the same
reason
- full pass records its generation before it runs, so an older
pass is dropped. It leaves alone every record a
newer change wrote since it read its input
Links carry no generation. The configs decide about the interfaces they
name, a linked interface they do not name is left alone. So a hotplug's
plug survives a pass that read the config before the write.
A generation cannot order a pass against a hotplug that moves a tap
between bridges. The plug runs before the guest config names the new
bridge, so a pass in between reads the old one. That is why every
record also names the vnet its writer saw the tap on.
What the vnet decides:
- pass, record change leave an entry alone that names another vnet
than their config does, their config is stale
for that tap. The pass lets the link follow
the entry
- tap plug replaces such an entry. Plugs of one tap are
serialized by the guest lock, so the plug is
the latest word on where it sits. On its own
vnet it compares by generation like any other
change. A plug finding no entry writes, a pass
that stamped meanwhile never saw its interface
- plug elsewhere a tap moved onto a plain bridge or a zone of
another backend trades its entry for a marker
naming that place. So a pass still reading
the old vnet leaves it alone, and one reading
the new place keeps it as it is. A tap without
an entry gets none
- tap unplug drops the entry with the link, the tap is
gone or about to be. A tap with neither a
link nor an interface left leaves its entry
to the next pass
The counter lives under /run and restarts with the node like
everything it orders.
# What a guest sees
A changed mapping reaches a running guest at its next renewal, so the
lease time bounds how long an old answer survives. A deleted one is no
longer answered, the guest keeps its address until the lease runs out.
Subnets get a `dhcp-lease-time` property, used by both backends.
Without it dnsmasq keeps handing out infinite leases and the responder
defaults to ten minutes.
Since the request is answered on the tap, neither the firewall nor the
rate limit of the interface sees it. So neither the guest's rules nor
its DHCP firewall option nor the rate limit apply to an answered
request. The reply is put on the tap's egress, so the rate limit shapes
it and the firewall never sees it.
The responder identifies itself with the subnet gateway. A subnet
without one is served under a link-local identifier and without a
default route, its guests renew by broadcast at rebinding time. It
hands out an IPv4 DNS server only, an IPv6 one on a v4 subnet is left
out. A guest tagging its own requests is not answered either, so a
trunk port keeps working as before. Only DHCPv4 for now, but adding v6
is very possible once we are happy with the design.
Changes made directly on an external IPAM service are not detectable
and the answers are cached per MAC. So an apply does not pick them up
either, exactly like with dnsmasq today.
note on the earlier versions: The main problem was that a tap plug ran
on information not in the config yet, only pending. This allowed a race
between the tap plug hook updating the kernel state and a fast enough
SDN apply undoing it again, and a few other subtleties. This version
should address all of these properly. Sorry for the noise with the other
two versions, both the result of me spotting the problem too late and
being too fast in assuming I had solved it.
[1] https://lore.proxmox.com/pve-devel/20260909103952.1108084-1-h.laimer@proxmox.com/T/#t
proxmox-ebpf:
Hannes Laimer (2):
dhcp: add per-tap responder BPF program
dhcp: add responder subsystem
Cargo.toml | 5 +
debian/control | 6 +-
src/bpf-shim/bpf/bpf_helpers.h | 3 +
src/bpf-shim/vmlinux.h | 1 +
src/dhcp/bpf/dhcp.bpf.c | 405 ++++++++++++
src/dhcp/bpf/types.h | 25 +
src/dhcp/mod.rs | 1113 ++++++++++++++++++++++++++++++++
src/dhcp/types.rs | 80 +++
src/lib.rs | 3 +
tests/common/mod.rs | 63 +-
tests/dhcp.rs | 827 ++++++++++++++++++++++++
11 files changed, 2526 insertions(+), 5 deletions(-)
create mode 100644 src/dhcp/bpf/dhcp.bpf.c
create mode 100644 src/dhcp/bpf/types.h
create mode 100644 src/dhcp/mod.rs
create mode 100644 src/dhcp/types.rs
create mode 100644 tests/dhcp.rs
proxmox-perl-rs:
Hannes Laimer (1):
pve-rs: sdn: add dhcp responder bindings
pve-rs/Cargo.toml | 2 +
pve-rs/Makefile | 1 +
pve-rs/debian/control | 2 +
pve-rs/src/bindings/sdn/dhcp.rs | 162 ++++++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
5 files changed, 168 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
pve-network:
Hannes Laimer (8):
sdn: push mapping changes from the ipam API to the dhcp backend
sdn: ipam: do not cache negative per-MAC answers, lock the write
sdn: subnets: add dhcp-lease-time property
sdn: dhcp: only assert a backend's availability for zones using it
sdn: dhcp: add ebpf plugin
sdn: zones: attach the dhcp responder on tap plug, detach on unplug
sdn: dhcp: apply mapping edits on the node serving the guest
sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
debian/libpve-network-perl.prerm | 13 +
src/PVE/API2/Network/SDN/Ips.pm | 10 +
src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 +
src/PVE/API2/Network/SDN/Zones.pm | 11 +-
src/PVE/Network/SDN/Dhcp.pm | 202 ++-
src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 104 +-
src/PVE/Network/SDN/Dhcp/Ebpf.pm | 355 ++++++
src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
src/PVE/Network/SDN/Dhcp/Plugin.pm | 25 +-
src/PVE/Network/SDN/Ipams.pm | 61 +-
src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
src/PVE/Network/SDN/Vnets.pm | 5 +-
src/PVE/Network/SDN/Zones.pm | 31 +-
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 32 +
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 25 +
src/test/run_test_vnets_blackbox.pl | 1361 ++++++++++++++++++++-
20 files changed, 2223 insertions(+), 79 deletions(-)
create mode 100755 debian/libpve-network-perl.prerm
create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
qemu-server:
Hannes Laimer (1):
network: report NIC plug and unplug to SDN with the MAC
src/PVE/CLI/qm.pm | 4 ++--
src/PVE/QemuServer.pm | 4 ++++
src/PVE/QemuServer/Network.pm | 4 ++--
src/usr/pve-bridge | 8 +++++++-
src/usr/pve-bridgedown | 4 ++--
5 files changed, 17 insertions(+), 7 deletions(-)
pve-container:
Hannes Laimer (1):
net: report veth plug and unplug to SDN with the hwaddr
src/PVE/LXC.pm | 24 ++++++++++++++++++++++--
src/PVE/LXC/Config.pm | 2 +-
src/lxc-pve-poststop-hook | 5 ++---
3 files changed, 25 insertions(+), 6 deletions(-)
pve-manager:
Hannes Laimer (2):
ui: sdn: dhcp backend selector on all zones, expose dhcp options
sdn: bring the dhcp backends up at boot before the guests start
bin/pve-sdn-commit | 3 +++
services/pve-sdn-commit.service | 3 ++-
www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
5 files changed, 45 insertions(+), 12 deletions(-)
pve-docs:
Hannes Laimer (1):
sdn: dhcp: document the ebpf backend
pvesdn.adoc | 113 +++++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 95 insertions(+), 18 deletions(-)
Summary over all repositories:
50 files changed, 5099 insertions(+), 127 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 10%]
* [PATCH pve-network v2 11/16] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
2026-09-09 10:41 10% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v2 00/16] " Hannes Laimer
@ 2026-09-09 10:41 23% ` Hannes Laimer
2026-10-20 8:01 7% ` superseded: [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v2 00/16] sdn: implement DHCP for all zones using eBPF Hannes Laimer
1 sibling, 0 replies; 25+ results
From: Hannes Laimer @ 2026-09-09 10:41 UTC (permalink / raw)
To: pve-devel
The dnsmasq backend is confined to simple zones because it is a
node-local process on the vnet bridge. On a zone spanning nodes every
node's instance would answer the shared broadcast domain. The ebpf
backend answers on the guest's own tap and has no such restriction, so
the dhcp property is offered on every zone type, with dnsmasq rejected
on the others.
The backends ask the zone for the guest-facing MTU to serve, so the zone
types gaining dhcp report theirs where they have one. Vxlan derived
zones take the underlay's MTU minus the encapsulation overhead where
their peers name a local interface, the derivation their bridge
generation means to apply.
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
src/PVE/API2/Network/SDN/Zones.pm | 8 +-
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 32 +++++++
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 ++
src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 ++
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 25 +++++
src/test/run_test_vnets_blackbox.pl | 109 +++++++++++++++++++++-
8 files changed, 187 insertions(+), 4 deletions(-)
diff --git a/src/PVE/API2/Network/SDN/Zones.pm b/src/PVE/API2/Network/SDN/Zones.pm
index 0e90726..2b2aba0 100644
--- a/src/PVE/API2/Network/SDN/Zones.pm
+++ b/src/PVE/API2/Network/SDN/Zones.pm
@@ -93,7 +93,7 @@ my $ZONE_PROPERTIES = {
type => 'string',
enum => PVE::Network::SDN::Dhcp->plugin_types(),
optional => 1,
- description => 'Name of DHCP server backend for this zone.',
+ description => 'DHCP backend serving the zone, dnsmasq works on simple zones only.',
},
'rt-import' => {
type => 'string',
@@ -448,6 +448,9 @@ __PACKAGE__->register_method({
raise_param_exc({ ipam => "$ipam not existing" })
if $ipam && !$ipam_cfg->{ids}->{$ipam};
+ raise_param_exc({ dhcp => "the dnsmasq backend only supports simple zones" })
+ if ($opts->{dhcp} // '') eq 'dnsmasq' && $plugin->type() ne 'simple';
+
$zone_cfg->{ids}->{$id} = $opts;
$plugin->on_update_hook($id, $zone_cfg, $controller_cfg);
@@ -544,6 +547,9 @@ __PACKAGE__->register_method({
raise_param_exc({ ipam => "$ipam not existing" })
if $ipam && !$ipam_cfg->{ids}->{$ipam};
+ raise_param_exc({ dhcp => "the dnsmasq backend only supports simple zones" })
+ if ($scfg->{dhcp} // '') eq 'dnsmasq' && $plugin->type() ne 'simple';
+
$plugin->on_update_hook($id, $zone_cfg, $controller_cfg);
PVE::Network::SDN::Zones::write_config($zone_cfg);
diff --git a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
index 0e79707..60fe788 100644
--- a/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/EvpnPlugin.pm
@@ -125,10 +125,42 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
# Plugin implementation
+# the underlay interface is the one the controller's peers name, found the
+# way the bridge generation finds it
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu} if $plugin_config->{mtu};
+
+ my $iface;
+ my $controller_cfg = PVE::Network::SDN::running_config()->{controllers};
+ my $controller = $controller_cfg->{ids}->{ $plugin_config->{controller} // '' };
+ if ($controller && $controller->{peers}) {
+ my @peers = PVE::Tools::split_list($controller->{peers});
+ my $local_node = PVE::INotify::nodename();
+ my $bgprouter = PVE::Network::SDN::Controllers::EvpnPlugin::find_bgp_controller(
+ $local_node, $controller_cfg,
+ );
+ my $isisrouter = PVE::Network::SDN::Controllers::EvpnPlugin::find_isis_controller(
+ $local_node, $controller_cfg,
+ );
+ my $loopback = $bgprouter->{loopback} // $isisrouter->{loopback};
+ (undef, $iface) = eval {
+ PVE::Network::SDN::Zones::Plugin::find_local_ip_interface_peers(\@peers, $loopback);
+ };
+ }
+ return PVE::Network::SDN::Zones::VxlanPlugin::vxlan_mtu(
+ $plugin_config,
+ $iface,
+ PVE::INotify::read_file('interfaces'),
+ );
+}
+
sub generate_sdn_config {
my (
$class,
diff --git a/src/PVE/Network/SDN/Zones/FaucetPlugin.pm b/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
index 5f069ae..4e3f5ef 100644
--- a/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/FaucetPlugin.pm
@@ -30,6 +30,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/QinQPlugin.pm b/src/PVE/Network/SDN/Zones/QinQPlugin.pm
index a75940c..e70912a 100644
--- a/src/PVE/Network/SDN/Zones/QinQPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/QinQPlugin.pm
@@ -36,6 +36,12 @@ sub properties {
};
}
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu};
+}
+
sub options {
return {
nodes => { optional => 1 },
@@ -48,6 +54,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/SimplePlugin.pm b/src/PVE/Network/SDN/Zones/SimplePlugin.pm
index 347eee9..e8656cc 100644
--- a/src/PVE/Network/SDN/Zones/SimplePlugin.pm
+++ b/src/PVE/Network/SDN/Zones/SimplePlugin.pm
@@ -31,7 +31,7 @@ sub properties {
description => "dns domain zone ex: mydomain.com",
},
dhcp => {
- description => 'Type of the DHCP backend for this zone',
+ description => 'DHCP backend serving the zone, dnsmasq works on simple zones only.',
type => 'string',
enum => PVE::Network::SDN::Dhcp->plugin_types(),
},
diff --git a/src/PVE/Network/SDN/Zones/VlanPlugin.pm b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
index 9102b34..4f24b2a 100644
--- a/src/PVE/Network/SDN/Zones/VlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VlanPlugin.pm
@@ -36,6 +36,12 @@ sub properties {
};
}
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ return $plugin_config->{mtu};
+}
+
sub options {
return {
@@ -47,6 +53,7 @@ sub options {
reversedns => { optional => 1 },
dnszone => { optional => 1 },
ipam => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
index a408261..0dab5d9 100644
--- a/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
+++ b/src/PVE/Network/SDN/Zones/VxlanPlugin.pm
@@ -47,6 +47,30 @@ sub properties {
};
}
+# the vnet bridge takes the underlay interface's MTU minus the vxlan
+# encapsulation where the peers name a local interface, the default
+# otherwise. An explicit zone MTU wins
+sub vxlan_mtu {
+ my ($plugin_config, $iface, $interfaces_config) = @_;
+
+ return $plugin_config->{mtu} if $plugin_config->{mtu};
+ return $interfaces_config->{ifaces}->{$iface}->{mtu} - 50
+ if $iface && $interfaces_config->{ifaces}->{$iface}->{mtu};
+ return 1450;
+}
+
+sub get_mtu {
+ my ($class, $plugin_config) = @_;
+
+ my $iface;
+ if ($plugin_config->{peers}) {
+ my @peers = PVE::Tools::split_list($plugin_config->{peers});
+ (undef, $iface) =
+ eval { PVE::Network::SDN::Zones::Plugin::find_local_ip_interface_peers(\@peers) };
+ }
+ return vxlan_mtu($plugin_config, $iface, PVE::INotify::read_file('interfaces'));
+}
+
sub options {
return {
nodes => { optional => 1 },
@@ -58,6 +82,7 @@ sub options {
dnszone => { optional => 1 },
ipam => { optional => 1 },
fabric => { optional => 1 },
+ dhcp => { optional => 1 },
};
}
diff --git a/src/test/run_test_vnets_blackbox.pl b/src/test/run_test_vnets_blackbox.pl
index 2c11dad..557600a 100755
--- a/src/test/run_test_vnets_blackbox.pl
+++ b/src/test/run_test_vnets_blackbox.pl
@@ -1438,6 +1438,55 @@ sub test_ipam_cache_case {
run_test(\&test_ipam_cache_case);
+sub test_zone_dhcp_backends {
+ my $test_name = (split(/::/, (caller(0))[3]))[-1];
+ my $zoneid = "TESTZONE";
+
+ # dnsmasq answers on the vnet bridge, so it only fits zones confined to
+ # one node. The ebpf backend answers on the guest's tap and fits any
+ my $zone = {
+ type => "vlan",
+ bridge => "vmbr0",
+ ipam => "pve",
+ zone => $zoneid,
+ };
+ eval { PVE::API2::Network::SDN::Zones->create({ %$zone, dhcp => "dnsmasq" }); };
+ like(
+ $@,
+ qr/dnsmasq backend only supports simple zones/,
+ "$test_name: dnsmasq is refused on a vlan zone",
+ );
+
+ create_zone({ %$zone, dhcp => "ebpf" });
+ is(get_zone($zoneid)->{dhcp}, "ebpf", "$test_name: ebpf is accepted on a vlan zone");
+
+ eval { update_zone($zoneid, { dhcp => "dnsmasq" }); };
+ like(
+ $@,
+ qr/dnsmasq backend only supports simple zones/,
+ "$test_name: switching a vlan zone to dnsmasq is refused",
+ );
+
+ # every other zone type offers the backend as well
+ $test_state->{controller_config} = {
+ ids => { ctrl => { type => 'evpn', asn => 65000, peers => '10.0.0.1' } },
+ };
+ my $params = {
+ qinq => { bridge => 'vmbr0', tag => 100 },
+ vxlan => { peers => '10.0.0.1' },
+ evpn => { controller => 'ctrl', 'vrf-vxlan' => 1000 },
+ faucet => { 'dp-id' => 1, controller => 'ctrl' },
+ };
+ for my $type (sort keys %$params) {
+ my $id = uc($type) . "Z";
+ my $zone = { type => $type, ipam => "pve", zone => $id, %{ $params->{$type} } };
+ create_zone({ %$zone, dhcp => "ebpf" });
+ is(get_zone($id)->{dhcp}, "ebpf", "$test_name: ebpf is accepted on a $type zone");
+ }
+}
+
+run_test(\&test_zone_dhcp_backends);
+
sub test_dnsmasq_dual_stack_and_sweep {
my $test_name = (split(/::/, (caller(0))[3]))[-1];
my $zoneid = "TESTZONE";
@@ -1744,6 +1793,8 @@ sub test_ebpf_backend {
);
}
+run_test(\&test_ebpf_backend);
+
sub test_ebpf_backend_edge_cases {
my $test_name = (split(/::/, (caller(0))[3]))[-1];
my $zoneid = "TESTZONE";
@@ -1859,7 +1910,7 @@ sub test_ebpf_backend_edge_cases {
);
}
-run_test(\&test_ebpf_backend);
+run_test(\&test_ebpf_backend_edge_cases);
sub test_zone_tap_plug {
my $test_name = (split(/::/, (caller(0))[3]))[-1];
@@ -1989,7 +2040,6 @@ sub test_zone_tap_plug {
}
run_test(\&test_zone_tap_plug);
-run_test(\&test_ebpf_backend_edge_cases);
sub test_ebpf_mac_case {
my $test_name = (split(/::/, (caller(0))[3]))[-1];
@@ -2171,6 +2221,61 @@ sub test_ebpf_zone_mtu {
run_test(\&test_ebpf_zone_mtu);
+sub test_ebpf_vxlan_mtu {
+ my $test_name = (split(/::/, (caller(0))[3]))[-1];
+ my $zoneid = "VXZONE";
+ my $vnetid = "vxvnet";
+ my $mac = "da:65:8f:18:9b:6f";
+
+ # a vxlan zone without an MTU of its own answers with the one its bridge
+ # takes from the underlay, the encapsulation overhead taken off
+ my $mocked_zone_plugin = Test::MockModule->new('PVE::Network::SDN::Zones::Plugin');
+ $mocked_zone_plugin->mock(
+ find_local_ip_interface_peers => sub { return ('10.10.10.1', 'eno1'); });
+ $mocked_pve_inotify->mock(
+ read_file => sub { return { ifaces => { eno1 => { mtu => 1400 } } }; });
+ create_zone({
+ type => "vxlan",
+ peers => "10.10.10.2",
+ dhcp => "ebpf",
+ ipam => "pve",
+ zone => $zoneid,
+ });
+ create_vnet({
+ type => "vnet",
+ zone => $zoneid,
+ vnet => $vnetid,
+ tag => 100,
+ });
+ create_subnet({
+ type => "subnet",
+ vnet => $vnetid,
+ subnet => "10.0.0.0/24",
+ gateway => "10.0.0.1",
+ });
+ $test_state->{vmlist} = { ids => { 999 => { type => 'qemu', node => 'localnode' } } };
+ $test_state->{guest_nets} = { 999 => { net0 => "virtio=$mac,bridge=$vnetid" } };
+ $test_state->{macdb} = { macs => { $mac => { ip4 => '10.0.0.100' } } };
+
+ take_ebpf_calls();
+ PVE::Network::SDN::Dhcp::regenerate_config();
+ is(
+ take_ebpf_calls()->[0]->{args}->[0]->[0]->{record}->{mtu},
+ 1350,
+ "$test_name: the underlay's MTU minus the encapsulation is handed out",
+ );
+ update_zone($zoneid, { mtu => 1500 });
+ PVE::Network::SDN::Dhcp::regenerate_config();
+ is(
+ take_ebpf_calls()->[0]->{args}->[0]->[0]->{record}->{mtu},
+ 1500,
+ "$test_name: an explicit zone MTU wins",
+ );
+ $mocked_pve_inotify->unmock('read_file');
+}
+
+run_test(\&test_ebpf_vxlan_mtu);
+
sub test_ebpf_overlapping_subnets {
my $test_name = (split(/::/, (caller(0))[3]))[-1];
my $zoneid = "TESTZONE";
--
2.47.3
^ permalink raw reply related [relevance 23%]
* superseded: [PATCH manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF
2026-09-04 9:38 13% [PATCH " Hannes Laimer
2026-09-04 9:38 17% ` [PATCH pve-network 10/12] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
@ 2026-09-09 10:43 7% ` Hannes Laimer
1 sibling, 0 replies; 25+ results
From: Hannes Laimer @ 2026-09-09 10:43 UTC (permalink / raw)
To: pve-devel
superseded-by:
https://lore.proxmox.com/pve-devel/20260909104144.1110031-1-h.laimer@proxmox.com/T/#t
On 2026-09-04 11:38, Hannes Laimer wrote:
> Adds a second DHCP backend, `ebpf`, next to dnsmasq, selectable per
> zone. It aims to replace dnsmasq eventually, for now it is a second
> implementation, which keeps a migration simple. Every zone type can
> enable DHCP through a dropdown selector, `dnsmasq` stays limited to
> simple zones.
>
> The responder is a subsystem of `proxmox-ebpf` [1], Perl reaches it
> through new pve-rs bindings (PVE::RS::SDN::Dhcp), so the pve-network
> patches need the pve-rs of this series.
>
> Currently only supports DHCPv4, but adding v6 is very possible once
> we're happy with the overall design.
>
> # How
> An eBPF program on the ingress of every guest tap parses DHCP requests,
> looks the client MAC up in a mac -> ip+options map and rewrites the
> request into the reply in place, redirected back out of the tap. The
> exchange never reaches the bridge. Everything else, including MACs
> without a map entry, passes untouched, so attaching is a no-op for
> unmanaged MACs.
>
> IPAM is the source of the assignments, the map is a per-node copy of
> the records. Every trigger below runs the same full pass, the plugin
> collects all records of the ebpf zones and the guest interfaces on
> their vnets, the responder diffs both against the kernel state, so
> programs, links and records converge from any starting point:
> - guest start / NIC hotplug / migration: add_dhcp_mapping already
> fires here, before the interface is plugged, a new tap_plug hook of
> the dhcp plugins then attaches the program.
> - mapping create/update/delete through the API: the editing node runs
> it and pokes the node running the guest to do the same through a
> new node endpoint (POST /nodes/{node}/sdn/dhcp-mapping), detached
> from the request. Best effort, an unreachable node catches up on its
> next apply or the guest's next start.
> - SDN apply: also refreshes the programs, a rebuild on a schema change
> is refilled in the same pass, and a zone switching its backend takes
> effect for running guests too.
> - boot: nothing is pinned, the first pass after boot loads the
> programs and fills the map.
>
> Subnets get a `dhcp-lease-time` property, used by both backends,
> dnsmasq keeps handing out infinite leases without it and the responder
> defaults to ten minutes. The responder identifies itself with the
> subnet gateway, so a subnet without one is not served, and it hands out
> IPv4 resolvers only, a v6 one configured on a v4 subnet is left out of
> the answers.
>
> Changes made directly on an external IPAM service are not detectable
> and the per-MAC answers are cached, so they are not picked up on apply
> either, exactly like with dnsmasq today.
>
> The pve-network patches apply on top of the separately posted patch
> pushing ipam API mapping changes to the dhcp backend [2].
>
> pre-build packages are on sani(`packages/ebpf-dhcp-v1`)
>
> since the RFC:
> - every trigger runs the same full pass instead of per-trigger map
> updates, the responder diffs programs, links and records against
> the kernel state, so a schema rebuild is refilled by the pass that
> caused it and a zone switching to ebpf serves its running guests
> - the guest node is poked through a node endpoint, not all nodes
> - the tap plug goes through a hook of the dhcp plugin base
> - the bridge-change paths of guests push their record changes too
> - the records are collected under the macdb lock
> - a v6 resolver on a v4 subnet is left out instead of failing the
> pass, a subnet without a gateway is skipped with a warning
> - dnsmasq honours dhcp-lease-time as well
> - the mapping push endpoint checks the vnet belongs to the zone
>
>
> [1] https://lore.proxmox.com/pve-devel/20260904090458.990888-1-h.laimer@proxmox.com/T/#t
> [2] https://lore.proxmox.com/pve-devel/20260902125357.757029-1-h.laimer@proxmox.com/T/#u
>
>
> proxmox-ebpf:
>
> Hannes Laimer (2):
> dhcp: add per-tap responder BPF program
> dhcp: add responder subsystem
>
> Cargo.toml | 5 +
> debian/control | 6 +-
> src/dhcp/bpf/dhcp.bpf.c | 324 +++++++++++++++++++
> src/dhcp/bpf/types.h | 25 ++
> src/dhcp/mod.rs | 247 +++++++++++++++
> src/dhcp/types.rs | 53 ++++
> src/lib.rs | 3 +
> tests/dhcp.rs | 668 ++++++++++++++++++++++++++++++++++++++++
> 8 files changed, 1330 insertions(+), 1 deletion(-)
> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 src/dhcp/bpf/types.h
> create mode 100644 src/dhcp/mod.rs
> create mode 100644 src/dhcp/types.rs
> create mode 100644 tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add dhcp responder bindings
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 1 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 81 +++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 87 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (8):
> sdn: ipam: do not cache negative per-MAC answers, lock the write
> sdn: subnets: add dhcp-lease-time property
> sdn: dhcp: only assert a backend's availability for zones using it
> sdn: dhcp: add ebpf plugin
> sdn: zones: attach the dhcp responder on tap plug
> sdn: dhcp: apply mapping edits on the node serving the guest
> sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
> tests: cover the ebpf dhcp backend and ipam API mapping pushes
>
> src/PVE/API2/Network/SDN/Ips.pm | 3 +
> src/PVE/API2/Network/SDN/Nodes/Status.pm | 42 +++-
> src/PVE/API2/Network/SDN/Zones.pm | 8 +-
> src/PVE/Network/SDN/Dhcp.pm | 87 +++++++-
> src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 3 +-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 187 ++++++++++++++++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Dhcp/Plugin.pm | 6 +
> src/PVE/Network/SDN/Ipams.pm | 24 ++-
> src/PVE/Network/SDN/SubnetPlugin.pm | 9 +
> src/PVE/Network/SDN/Zones.pm | 3 +
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 +
> src/test/run_test_vnets_blackbox.pl | 231 ++++++++++++++++++++++
> 17 files changed, 619 insertions(+), 11 deletions(-)
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
>
>
> pve-manager:
>
> Hannes Laimer (1):
> ui: sdn: dhcp backend selector on all zones, expose dhcp options
>
> www/manager6/sdn/SubnetEdit.js | 24 ++++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 3 files changed, 41 insertions(+), 11 deletions(-)
>
>
> Summary over all repositories:
> 33 files changed, 2077 insertions(+), 23 deletions(-)
>
^ permalink raw reply [relevance 7%]
* [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v3 00/17] sdn: implement DHCP for all zones using eBPF
@ 2026-10-20 7:59 11% Hannes Laimer
2026-10-20 13:11 12% ` Stefan Hanreich
2026-10-21 8:46 7% ` superseded: " Hannes Laimer
0 siblings, 2 replies; 25+ results
From: Hannes Laimer @ 2026-10-20 7:59 UTC (permalink / raw)
To: pve-devel
This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
picks its backend. dnsmasq stays limited to simple zones, while ebpf
answers on the guest's own interface and works on every zone type. A
guest on a zone with the ebpf backend gets the address its NIC has in
the IPAM. There is no daemon per zone and no lease file. The answers
are held in the kernel and do not depend on the IPAM being reachable.
The responder is a BPF program on the ingress of each guest interface
of a zone with the ebpf backend. It answers a request from the record
of that interface, and the exchange never reaches the bridge. A
request whose client MAC is not the interface's own passes on
unanswered. So a guest cannot read another guest's record, and a
nested client does not get the outer guest's address.
An edit through /cluster/sdn/vnets/{vnet}/ips reaches the guest's node
by a detached call to a new node endpoint, POST
/nodes/{node}/sdn/dhcp-mapping. The guest sees the change at its next
renewal, so the lease time bounds how long an old answer survives.
Subnets get a dhcp-lease-time property for both backends. Without it
dnsmasq hands out infinite leases and the responder ten minutes. A
failed push is logged in the journal, and the responder on the guest's
node catches up at the node's next apply or the guest's next start. An
apply also attaches the responder to running guests, so a zone
switched to ebpf serves them without a restart.
Changes reach the kernel in the order they read their input. So no
change overwrites a newer one with older input. A hotplug moves the
interface before the guest config names the new bridge. An apply or an
edit that read the older config in between leaves the moved interface
as its plug left it. A change that fails only warns, and what was
served stays served. Nothing of the responder survives a reboot, so it
is loaded again at boot before the guests start.
Only DHCPv4 is answered. A request the guest tagged itself passes
unanswered as well, so a trunk port keeps working as before. The
request is answered on the guest interface, so the guest's firewall
rules, its DHCP firewall option and its rate limit do not apply to it.
The reply leaves through the interface's egress, where the rate limit
shapes it. A request the responder does not answer passes on to the
bridge and through the firewall as before. Mappings changed directly
in an external IPAM are not picked up, as with dnsmasq.
In patch order, the series adds
- proxmox-ebpf, the dhcp subsystem, a tc program answering on the
guest interface and the per-interface map it answers from
- pve-rs, the bindings
- pve-network, the ebpf backend, the hooks that keep a backend current
when a guest interface or a mapping changes, dhcp on every zone
type, and fixes to the dnsmasq reservations and the MAC cache
- qemu-server and pve-container, the reports of a guest NIC coming,
going or moving, and for VMs the push at a migration's resume
- pve-manager, the backend and subnet options in the UI, and the
backends brought up at boot ahead of the guests
- pve-docs, documentation
- proxmox-ebpf applies on top of the v4 of its own series [1]
- pve-rs needs proxmox-ebpf with the dhcp feature
- pve-network needs pve-rs, at build and run time
- qemu-server, pve-container and pve-manager need pve-network
An older pve-network fails its apply on the unknown backend, so every
node needs the new one before a zone gets ebpf.
Changes since v2:
* drop the generation counter. Every change takes the responder's
lock before it reads its input instead. An edit takes it
exclusively
* the resume at the end of a live migration pushes the guest's
mappings again on the target, so an edit made during the migration
reaches it
* new first pve-network commit, a dnsmasq fix that replaces a stale
reservation of another MAC instead of dropping it
* no MTU option for a zone without an MTU, where v2 handed out 1500
* a mapping edit without a MAC no longer reaches the backends
* rewrite commit messages, cover letter and parts of the docs
* rebase onto current master
(pre-build packages on sani)
[1] https://lore.proxmox.com/pve-devel/20261019142413.2255644-1-h.laimer@proxmox.com/
proxmox-ebpf:
Hannes Laimer (2):
dhcp: add the per-tap DHCPv4 responder program
dhcp: add the subsystem that loads the responder and keeps its records
Cargo.toml | 5 +
debian/control | 6 +-
src/bpf-shim/bpf/bpf_helpers.h | 3 +
src/bpf-shim/vmlinux.h | 1 +
src/dhcp/bpf/dhcp.bpf.c | 401 +++++++++++++
src/dhcp/bpf/types.h | 24 +
src/dhcp/mod.rs | 1031 ++++++++++++++++++++++++++++++++
src/dhcp/types.rs | 64 ++
src/lib.rs | 3 +
src/subsystem.rs | 2 +-
tests/common/mod.rs | 63 +-
tests/dhcp.rs | 825 +++++++++++++++++++++++++
12 files changed, 2422 insertions(+), 6 deletions(-)
create mode 100644 src/dhcp/bpf/dhcp.bpf.c
create mode 100644 src/dhcp/bpf/types.h
create mode 100644 src/dhcp/mod.rs
create mode 100644 src/dhcp/types.rs
create mode 100644 tests/dhcp.rs
proxmox-perl-rs:
Hannes Laimer (1):
pve-rs: sdn: add bindings for the eBPF DHCP responder
pve-rs/Cargo.toml | 2 +
pve-rs/Makefile | 3 +
pve-rs/debian/control | 2 +
pve-rs/src/bindings/sdn/dhcp.rs | 229 ++++++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
5 files changed, 237 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
pve-network:
Hannes Laimer (9):
sdn: dhcp: replace a stale dnsmasq reservation instead of dropping it
sdn: dhcp: update reservations when ip mappings change
sdn: ipam: key the MAC cache by lower-case MAC, stop caching misses
sdn: dhcp: make the lease time configurable per subnet
sdn: dhcp: require a backend only if a zone on this node uses it
sdn: dhcp: add an eBPF backend answering on each guest interface
sdn: zones: report interface plugs and unplugs to the DHCP backends
sdn: dhcp: push IP mapping edits to the guest's node
sdn: zones: allow the ebpf DHCP backend on every zone type
debian/libpve-network-perl.prerm | 13 +
src/PVE/API2/Network/SDN/Ips.pm | 10 +
src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 +
src/PVE/API2/Network/SDN/Zones.pm | 11 +-
src/PVE/Network/SDN/Dhcp.pm | 200 ++-
src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 114 +-
src/PVE/Network/SDN/Dhcp/Ebpf.pm | 308 +++++
src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
src/PVE/Network/SDN/Dhcp/Plugin.pm | 26 +-
src/PVE/Network/SDN/Ipams.pm | 61 +-
src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
src/PVE/Network/SDN/Vnets.pm | 5 +-
src/PVE/Network/SDN/Zones.pm | 29 +-
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 32 +
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 25 +
src/test/run_test_vnets_blackbox.pl | 1442 ++++++++++++++++++++-
20 files changed, 2263 insertions(+), 80 deletions(-)
create mode 100755 debian/libpve-network-perl.prerm
create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
qemu-server:
Hannes Laimer (1):
network: sdn: keep the DHCP backends current on guest NICs
src/PVE/CLI/qm.pm | 4 ++--
src/PVE/QemuServer.pm | 4 ++++
src/PVE/QemuServer/Network.pm | 19 +++++++++++++++++--
src/PVE/QemuServer/RunState.pm | 2 ++
src/usr/pve-bridge | 8 +++++++-
src/usr/pve-bridgedown | 4 ++--
6 files changed, 34 insertions(+), 7 deletions(-)
pve-container:
Hannes Laimer (1):
net: report NIC plugs and removals to the SDN DHCP backends
src/PVE/LXC.pm | 13 +++++++++++--
src/PVE/LXC/Config.pm | 3 ++-
src/lxc-pve-poststop-hook | 6 +++---
3 files changed, 16 insertions(+), 6 deletions(-)
pve-manager:
Hannes Laimer (2):
ui: sdn: add zone DHCP backend selector and subnet DHCP options
sdn: bring up the DHCP backends at boot before the guests start
bin/pve-sdn-commit | 3 +++
services/pve-sdn-commit.service | 1 +
www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
5 files changed, 44 insertions(+), 11 deletions(-)
pve-docs:
Hannes Laimer (1):
sdn: dhcp: add eBPF backend section
pvesdn.adoc | 101 ++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 83 insertions(+), 18 deletions(-)
Summary over all repositories:
52 files changed, 5099 insertions(+), 128 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 11%]
* superseded: [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v2 00/16] sdn: implement DHCP for all zones using eBPF
2026-09-09 10:41 10% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v2 00/16] " Hannes Laimer
2026-09-09 10:41 23% ` [PATCH pve-network v2 11/16] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
@ 2026-10-20 8:01 7% ` Hannes Laimer
1 sibling, 0 replies; 25+ results
From: Hannes Laimer @ 2026-10-20 8:01 UTC (permalink / raw)
To: pve-devel
superseded-by:
https://lore.proxmox.com/pve-devel/20261020080005.470757-1-h.laimer@proxmox.com/
On 2026-09-09 12:42, Hannes Laimer wrote:
> Adds a second DHCP backend, `ebpf`, next to dnsmasq, selectable per
> zone. It aims to replace dnsmasq eventually and keeping both for now
> makes a migration simple. Every zone type can enable DHCP and the UI
> offers the selector on the zone types it edits. `dnsmasq` stays limited
> to simple zones.
>
> The responder lives in proxmox-ebpf [1]. The two patches for it apply
> on top of the v3 of that series, which follows separately. pve-rs gains
> a build dependency on the librust-proxmox-ebpf-dev it provides.
> pve-network needs this series' pve-rs at build time and at run time.
> qemu-server needs this series' pve-network as a Depends. pve-container
> works without the package and needs a Breaks on the older versions.
> Both pve-manager patches need it as well.
>
> # On the tap
>
> An eBPF program on the ingress of every guest tap on a vnet of an ebpf
> zone parses DHCP requests. It looks the interface up in an
> interface -> ip+options map and turns the request into the reply in
> place, back out of the tap. The exchange never reaches the bridge.
> Everything else passes untouched to the bridge and through the firewall
> as before. The answer is the interface's and only a request carrying
> its NIC's MAC gets it. Another MAC is passed on unanswered. So no guest
> can read another one's record by asking with its MAC, and a nested
> client is not handed the outer guest's address. Equal subnets in two
> zones do not mix either, each interface is answered from its own vnet's
> subnet.
>
> # The records and who writes them
>
> IPAM is the source and the map holds the answer of every guest
> interface on the node. A record change writes the records of the MAC's
> interfaces here. A tap plug attaches its interface with its record and
> an unplug drops it. All of that runs under a shared lock. The full pass
> builds the desired state from the configs, every guest NIC in the
> cluster with the vnet it sits on and the answer its MAC gets there from
> the MAC cache. The responder gives every listed interface present here
> its record, and a link where it is served. An interface the configs
> serve without a mapping gets a marker, so a plug that read the cache
> before the mapping went loses to it. It leaves a linked interface the
> configs do not name yet alone, since a hotplug plugs before it writes
> the config. It drops what a crashed guest left. A link on an interface
> without a record is harmless, the program passes everything there. So
> nothing is lost by attaching first and answering once the record is in.
> A pass failing midway warns in its task, and what was served keeps
> being served meanwhile. A change drawn before it is dropped, the next
> apply carries its input.
>
> - a guest start, NIC hotplug or migration allocates the record before
> the interface is plugged. Then a new tap plug hook of the dhcp
> plugins attaches the program, and a stop or unplug detaches it
> - a mapping created, updated or deleted through the API is written by
> the editing node. That node pokes the node running the guest through
> a new node endpoint (POST /nodes/{node}/sdn/dhcp-mapping) with a
> detached pvesh call, proxied over ssh like pvesh does. An
> unreachable node catches up on its next apply
> - an SDN apply runs the full pass and refreshes the programs, so a
> schema rebuild is refilled and a zone switching its backend takes
> effect for its running guests that hold a mapping as well
> - after a boot nothing is pinned, so the SDN commit brings the
> responder back before the guests start. A change that still finds
> nothing loaded runs the full pass itself
>
> # Ordering
>
> Nothing forces the collection of that state into one order, so every
> change carries a generation, a per-node counter the responder hands
> out. There is one rule. A change draws after its input is written and
> a reader before it reads. So two changes are ordered by the input they
> saw and not by when they reach the kernel.
>
> Who draws when:
> - record change after the IPAM record and the cache are written
> - full pass before it reads the configs and the cache
> - tap plug before it reads the cache. Its number orders the
> cache read and says nothing about the guest config,
> which is not written yet
>
> What the number decides:
> - record keeps the generation that wrote it, an older change
> never overwrites it. A removal by a record change
> leaves a marker with its generation for the same
> reason
> - full pass records its generation before it runs, so an older
> pass is dropped. It leaves alone every record a
> newer change wrote since it read its input
>
> Links carry no generation. The configs decide about the interfaces they
> name, a linked interface they do not name is left alone. So a hotplug's
> plug survives a pass that read the config before the write.
>
> A generation cannot order a pass against a hotplug that moves a tap
> between bridges. The plug runs before the guest config names the new
> bridge, so a pass in between reads the old one. That is why every
> record also names the vnet its writer saw the tap on.
>
> What the vnet decides:
> - pass, record change leave an entry alone that names another vnet
> than their config does, their config is stale
> for that tap. The pass lets the link follow
> the entry
> - tap plug replaces such an entry. Plugs of one tap are
> serialized by the guest lock, so the plug is
> the latest word on where it sits. On its own
> vnet it compares by generation like any other
> change. A plug finding no entry writes, a pass
> that stamped meanwhile never saw its interface
> - plug elsewhere a tap moved onto a plain bridge or a zone of
> another backend trades its entry for a marker
> naming that place. So a pass still reading
> the old vnet leaves it alone, and one reading
> the new place keeps it as it is. A tap without
> an entry gets none
> - tap unplug drops the entry with the link, the tap is
> gone or about to be. A tap with neither a
> link nor an interface left leaves its entry
> to the next pass
>
> The counter lives under /run and restarts with the node like
> everything it orders.
>
> # What a guest sees
>
> A changed mapping reaches a running guest at its next renewal, so the
> lease time bounds how long an old answer survives. A deleted one is no
> longer answered, the guest keeps its address until the lease runs out.
> Subnets get a `dhcp-lease-time` property, used by both backends.
> Without it dnsmasq keeps handing out infinite leases and the responder
> defaults to ten minutes.
>
> Since the request is answered on the tap, neither the firewall nor the
> rate limit of the interface sees it. So neither the guest's rules nor
> its DHCP firewall option nor the rate limit apply to an answered
> request. The reply is put on the tap's egress, so the rate limit shapes
> it and the firewall never sees it.
>
> The responder identifies itself with the subnet gateway. A subnet
> without one is served under a link-local identifier and without a
> default route, its guests renew by broadcast at rebinding time. It
> hands out an IPv4 DNS server only, an IPv6 one on a v4 subnet is left
> out. A guest tagging its own requests is not answered either, so a
> trunk port keeps working as before. Only DHCPv4 for now, but adding v6
> is very possible once we are happy with the design.
>
> Changes made directly on an external IPAM service are not detectable
> and the answers are cached per MAC. So an apply does not pick them up
> either, exactly like with dnsmasq today.
>
> note on the earlier versions: The main problem was that a tap plug ran
> on information not in the config yet, only pending. This allowed a race
> between the tap plug hook updating the kernel state and a fast enough
> SDN apply undoing it again, and a few other subtleties. This version
> should address all of these properly. Sorry for the noise with the other
> two versions, both the result of me spotting the problem too late and
> being too fast in assuming I had solved it.
>
>
> [1] https://lore.proxmox.com/pve-devel/20260909103952.1108084-1-h.laimer@proxmox.com/T/#t
>
>
> proxmox-ebpf:
>
> Hannes Laimer (2):
> dhcp: add per-tap responder BPF program
> dhcp: add responder subsystem
>
> Cargo.toml | 5 +
> debian/control | 6 +-
> src/bpf-shim/bpf/bpf_helpers.h | 3 +
> src/bpf-shim/vmlinux.h | 1 +
> src/dhcp/bpf/dhcp.bpf.c | 405 ++++++++++++
> src/dhcp/bpf/types.h | 25 +
> src/dhcp/mod.rs | 1113 ++++++++++++++++++++++++++++++++
> src/dhcp/types.rs | 80 +++
> src/lib.rs | 3 +
> tests/common/mod.rs | 63 +-
> tests/dhcp.rs | 827 ++++++++++++++++++++++++
> 11 files changed, 2526 insertions(+), 5 deletions(-)
> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 src/dhcp/bpf/types.h
> create mode 100644 src/dhcp/mod.rs
> create mode 100644 src/dhcp/types.rs
> create mode 100644 tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add dhcp responder bindings
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 1 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 162 ++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 168 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (8):
> sdn: push mapping changes from the ipam API to the dhcp backend
> sdn: ipam: do not cache negative per-MAC answers, lock the write
> sdn: subnets: add dhcp-lease-time property
> sdn: dhcp: only assert a backend's availability for zones using it
> sdn: dhcp: add ebpf plugin
> sdn: zones: attach the dhcp responder on tap plug, detach on unplug
> sdn: dhcp: apply mapping edits on the node serving the guest
> sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only
>
> debian/libpve-network-perl.prerm | 13 +
> src/PVE/API2/Network/SDN/Ips.pm | 10 +
> src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 +
> src/PVE/API2/Network/SDN/Zones.pm | 11 +-
> src/PVE/Network/SDN/Dhcp.pm | 202 ++-
> src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 104 +-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 355 ++++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Dhcp/Plugin.pm | 25 +-
> src/PVE/Network/SDN/Ipams.pm | 61 +-
> src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
> src/PVE/Network/SDN/Vnets.pm | 5 +-
> src/PVE/Network/SDN/Zones.pm | 31 +-
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 32 +
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 25 +
> src/test/run_test_vnets_blackbox.pl | 1361 ++++++++++++++++++++-
> 20 files changed, 2223 insertions(+), 79 deletions(-)
> create mode 100755 debian/libpve-network-perl.prerm
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
>
>
> qemu-server:
>
> Hannes Laimer (1):
> network: report NIC plug and unplug to SDN with the MAC
>
> src/PVE/CLI/qm.pm | 4 ++--
> src/PVE/QemuServer.pm | 4 ++++
> src/PVE/QemuServer/Network.pm | 4 ++--
> src/usr/pve-bridge | 8 +++++++-
> src/usr/pve-bridgedown | 4 ++--
> 5 files changed, 17 insertions(+), 7 deletions(-)
>
>
> pve-container:
>
> Hannes Laimer (1):
> net: report veth plug and unplug to SDN with the hwaddr
>
> src/PVE/LXC.pm | 24 ++++++++++++++++++++++--
> src/PVE/LXC/Config.pm | 2 +-
> src/lxc-pve-poststop-hook | 5 ++---
> 3 files changed, 25 insertions(+), 6 deletions(-)
>
>
> pve-manager:
>
> Hannes Laimer (2):
> ui: sdn: dhcp backend selector on all zones, expose dhcp options
> sdn: bring the dhcp backends up at boot before the guests start
>
> bin/pve-sdn-commit | 3 +++
> services/pve-sdn-commit.service | 3 ++-
> www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 5 files changed, 45 insertions(+), 12 deletions(-)
>
>
> pve-docs:
>
> Hannes Laimer (1):
> sdn: dhcp: document the ebpf backend
>
> pvesdn.adoc | 113 +++++++++++++++++++++++++++++++++++++++++++---------
> 1 file changed, 95 insertions(+), 18 deletions(-)
>
>
> Summary over all repositories:
> 50 files changed, 5099 insertions(+), 127 deletions(-)
>
^ permalink raw reply [relevance 7%]
* Re: [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v3 00/17] sdn: implement DHCP for all zones using eBPF
2026-10-20 7:59 11% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v3 00/17] " Hannes Laimer
@ 2026-10-20 13:11 12% ` Stefan Hanreich
2026-10-21 7:35 7% ` Hannes Laimer
2026-10-21 8:46 7% ` superseded: " Hannes Laimer
1 sibling, 1 reply; 25+ results
From: Stefan Hanreich @ 2026-10-20 13:11 UTC (permalink / raw)
To: pve-devel
Did some testing:
* PVE IPAM / All zones / eBPF backend
* PVE IPAM / Simple zone / dnsmasq backend
* Netbox IPAM / All zones / eBPF backend
* Netbox IPAM / Simple zone / dnsmasq backend
* switching from dnsmasq -> eBPF and vice-versa
-> pre-existing: dnsmasq doesn't clean its config folder
* changing bridge on network devices
* changing subnets on the vnet and then reacquiring a lease
Everything worked really well, also the pre-existing dnsmasq zone. This
revision seems a lot nicer already without the generation counter, which
seemed a bit clunky. This is a more elegant solution imo.
One thing I found:
The new DHCP backend type needs to be added to proxmox-ve-rs as well,
otherwise the config fails to parse (firewall). We should add fallback
variants there...
for code-related stuff see the respective patches.
On 10/20/26 10:00 AM, Hannes Laimer wrote:
> This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
> picks its backend. dnsmasq stays limited to simple zones, while ebpf
> answers on the guest's own interface and works on every zone type. A
> guest on a zone with the ebpf backend gets the address its NIC has in
> the IPAM. There is no daemon per zone and no lease file. The answers
> are held in the kernel and do not depend on the IPAM being reachable.
>
> The responder is a BPF program on the ingress of each guest interface
> of a zone with the ebpf backend. It answers a request from the record
> of that interface, and the exchange never reaches the bridge. A
> request whose client MAC is not the interface's own passes on
> unanswered. So a guest cannot read another guest's record, and a
> nested client does not get the outer guest's address.
>
> An edit through /cluster/sdn/vnets/{vnet}/ips reaches the guest's node
> by a detached call to a new node endpoint, POST
> /nodes/{node}/sdn/dhcp-mapping. The guest sees the change at its next
> renewal, so the lease time bounds how long an old answer survives.
> Subnets get a dhcp-lease-time property for both backends. Without it
> dnsmasq hands out infinite leases and the responder ten minutes. A
> failed push is logged in the journal, and the responder on the guest's
> node catches up at the node's next apply or the guest's next start. An
> apply also attaches the responder to running guests, so a zone
> switched to ebpf serves them without a restart.
>
> Changes reach the kernel in the order they read their input. So no
> change overwrites a newer one with older input. A hotplug moves the
> interface before the guest config names the new bridge. An apply or an
> edit that read the older config in between leaves the moved interface
> as its plug left it. A change that fails only warns, and what was
> served stays served. Nothing of the responder survives a reboot, so it
> is loaded again at boot before the guests start.
>
> Only DHCPv4 is answered. A request the guest tagged itself passes
> unanswered as well, so a trunk port keeps working as before. The
> request is answered on the guest interface, so the guest's firewall
> rules, its DHCP firewall option and its rate limit do not apply to it.
> The reply leaves through the interface's egress, where the rate limit
> shapes it. A request the responder does not answer passes on to the
> bridge and through the firewall as before. Mappings changed directly
> in an external IPAM are not picked up, as with dnsmasq.
>
> In patch order, the series adds
> - proxmox-ebpf, the dhcp subsystem, a tc program answering on the
> guest interface and the per-interface map it answers from
> - pve-rs, the bindings
> - pve-network, the ebpf backend, the hooks that keep a backend current
> when a guest interface or a mapping changes, dhcp on every zone
> type, and fixes to the dnsmasq reservations and the MAC cache
> - qemu-server and pve-container, the reports of a guest NIC coming,
> going or moving, and for VMs the push at a migration's resume
> - pve-manager, the backend and subnet options in the UI, and the
> backends brought up at boot ahead of the guests
> - pve-docs, documentation
>
> - proxmox-ebpf applies on top of the v4 of its own series [1]
> - pve-rs needs proxmox-ebpf with the dhcp feature
> - pve-network needs pve-rs, at build and run time
> - qemu-server, pve-container and pve-manager need pve-network
> An older pve-network fails its apply on the unknown backend, so every
> node needs the new one before a zone gets ebpf.
>
> Changes since v2:
> * drop the generation counter. Every change takes the responder's
> lock before it reads its input instead. An edit takes it
> exclusively
> * the resume at the end of a live migration pushes the guest's
> mappings again on the target, so an edit made during the migration
> reaches it
> * new first pve-network commit, a dnsmasq fix that replaces a stale
> reservation of another MAC instead of dropping it
> * no MTU option for a zone without an MTU, where v2 handed out 1500
> * a mapping edit without a MAC no longer reaches the backends
> * rewrite commit messages, cover letter and parts of the docs
> * rebase onto current master
>
> (pre-build packages on sani)
>
> [1] https://lore.proxmox.com/pve-devel/20261019142413.2255644-1-h.laimer@proxmox.com/
>
>
> proxmox-ebpf:
>
> Hannes Laimer (2):
> dhcp: add the per-tap DHCPv4 responder program
> dhcp: add the subsystem that loads the responder and keeps its records
>
> Cargo.toml | 5 +
> debian/control | 6 +-
> src/bpf-shim/bpf/bpf_helpers.h | 3 +
> src/bpf-shim/vmlinux.h | 1 +
> src/dhcp/bpf/dhcp.bpf.c | 401 +++++++++++++
> src/dhcp/bpf/types.h | 24 +
> src/dhcp/mod.rs | 1031 ++++++++++++++++++++++++++++++++
> src/dhcp/types.rs | 64 ++
> src/lib.rs | 3 +
> src/subsystem.rs | 2 +-
> tests/common/mod.rs | 63 +-
> tests/dhcp.rs | 825 +++++++++++++++++++++++++
> 12 files changed, 2422 insertions(+), 6 deletions(-)
> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 src/dhcp/bpf/types.h
> create mode 100644 src/dhcp/mod.rs
> create mode 100644 src/dhcp/types.rs
> create mode 100644 tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add bindings for the eBPF DHCP responder
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 3 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 229 ++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 237 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (9):
> sdn: dhcp: replace a stale dnsmasq reservation instead of dropping it
> sdn: dhcp: update reservations when ip mappings change
> sdn: ipam: key the MAC cache by lower-case MAC, stop caching misses
> sdn: dhcp: make the lease time configurable per subnet
> sdn: dhcp: require a backend only if a zone on this node uses it
> sdn: dhcp: add an eBPF backend answering on each guest interface
> sdn: zones: report interface plugs and unplugs to the DHCP backends
> sdn: dhcp: push IP mapping edits to the guest's node
> sdn: zones: allow the ebpf DHCP backend on every zone type
>
> debian/libpve-network-perl.prerm | 13 +
> src/PVE/API2/Network/SDN/Ips.pm | 10 +
> src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 +
> src/PVE/API2/Network/SDN/Zones.pm | 11 +-
> src/PVE/Network/SDN/Dhcp.pm | 200 ++-
> src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 114 +-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 308 +++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Dhcp/Plugin.pm | 26 +-
> src/PVE/Network/SDN/Ipams.pm | 61 +-
> src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
> src/PVE/Network/SDN/Vnets.pm | 5 +-
> src/PVE/Network/SDN/Zones.pm | 29 +-
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 32 +
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 25 +
> src/test/run_test_vnets_blackbox.pl | 1442 ++++++++++++++++++++-
> 20 files changed, 2263 insertions(+), 80 deletions(-)
> create mode 100755 debian/libpve-network-perl.prerm
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
>
>
> qemu-server:
>
> Hannes Laimer (1):
> network: sdn: keep the DHCP backends current on guest NICs
>
> src/PVE/CLI/qm.pm | 4 ++--
> src/PVE/QemuServer.pm | 4 ++++
> src/PVE/QemuServer/Network.pm | 19 +++++++++++++++++--
> src/PVE/QemuServer/RunState.pm | 2 ++
> src/usr/pve-bridge | 8 +++++++-
> src/usr/pve-bridgedown | 4 ++--
> 6 files changed, 34 insertions(+), 7 deletions(-)
>
>
> pve-container:
>
> Hannes Laimer (1):
> net: report NIC plugs and removals to the SDN DHCP backends
>
> src/PVE/LXC.pm | 13 +++++++++++--
> src/PVE/LXC/Config.pm | 3 ++-
> src/lxc-pve-poststop-hook | 6 +++---
> 3 files changed, 16 insertions(+), 6 deletions(-)
>
>
> pve-manager:
>
> Hannes Laimer (2):
> ui: sdn: add zone DHCP backend selector and subnet DHCP options
> sdn: bring up the DHCP backends at boot before the guests start
>
> bin/pve-sdn-commit | 3 +++
> services/pve-sdn-commit.service | 1 +
> www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 5 files changed, 44 insertions(+), 11 deletions(-)
>
>
> pve-docs:
>
> Hannes Laimer (1):
> sdn: dhcp: add eBPF backend section
>
> pvesdn.adoc | 101 ++++++++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 83 insertions(+), 18 deletions(-)
>
>
> Summary over all repositories:
> 52 files changed, 5099 insertions(+), 128 deletions(-)
>
^ permalink raw reply [relevance 12%]
* Re: [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v3 00/17] sdn: implement DHCP for all zones using eBPF
2026-10-20 13:11 12% ` Stefan Hanreich
@ 2026-10-21 7:35 7% ` Hannes Laimer
0 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-10-21 7:35 UTC (permalink / raw)
To: Stefan Hanreich, pve-devel
On 2026-10-20 15:11, Stefan Hanreich wrote:
> Did some testing:
>
> * PVE IPAM / All zones / eBPF backend
> * PVE IPAM / Simple zone / dnsmasq backend
> * Netbox IPAM / All zones / eBPF backend
> * Netbox IPAM / Simple zone / dnsmasq backend
> * switching from dnsmasq -> eBPF and vice-versa
> -> pre-existing: dnsmasq doesn't clean its config folder
> * changing bridge on network devices
> * changing subnets on the vnet and then reacquiring a lease
>
> Everything worked really well, also the pre-existing dnsmasq zone. This
> revision seems a lot nicer already without the generation counter, which
> seemed a bit clunky. This is a more elegant solution imo.
>
> One thing I found:
>
> The new DHCP backend type needs to be added to proxmox-ve-rs as well,
> otherwise the config fails to parse (firewall). We should add fallback
> variants there...
could have caught that :) thanks!
>
> for code-related stuff see the respective patches.
Thanks for taking a look and the feedback! I'll prepare a v4
>
> On 10/20/26 10:00 AM, Hannes Laimer wrote:
>> This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
>> picks its backend. dnsmasq stays limited to simple zones, while ebpf
>> answers on the guest's own interface and works on every zone type. A
>> guest on a zone with the ebpf backend gets the address its NIC has in
>> the IPAM. There is no daemon per zone and no lease file. The answers
>> are held in the kernel and do not depend on the IPAM being reachable.
>>
>> The responder is a BPF program on the ingress of each guest interface
>> of a zone with the ebpf backend. It answers a request from the record
>> of that interface, and the exchange never reaches the bridge. A
>> request whose client MAC is not the interface's own passes on
>> unanswered. So a guest cannot read another guest's record, and a
>> nested client does not get the outer guest's address.
>>
>> An edit through /cluster/sdn/vnets/{vnet}/ips reaches the guest's node
>> by a detached call to a new node endpoint, POST
>> /nodes/{node}/sdn/dhcp-mapping. The guest sees the change at its next
>> renewal, so the lease time bounds how long an old answer survives.
>> Subnets get a dhcp-lease-time property for both backends. Without it
>> dnsmasq hands out infinite leases and the responder ten minutes. A
>> failed push is logged in the journal, and the responder on the guest's
>> node catches up at the node's next apply or the guest's next start. An
>> apply also attaches the responder to running guests, so a zone
>> switched to ebpf serves them without a restart.
>>
>> Changes reach the kernel in the order they read their input. So no
>> change overwrites a newer one with older input. A hotplug moves the
>> interface before the guest config names the new bridge. An apply or an
>> edit that read the older config in between leaves the moved interface
>> as its plug left it. A change that fails only warns, and what was
>> served stays served. Nothing of the responder survives a reboot, so it
>> is loaded again at boot before the guests start.
>>
>> Only DHCPv4 is answered. A request the guest tagged itself passes
>> unanswered as well, so a trunk port keeps working as before. The
>> request is answered on the guest interface, so the guest's firewall
>> rules, its DHCP firewall option and its rate limit do not apply to it.
>> The reply leaves through the interface's egress, where the rate limit
>> shapes it. A request the responder does not answer passes on to the
>> bridge and through the firewall as before. Mappings changed directly
>> in an external IPAM are not picked up, as with dnsmasq.
>>
>> In patch order, the series adds
>> - proxmox-ebpf, the dhcp subsystem, a tc program answering on the
>> guest interface and the per-interface map it answers from
>> - pve-rs, the bindings
>> - pve-network, the ebpf backend, the hooks that keep a backend current
>> when a guest interface or a mapping changes, dhcp on every zone
>> type, and fixes to the dnsmasq reservations and the MAC cache
>> - qemu-server and pve-container, the reports of a guest NIC coming,
>> going or moving, and for VMs the push at a migration's resume
>> - pve-manager, the backend and subnet options in the UI, and the
>> backends brought up at boot ahead of the guests
>> - pve-docs, documentation
>>
>> - proxmox-ebpf applies on top of the v4 of its own series [1]
>> - pve-rs needs proxmox-ebpf with the dhcp feature
>> - pve-network needs pve-rs, at build and run time
>> - qemu-server, pve-container and pve-manager need pve-network
>> An older pve-network fails its apply on the unknown backend, so every
>> node needs the new one before a zone gets ebpf.
>>
>> Changes since v2:
>> * drop the generation counter. Every change takes the responder's
>> lock before it reads its input instead. An edit takes it
>> exclusively
>> * the resume at the end of a live migration pushes the guest's
>> mappings again on the target, so an edit made during the migration
>> reaches it
>> * new first pve-network commit, a dnsmasq fix that replaces a stale
>> reservation of another MAC instead of dropping it
>> * no MTU option for a zone without an MTU, where v2 handed out 1500
>> * a mapping edit without a MAC no longer reaches the backends
>> * rewrite commit messages, cover letter and parts of the docs
>> * rebase onto current master
>>
>> (pre-build packages on sani)
>>
>> [1] https://lore.proxmox.com/pve-devel/20261019142413.2255644-1-h.laimer@proxmox.com/
>>
>>
>> proxmox-ebpf:
>>
>> Hannes Laimer (2):
>> dhcp: add the per-tap DHCPv4 responder program
>> dhcp: add the subsystem that loads the responder and keeps its records
>>
>> Cargo.toml | 5 +
>> debian/control | 6 +-
>> src/bpf-shim/bpf/bpf_helpers.h | 3 +
>> src/bpf-shim/vmlinux.h | 1 +
>> src/dhcp/bpf/dhcp.bpf.c | 401 +++++++++++++
>> src/dhcp/bpf/types.h | 24 +
>> src/dhcp/mod.rs | 1031 ++++++++++++++++++++++++++++++++
>> src/dhcp/types.rs | 64 ++
>> src/lib.rs | 3 +
>> src/subsystem.rs | 2 +-
>> tests/common/mod.rs | 63 +-
>> tests/dhcp.rs | 825 +++++++++++++++++++++++++
>> 12 files changed, 2422 insertions(+), 6 deletions(-)
>> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
>> create mode 100644 src/dhcp/bpf/types.h
>> create mode 100644 src/dhcp/mod.rs
>> create mode 100644 src/dhcp/types.rs
>> create mode 100644 tests/dhcp.rs
>>
>>
>> proxmox-perl-rs:
>>
>> Hannes Laimer (1):
>> pve-rs: sdn: add bindings for the eBPF DHCP responder
>>
>> pve-rs/Cargo.toml | 2 +
>> pve-rs/Makefile | 3 +
>> pve-rs/debian/control | 2 +
>> pve-rs/src/bindings/sdn/dhcp.rs | 229 ++++++++++++++++++++++++++++++++
>> pve-rs/src/bindings/sdn/mod.rs | 1 +
>> 5 files changed, 237 insertions(+)
>> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>>
>>
>> pve-network:
>>
>> Hannes Laimer (9):
>> sdn: dhcp: replace a stale dnsmasq reservation instead of dropping it
>> sdn: dhcp: update reservations when ip mappings change
>> sdn: ipam: key the MAC cache by lower-case MAC, stop caching misses
>> sdn: dhcp: make the lease time configurable per subnet
>> sdn: dhcp: require a backend only if a zone on this node uses it
>> sdn: dhcp: add an eBPF backend answering on each guest interface
>> sdn: zones: report interface plugs and unplugs to the DHCP backends
>> sdn: dhcp: push IP mapping edits to the guest's node
>> sdn: zones: allow the ebpf DHCP backend on every zone type
>>
>> debian/libpve-network-perl.prerm | 13 +
>> src/PVE/API2/Network/SDN/Ips.pm | 10 +
>> src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 +
>> src/PVE/API2/Network/SDN/Zones.pm | 11 +-
>> src/PVE/Network/SDN/Dhcp.pm | 200 ++-
>> src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 114 +-
>> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 308 +++++
>> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
>> src/PVE/Network/SDN/Dhcp/Plugin.pm | 26 +-
>> src/PVE/Network/SDN/Ipams.pm | 61 +-
>> src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
>> src/PVE/Network/SDN/Vnets.pm | 5 +-
>> src/PVE/Network/SDN/Zones.pm | 29 +-
>> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 32 +
>> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
>> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
>> src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
>> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
>> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 25 +
>> src/test/run_test_vnets_blackbox.pl | 1442 ++++++++++++++++++++-
>> 20 files changed, 2263 insertions(+), 80 deletions(-)
>> create mode 100755 debian/libpve-network-perl.prerm
>> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
>>
>>
>> qemu-server:
>>
>> Hannes Laimer (1):
>> network: sdn: keep the DHCP backends current on guest NICs
>>
>> src/PVE/CLI/qm.pm | 4 ++--
>> src/PVE/QemuServer.pm | 4 ++++
>> src/PVE/QemuServer/Network.pm | 19 +++++++++++++++++--
>> src/PVE/QemuServer/RunState.pm | 2 ++
>> src/usr/pve-bridge | 8 +++++++-
>> src/usr/pve-bridgedown | 4 ++--
>> 6 files changed, 34 insertions(+), 7 deletions(-)
>>
>>
>> pve-container:
>>
>> Hannes Laimer (1):
>> net: report NIC plugs and removals to the SDN DHCP backends
>>
>> src/PVE/LXC.pm | 13 +++++++++++--
>> src/PVE/LXC/Config.pm | 3 ++-
>> src/lxc-pve-poststop-hook | 6 +++---
>> 3 files changed, 16 insertions(+), 6 deletions(-)
>>
>>
>> pve-manager:
>>
>> Hannes Laimer (2):
>> ui: sdn: add zone DHCP backend selector and subnet DHCP options
>> sdn: bring up the DHCP backends at boot before the guests start
>>
>> bin/pve-sdn-commit | 3 +++
>> services/pve-sdn-commit.service | 1 +
>> www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
>> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
>> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
>> 5 files changed, 44 insertions(+), 11 deletions(-)
>>
>>
>> pve-docs:
>>
>> Hannes Laimer (1):
>> sdn: dhcp: add eBPF backend section
>>
>> pvesdn.adoc | 101 ++++++++++++++++++++++++++++++++++++++++++----------
>> 1 file changed, 83 insertions(+), 18 deletions(-)
>>
>>
>> Summary over all repositories:
>> 52 files changed, 5099 insertions(+), 128 deletions(-)
>>
>
>
>
>
>
^ permalink raw reply [relevance 7%]
* [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs,-ve-rs}/qemu-server v4 00/20] sdn: implement DHCP for all zones using eBPF
@ 2026-10-21 8:44 11% Hannes Laimer
2026-11-02 15:19 7% ` superseded: " Hannes Laimer
0 siblings, 1 reply; 25+ results
From: Hannes Laimer @ 2026-10-21 8:44 UTC (permalink / raw)
To: pve-devel
This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
picks its backend. dnsmasq stays limited to simple zones, while ebpf
answers on the guest's own interface and works on every zone type. A
guest on a zone with the ebpf backend gets the address its NIC has in
the IPAM. There is no daemon per zone and no lease file. The answers
are held in the kernel and do not depend on the IPAM being reachable.
The responder is a BPF program on the ingress of each guest interface
of a zone with the ebpf backend. It answers a request from the record
of that interface, and the exchange never reaches the bridge. A
request whose client MAC is not the interface's own passes on
unanswered. So a guest cannot read another guest's record, and a
nested client does not get the outer guest's address.
An edit through /cluster/sdn/vnets/{vnet}/ips is proxied to the
guest's node and updates the backend there. The guest sees the change
at its next renewal, so the lease time bounds how long an old answer
survives. Subnets get a dhcp-lease-time property for both backends.
Without it dnsmasq hands out infinite leases and the responder ten
minutes. An apply attaches the responder to running guests, so a zone
switched to ebpf serves them without a restart.
Changes reach the kernel in the order they read their input. So no
change overwrites a newer one with older input. A hotplug moves the
interface before the guest config names the new bridge. An apply or an
edit that read the older config in between leaves the moved interface
as its plug left it. A change that fails only warns, and what was
served stays served. Nothing of the responder survives a reboot, so it
is loaded again at boot before the guests start.
Only DHCPv4 is answered. A request the guest tagged itself passes
unanswered as well, so a trunk port keeps working as before. The
request is answered on the guest interface, so the guest's firewall
rules, its DHCP firewall option and its rate limit do not apply to it.
The reply leaves through the interface's egress, where the rate limit
shapes it. A request the responder does not answer passes on to the
bridge and through the firewall as before. Mappings changed directly
in an external IPAM are not picked up, as with dnsmasq.
In patch order, the series adds
- proxmox-ebpf, the dhcp subsystem, a tc program answering on the
guest interface and the per-interface map it answers from
- pve-rs, the bindings
- pve-network, the ebpf backend, the hooks that keep a backend current
when a guest interface or a mapping changes, dhcp on every zone
type, and fixes to the dnsmasq reservations and the MAC cache
- qemu-server and pve-container, the reports of a guest NIC coming,
going or moving, and for VMs the push at a migration's resume
- pve-manager, the backend and subnet options in the UI, and the
backends brought up at boot ahead of the guests
- proxmox-ve-rs, the ebpf variant of the dhcp backend type
- pve-docs, documentation
- proxmox-ebpf applies on top of the v4 of its own series [1]
- pve-rs needs proxmox-ebpf with the dhcp feature
- pve-network needs pve-rs, at build and run time
- qemu-server, pve-container and pve-manager need pve-network
- proxmox-ve-config needs nothing, and proxmox-firewall needs its
dependency on it bumped, since an older one fails to parse a zone
with the ebpf backend and the firewall then cannot load its config
An older pve-network fails its apply on the unknown backend, so every
node needs the new one before a zone gets ebpf.
Changes since v3, thanks @Stefan!:
* a mapping edit runs on the guest's node instead of being pushed to
it, the node endpoint is gone
* the MAC cache is read and written with lower-case keys, and its
three fixes are three commits
* the guest NIC list is keyed by MAC
* add the missing proxmox-ve-rs patch, the ebpf variant of the dhcp
backend type
* reword log lines and warnings
* (notes on patches with changes)
Changes since v2:
* drop the generation counter. Every change takes the responder's
lock before it reads its input instead. An edit takes it
exclusively
* the resume at the end of a live migration pushes the guest's
mappings again on the target, so an edit made during the migration
reaches it
* new first pve-network commit, a dnsmasq fix that replaces a stale
reservation of another MAC instead of dropping it
* no MTU option for a zone without an MTU, where v2 handed out 1500
* a mapping edit without a MAC no longer reaches the backends
* rewrite commit messages, cover letter and parts of the docs
* rebase onto current master
(pre-build packages on sani)
[1] https://lore.proxmox.com/pve-devel/20261019142413.2255644-1-h.laimer@proxmox.com/
proxmox-ebpf:
Hannes Laimer (2):
dhcp: add the per-tap DHCPv4 responder program
dhcp: add the subsystem that loads the responder and keeps its records
Cargo.toml | 5 +
debian/control | 6 +-
src/bpf-shim/bpf/bpf_helpers.h | 3 +
src/bpf-shim/vmlinux.h | 1 +
src/dhcp/bpf/dhcp.bpf.c | 401 ++++++++++++
src/dhcp/bpf/types.h | 24 +
src/dhcp/mod.rs | 1037 ++++++++++++++++++++++++++++++++
src/dhcp/types.rs | 64 ++
src/lib.rs | 3 +
src/subsystem.rs | 2 +-
tests/common/mod.rs | 63 +-
tests/dhcp.rs | 825 +++++++++++++++++++++++++
12 files changed, 2428 insertions(+), 6 deletions(-)
create mode 100644 src/dhcp/bpf/dhcp.bpf.c
create mode 100644 src/dhcp/bpf/types.h
create mode 100644 src/dhcp/mod.rs
create mode 100644 src/dhcp/types.rs
create mode 100644 tests/dhcp.rs
proxmox-perl-rs:
Hannes Laimer (1):
pve-rs: sdn: add bindings for the eBPF DHCP responder
pve-rs/Cargo.toml | 2 +
pve-rs/Makefile | 3 +
pve-rs/debian/control | 2 +
pve-rs/src/bindings/sdn/dhcp.rs | 229 ++++++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
5 files changed, 237 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
pve-network:
Hannes Laimer (11):
sdn: ipam: stop caching IPAM misses
sdn: ipam: write the lookup's cache entry under the cluster lock
sdn: ipam: key the MAC cache by lower-case MAC
sdn: dhcp: replace a stale dnsmasq reservation instead of dropping it
sdn: dhcp: update reservations when ip mappings change
sdn: dhcp: make the lease time configurable per subnet
sdn: dhcp: require a backend only if a zone on this node uses it
sdn: dhcp: add an eBPF backend answering on each guest interface
sdn: zones: report interface plugs and unplugs to the DHCP backends
sdn: dhcp: run IP mapping edits on the guest's node
sdn: zones: allow the ebpf DHCP backend on every zone type
debian/libpve-network-perl.prerm | 13 +
src/PVE/API2/Network/SDN/Ips.pm | 23 +
src/PVE/API2/Network/SDN/Zones.pm | 11 +-
src/PVE/Network/SDN/Dhcp.pm | 139 +-
src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 106 +-
src/PVE/Network/SDN/Dhcp/Ebpf.pm | 295 +++++
src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
src/PVE/Network/SDN/Dhcp/Plugin.pm | 26 +-
src/PVE/Network/SDN/Ipams.pm | 50 +-
src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
src/PVE/Network/SDN/Vnets.pm | 5 +-
src/PVE/Network/SDN/Zones.pm | 29 +-
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 32 +
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 25 +
src/test/run_test_vnets_blackbox.pl | 1464 ++++++++++++++++++++-
19 files changed, 2169 insertions(+), 79 deletions(-)
create mode 100755 debian/libpve-network-perl.prerm
create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
qemu-server:
Hannes Laimer (1):
network: sdn: keep the DHCP backends current on guest NICs
src/PVE/CLI/qm.pm | 4 ++--
src/PVE/QemuServer.pm | 4 ++++
src/PVE/QemuServer/Network.pm | 19 +++++++++++++++++--
src/PVE/QemuServer/RunState.pm | 2 ++
src/usr/pve-bridge | 8 +++++++-
src/usr/pve-bridgedown | 4 ++--
6 files changed, 34 insertions(+), 7 deletions(-)
pve-container:
Hannes Laimer (1):
net: report NIC plugs and removals to the SDN DHCP backends
src/PVE/LXC.pm | 13 +++++++++++--
src/PVE/LXC/Config.pm | 3 ++-
src/lxc-pve-poststop-hook | 6 +++---
3 files changed, 16 insertions(+), 6 deletions(-)
pve-manager:
Hannes Laimer (2):
ui: sdn: add zone DHCP backend selector and subnet DHCP options
sdn: bring up the DHCP backends at boot before the guests start
bin/pve-sdn-commit | 4 ++++
services/pve-sdn-commit.service | 1 +
www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
5 files changed, 45 insertions(+), 11 deletions(-)
proxmox-ve-rs:
Hannes Laimer (1):
ve-config: sdn: add the ebpf dhcp backend
proxmox-ve-config/src/sdn/config.rs | 3 +++
1 file changed, 3 insertions(+)
pve-docs:
Hannes Laimer (1):
sdn: dhcp: add eBPF backend section
pvesdn.adoc | 101 ++++++++++++++++++++++++++++++++++++++++++----------
1 file changed, 83 insertions(+), 18 deletions(-)
Summary over all repositories:
52 files changed, 5015 insertions(+), 127 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 11%]
* superseded: [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v3 00/17] sdn: implement DHCP for all zones using eBPF
2026-10-20 7:59 11% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v3 00/17] " Hannes Laimer
2026-10-20 13:11 12% ` Stefan Hanreich
@ 2026-10-21 8:46 7% ` Hannes Laimer
1 sibling, 0 replies; 25+ results
From: Hannes Laimer @ 2026-10-21 8:46 UTC (permalink / raw)
To: pve-devel
superseded-by:
https://lore.proxmox.com/pve-devel/20261021084445.462195-1-h.laimer@proxmox.com/
On 2026-10-20 10:00, Hannes Laimer wrote:
> This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
> picks its backend. dnsmasq stays limited to simple zones, while ebpf
> answers on the guest's own interface and works on every zone type. A
> guest on a zone with the ebpf backend gets the address its NIC has in
> the IPAM. There is no daemon per zone and no lease file. The answers
> are held in the kernel and do not depend on the IPAM being reachable.
>
> The responder is a BPF program on the ingress of each guest interface
> of a zone with the ebpf backend. It answers a request from the record
> of that interface, and the exchange never reaches the bridge. A
> request whose client MAC is not the interface's own passes on
> unanswered. So a guest cannot read another guest's record, and a
> nested client does not get the outer guest's address.
>
> An edit through /cluster/sdn/vnets/{vnet}/ips reaches the guest's node
> by a detached call to a new node endpoint, POST
> /nodes/{node}/sdn/dhcp-mapping. The guest sees the change at its next
> renewal, so the lease time bounds how long an old answer survives.
> Subnets get a dhcp-lease-time property for both backends. Without it
> dnsmasq hands out infinite leases and the responder ten minutes. A
> failed push is logged in the journal, and the responder on the guest's
> node catches up at the node's next apply or the guest's next start. An
> apply also attaches the responder to running guests, so a zone
> switched to ebpf serves them without a restart.
>
> Changes reach the kernel in the order they read their input. So no
> change overwrites a newer one with older input. A hotplug moves the
> interface before the guest config names the new bridge. An apply or an
> edit that read the older config in between leaves the moved interface
> as its plug left it. A change that fails only warns, and what was
> served stays served. Nothing of the responder survives a reboot, so it
> is loaded again at boot before the guests start.
>
> Only DHCPv4 is answered. A request the guest tagged itself passes
> unanswered as well, so a trunk port keeps working as before. The
> request is answered on the guest interface, so the guest's firewall
> rules, its DHCP firewall option and its rate limit do not apply to it.
> The reply leaves through the interface's egress, where the rate limit
> shapes it. A request the responder does not answer passes on to the
> bridge and through the firewall as before. Mappings changed directly
> in an external IPAM are not picked up, as with dnsmasq.
>
> In patch order, the series adds
> - proxmox-ebpf, the dhcp subsystem, a tc program answering on the
> guest interface and the per-interface map it answers from
> - pve-rs, the bindings
> - pve-network, the ebpf backend, the hooks that keep a backend current
> when a guest interface or a mapping changes, dhcp on every zone
> type, and fixes to the dnsmasq reservations and the MAC cache
> - qemu-server and pve-container, the reports of a guest NIC coming,
> going or moving, and for VMs the push at a migration's resume
> - pve-manager, the backend and subnet options in the UI, and the
> backends brought up at boot ahead of the guests
> - pve-docs, documentation
>
> - proxmox-ebpf applies on top of the v4 of its own series [1]
> - pve-rs needs proxmox-ebpf with the dhcp feature
> - pve-network needs pve-rs, at build and run time
> - qemu-server, pve-container and pve-manager need pve-network
> An older pve-network fails its apply on the unknown backend, so every
> node needs the new one before a zone gets ebpf.
>
> Changes since v2:
> * drop the generation counter. Every change takes the responder's
> lock before it reads its input instead. An edit takes it
> exclusively
> * the resume at the end of a live migration pushes the guest's
> mappings again on the target, so an edit made during the migration
> reaches it
> * new first pve-network commit, a dnsmasq fix that replaces a stale
> reservation of another MAC instead of dropping it
> * no MTU option for a zone without an MTU, where v2 handed out 1500
> * a mapping edit without a MAC no longer reaches the backends
> * rewrite commit messages, cover letter and parts of the docs
> * rebase onto current master
>
> (pre-build packages on sani)
>
> [1] https://lore.proxmox.com/pve-devel/20261019142413.2255644-1-h.laimer@proxmox.com/
>
>
> proxmox-ebpf:
>
> Hannes Laimer (2):
> dhcp: add the per-tap DHCPv4 responder program
> dhcp: add the subsystem that loads the responder and keeps its records
>
> Cargo.toml | 5 +
> debian/control | 6 +-
> src/bpf-shim/bpf/bpf_helpers.h | 3 +
> src/bpf-shim/vmlinux.h | 1 +
> src/dhcp/bpf/dhcp.bpf.c | 401 +++++++++++++
> src/dhcp/bpf/types.h | 24 +
> src/dhcp/mod.rs | 1031 ++++++++++++++++++++++++++++++++
> src/dhcp/types.rs | 64 ++
> src/lib.rs | 3 +
> src/subsystem.rs | 2 +-
> tests/common/mod.rs | 63 +-
> tests/dhcp.rs | 825 +++++++++++++++++++++++++
> 12 files changed, 2422 insertions(+), 6 deletions(-)
> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 src/dhcp/bpf/types.h
> create mode 100644 src/dhcp/mod.rs
> create mode 100644 src/dhcp/types.rs
> create mode 100644 tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add bindings for the eBPF DHCP responder
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 3 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 229 ++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 237 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (9):
> sdn: dhcp: replace a stale dnsmasq reservation instead of dropping it
> sdn: dhcp: update reservations when ip mappings change
> sdn: ipam: key the MAC cache by lower-case MAC, stop caching misses
> sdn: dhcp: make the lease time configurable per subnet
> sdn: dhcp: require a backend only if a zone on this node uses it
> sdn: dhcp: add an eBPF backend answering on each guest interface
> sdn: zones: report interface plugs and unplugs to the DHCP backends
> sdn: dhcp: push IP mapping edits to the guest's node
> sdn: zones: allow the ebpf DHCP backend on every zone type
>
> debian/libpve-network-perl.prerm | 13 +
> src/PVE/API2/Network/SDN/Ips.pm | 10 +
> src/PVE/API2/Network/SDN/Nodes/Status.pm | 37 +
> src/PVE/API2/Network/SDN/Zones.pm | 11 +-
> src/PVE/Network/SDN/Dhcp.pm | 200 ++-
> src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 114 +-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 308 +++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Dhcp/Plugin.pm | 26 +-
> src/PVE/Network/SDN/Ipams.pm | 61 +-
> src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
> src/PVE/Network/SDN/Vnets.pm | 5 +-
> src/PVE/Network/SDN/Zones.pm | 29 +-
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 32 +
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 25 +
> src/test/run_test_vnets_blackbox.pl | 1442 ++++++++++++++++++++-
> 20 files changed, 2263 insertions(+), 80 deletions(-)
> create mode 100755 debian/libpve-network-perl.prerm
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
>
>
> qemu-server:
>
> Hannes Laimer (1):
> network: sdn: keep the DHCP backends current on guest NICs
>
> src/PVE/CLI/qm.pm | 4 ++--
> src/PVE/QemuServer.pm | 4 ++++
> src/PVE/QemuServer/Network.pm | 19 +++++++++++++++++--
> src/PVE/QemuServer/RunState.pm | 2 ++
> src/usr/pve-bridge | 8 +++++++-
> src/usr/pve-bridgedown | 4 ++--
> 6 files changed, 34 insertions(+), 7 deletions(-)
>
>
> pve-container:
>
> Hannes Laimer (1):
> net: report NIC plugs and removals to the SDN DHCP backends
>
> src/PVE/LXC.pm | 13 +++++++++++--
> src/PVE/LXC/Config.pm | 3 ++-
> src/lxc-pve-poststop-hook | 6 +++---
> 3 files changed, 16 insertions(+), 6 deletions(-)
>
>
> pve-manager:
>
> Hannes Laimer (2):
> ui: sdn: add zone DHCP backend selector and subnet DHCP options
> sdn: bring up the DHCP backends at boot before the guests start
>
> bin/pve-sdn-commit | 3 +++
> services/pve-sdn-commit.service | 1 +
> www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 5 files changed, 44 insertions(+), 11 deletions(-)
>
>
> pve-docs:
>
> Hannes Laimer (1):
> sdn: dhcp: add eBPF backend section
>
> pvesdn.adoc | 101 ++++++++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 83 insertions(+), 18 deletions(-)
>
>
> Summary over all repositories:
> 52 files changed, 5099 insertions(+), 128 deletions(-)
>
^ permalink raw reply [relevance 7%]
* superseded: [RFC cluster/docs/ifupdown2/manager/network/proxmox{-ve-rs,-ebpf,-perl-rs} v2 00/27] sdn: add microsegmentation support
2026-07-09 9:18 6% SPAM: [RFC cluster/docs/ifupdown2/manager/network/proxmox{-ve-rs,-ebpf,-perl-rs} v2 00/27] sdn: add microsegmentation support Hannes Laimer
@ 2026-10-27 8:57 2% ` Hannes Laimer
0 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-10-27 8:57 UTC (permalink / raw)
To: pve-devel
superseded-by:
https://lore.proxmox.com/pve-devel/20261027085527.702738-1-h.laimer@proxmox.com/
On 2026-07-09 11:19, Hannes Laimer wrote:
> This adds support for microsegmentation using eBPF programs attached to
> interfaces. Mostly the tap/veth interfaces on the guests directly.
>
> # Overview
> Each guest interface is assigned a *set* of groups. Rather than a hierarchy,
> group membership is treated as a signature. The agent compiles each interface's
> group set into a single per-NIC *identity*, and policies are rules between
> groups, matched against those sets with predicates.
>
> A rule is a `src` predicate and a `dst` predicate plus a verdict and a
> priority, where a predicate is a match kind over a list of groups:
> - any{...} the interface shares at least one of the listed groups
> - all{...} the interface has all of the listed groups
> - exact{...} the interface's groups are exactly the listed set
>
> For a packet, the `src` predicate is evaluated against the sender's set and the
> `dst` predicate against the receiver's. Among the rules that fire the highest
> `prio` wins, a conflicting tie (with different verdicts) denies, and if no rule
> fires the packet is denied (default-deny). For example, with the groups
> web/app/db/prod, specific allows punched through a broad deny:
>
> - any{web} -> any{app} : allow prio 10
> - any{app} -> any{db} : allow prio 10
> - all{prod} -> all{prod} : allow prio 10 # these three carve out east-west...
> - any{web,app,db} -> any{web,app,db} : deny prio 5 # ...through a broad tier-to-tier deny
> (the last is technically not needed cause the default is deny, in a larger
> context having this explicitly can be necesarry though)
>
> The allows above are one-directional. Rules are stateless and per-packet, there
> is no connection tracking. The reply needs its own allow, so for TCP between web
> and app both any{web} -> any{app} and any{app} -> any{web} have to be allowed.
>
> Groups land on an interface either directly (a guest matcher: a `vmid`,
> optionally a single `iface`), by tag (a tag matcher: every guest carrying the
> named tags, e.g. `prod`/`staging`/`web`), or by name (a regex matcher: every
> guest whose name matches a regular expression). Assignments are additive, an
> interface's set is the union of every assignment that resolves to it, so the
> matchers compose.
>
> `untagged` is a reserved built-in group (mark 0) for traffic that arrives
> unstamped (gateways, DHCP/ARP, cross-node frames without a tag). It can be
> named in a predicate and composed with real groups (e.g. `any{untagged, web}`),
> but it is not assignable.
>
> Enforcement happens on the receiving side, cause that's where we for sure know both
> - where the packet is from
> - and, its destination (us)
>
> # config and API
> The config is a single section-config, `sdn/microseg.cfg`. It holds these
> object types, keyed by section id:
> - group, a numeric `mark` (auto-assigned if omitted) and an optional comment
> - rule, a `src`/`dst` predicate pair (`*_match` is any/all/exact over a group list),
> a `prio` and `allow`
> - guestassignment, binds a guest's NIC(s) (`vmid`, optional `iface`) to a group set
> - tagassignment, binds the NICs of every guest matching `tags` (by `tag_match`) to a
> group set, expanded against the live guest inventory on render
> - regexassignment, same but for every guest whose name matches a regular
> expression
> - bridge, marks a bridge-facing interface as an SRv6 carrier (no UI yet)
> The API exposes endpoints under
> `/cluster/sdn/microseg/{group,rule,assignment,bridge}`, guarded by SDN.Audit for reads
> and SDN.Allocate for writes. The assignment endpoint discriminates the two matcher
> kinds on a `type` property (like the fabric `protocol`).
> Rule and tag/regex-assignment ids are derived from their contents (an FNV-1a hash),
> guest assignments from `vm{vmid}i{iface}`, groups and bridges take a chosen id. On
> commit the config is rendered into `.running-config`, which is what the agent reads.
> Rendering resolves each interface's group set to a wire identity and expands the
> dynamic matchers against the inventory.
>
> # identity
> An identity is not one id per group set but one id per *signature*. Two
> interfaces share an id when every rule predicate fires the same way on both, so
> no rule can tell them apart. The identities are the classes of that partition,
> each named by a 16-bit id, and that id is what rides on the wire.
>
> Editing rules reshapes the partition. A new predicate that separates two sets
> which used to look alike *splits* their class in two, and dropping the
> predicate that told two classes apart *merges* them back into one. On a split
> the subclass that still carries the old representative keeps the id and the
> other gets a fresh one, on a merge the surviving class keeps its id and the
> fused-away ones retire.
>
> New ids come fresh-first from a counter. A retired id is not reused right away,
> it sits in a time quarantine long enough that no packet stamped under its old
> meaning can still be in flight. Only once the fresh space is exhausted does
> allocation fall back to reusing a retired id whose quarantine has passed, so
> config churn alone cannot exhaust the 16-bit id space. Actually running out
> would take more than 65534 identities the policies can tell apart. So it
> doesn't scale with count of group combinations in use, but with the distinct
> semantic meaning they carry.
>
> # skb->mark
> Every packet in the kernel lives in a `sk_buff` struct, which has a 32-bit
> `mark` field you can read and write while the packet moves through the kernel.
> Nothing else in our SDN stack touches `mark` today, so microseg has it to
> itself. Worth keeping in mind if that ever changes. For now we only use the
> lower 16 bits, to carry the interface's identity (mark 0 is reserved for
> unstamped traffic), so up to 65535 identities.
>
> The catch is `mark` only lives as long as the packet stays in the kernel, and
> sooner or later it leaves. To carry the identity between hosts we have to put it
> on the wire itself. For that we support two carriers:
> - VXLAN-GBP, the 16-bit GBP field on the VXLAN encapsulation
> - SRv6, the 16-bit Tag field on the SRH
> The kernel already moves `mark` in and out of the VXLAN-GBP field for us (found
> that out way too late :P). For SRv6 we do it ourselves with a small eBPF program.
>
> # eBPF
> Both tagging (setting `mark`) and enforcement happen in an eBPF program
> directly attached to the guest's interface. The programs themselves read and
> write to/from two maps:
> - tap_to_group, the identity to stamp for a given interface
> - rules, a map of (src_id, dst_id) -> action, where src is the `mark` the
> packet carries and dst is our own interface's identity
>
> Specifically, on ingress we set the mark, and on egress we enforce.
>
> # Implementation
> We have an `agent` that reads the running sdn config, and applies that state to
> the kernel. The binary is stateless and one-shot, not a long running daemon. It
> runs on SDN apply, on tap_plug of a guest interface, and on boot after
> pve-sdn-commit but before guests start. Those triggers cover every situation
> where we have to touch kernel state.
>
> It compiles the config into what the data plane needs. It folds each
> interface's group set into a wire identity (a registry kept stable across
> renders so identities agree across hosts, allocated as described above), and
> folds the rules into the `(src_id, dst_id)` action map by priority (highest
> wins, conflicting ties deny).
>
> It keeps track of what is currently loaded in the kernel with two files under
> `/run/proxmox-ebpf`. One keeping track of the bpf program that was compiled
> into the binary, and one for keeping track of changes to the data structures
> the bpf program accesses. The distinction is useful cause for only a program
> change we can swap the currently attached program with the updated one
> atomically. In case the data structure (the maps) changed there is no other way
> than to tear-down all the current state and repopulate the maps and re-attach
> the programs. Swapping out the maps first would have old programs interact with
> a new data schema, and swapping the programs first will lead to new programs
> accessing an old data schema. Either way, not good, so we wipe the state in
> that case and re-build it. So, in case we change the structure of the data our
> bpf programs access, there will be a bunch of ms where the configured
> segmentation is not enforced. But that is the only scenario where that can
> happen.
>
> ## aya, aya-ebpf
> Aya is a rust lib that helps with working with BPF more easily. It has both a
> userspace part (`aya`) and a part (`aya-ebpf`) that compiles to bpf. I chose to
> only use the userspace part, and use C for the BPF programs themselves. The
> reasons were:
> - we don't have `aya-ebpf` packaged
> - `aya-ebpf` *requires* nightly toolchain to compile
> - the bpf programs are very small, in case this should change at some point we
> can reconsider. Also, it doesn't matter what produces the .o file, so this
> could be swapped in really easily if we decided to
>
> So we compile the bpf program written in C to a .o targeting bpf using clang
> and include it when compiling the agent binary.
>
> ## SRv6
> Besides VXLAN-GBP, the identity can also ride in the 16-bit Tag field of an SRv6
> SRH. The kernel already does this move for VXLAN-GBP but not for SRv6, so this
> adds a small eBPF program that writes the identity into the SRH on egress and
> reads it back on ingress. The `bridge` object marks the bridge-facing interface
> it runs on.
>
> This is only the tag carrier, not an SRv6 transport. Our SDN stack has no SRv6
> zone yet, so there is nothing configured to route it over, and there is no UI.
> If SDN grows an SRv6 transport later (a small L3, EVPN-lite style option), the
> carrier is already in place.
>
> It is packaged as a droppable tail. The carrier bridge section (proxmox-ve-config),
> the bridge API (pve-network) and the bridge subsystem (proxmox-ebpf) are each the
> last patch of their repo's series, so SRv6 can be deferred without touching the rest.
>
> # enabling VXLAN-GBP
> The kernel only moves the mark into the GBP field if the vxlan device was
> created with the GBP flag set, and it's create-only, the kernel won't
> toggle it on a running device. ifupdown2 had no attribute for this, so
> this series includes a small ifupdown2 patch adding `vxlan-gbp`, which
> threads the flag through to the netlink/iproute2 create path.
>
> # testing
> I have put pre-built packages on sani, these include ifupdown2 with the patch
>
> # building
> 1. proxmox-ve-rs (install)
> 2. proxmox-ebpf
> 3. pve-cluster (install)
> 4. proxmox-perl-rs (install)
> 5. pve-network
> 6. pve-manager
>
> # notes
> * everything eBPF related did not change since v1, this v2 only really changes identity semantics
> * using GENEVE would also be an option, but with this current approach we gain
> a lot of flexibility. Expanding predicate logic, or having not just
> allow/deny but also match ports or alike is possible without touching the
> underlying identity system. (limiting the per-packet overhead to just 16
> bits is also good I'd argue)
> * the enforement mechanism is not set in stone, weather this is eBPF or maybe
> nftables with a map we populate as shortly discussed with @Stefan. The
> current approach plays nicely with both since it conveys identity through
> `skb->mark` that nft can access as well
> * I did not send the first commit for `proxmox-ebpf` since it contains a
> `vmlinux.h` which is rather large but is needed for compiling. The commit is in
> my staff repo.
>
> # changelog
> v2:
> - core model reworked: each interface now holds a *set* of groups compiled
> into a per-NIC wire identity, replacing the single-group parent/child tree
> - rules gained explicit `src`/`dst` predicates (any/all/exact) and a `prio`,
> replacing the implicit tree-distance ordering
> - `untagged` is now a nameable built-in group (mark 0)
> - assignments are additive: a NIC's set is the union of all that resolve to it
> - added tag-matcher and name-regex assignments
> - rule and dynamic-assignment ids are now generated
> - identity allocation is fresh-first with quarantined reclamation, so churn
> cannot exhaust the id space
> - split the SRv6 carrier support into droppable tail patches
> - updated docs
> - updated cover-letter
>
>
> proxmox-ve-rs:
>
> Hannes Laimer (5):
> ve-config: sdn: add microseg signature-identity engine
> ve-config: sdn: add microseg config types
> ve-config: sdn: microseg: add tag matcher
> ve-config: sdn: microseg: add name regex matcher
> ve-config: sdn: microseg: add carrier bridge section
>
> proxmox-ve-config/src/sdn/config.rs | 9 +-
> .../src/sdn/microseg/identity.rs | 624 +++++
> proxmox-ve-config/src/sdn/microseg/mod.rs | 2349 +++++++++++++++++
> proxmox-ve-config/src/sdn/mod.rs | 1 +
> 4 files changed, 2982 insertions(+), 1 deletion(-)
> create mode 100644 proxmox-ve-config/src/sdn/microseg/identity.rs
> create mode 100644 proxmox-ve-config/src/sdn/microseg/mod.rs
>
>
> proxmox-ebpf:
>
> Hannes Laimer (3):
> agent: add userspace coordinator and stateless policy subsystem
> bpf: add bridge subsystem
> debian: add packaging and boot-time oneshot unit
>
> Makefile | 66 +++++++
> debian/changelog | 5 +
> debian/control | 35 ++++
> debian/copyright | 18 ++
> debian/proxmox-ebpf.install | 1 +
> debian/proxmox-ebpf.postrm | 11 ++
> debian/proxmox-ebpf.prerm | 12 ++
> debian/proxmox-ebpf.service | 15 ++
> debian/rules | 33 ++++
> debian/source/format | 1 +
> include/mark.h | 30 +++
> src/agent.rs | 99 ++++++++++
> src/bridge/bpf/srv6.bpf.c | 76 +++++++
> src/bridge/mod.rs | 76 +++++++
> src/main.rs | 69 +++++++
> src/policy/bpf/tap.bpf.c | 68 +++++++
> src/policy/bpf/types.h | 23 +++
> src/policy/mod.rs | 268 +++++++++++++++++++++++++
> src/policy/types.rs | 45 +++++
> src/running_config.rs | 38 ++++
> src/state.rs | 149 ++++++++++++++
> src/subsystem.rs | 385 ++++++++++++++++++++++++++++++++++++
> src/tc.rs | 152 ++++++++++++++
> 23 files changed, 1675 insertions(+)
> create mode 100644 Makefile
> create mode 100644 debian/changelog
> create mode 100644 debian/control
> create mode 100644 debian/copyright
> create mode 100644 debian/proxmox-ebpf.install
> create mode 100755 debian/proxmox-ebpf.postrm
> create mode 100755 debian/proxmox-ebpf.prerm
> create mode 100644 debian/proxmox-ebpf.service
> create mode 100755 debian/rules
> create mode 100644 debian/source/format
> create mode 100644 include/mark.h
> create mode 100644 src/agent.rs
> create mode 100644 src/bridge/bpf/srv6.bpf.c
> create mode 100644 src/bridge/mod.rs
> create mode 100644 src/main.rs
> create mode 100644 src/policy/bpf/tap.bpf.c
> create mode 100644 src/policy/bpf/types.h
> create mode 100644 src/policy/mod.rs
> create mode 100644 src/policy/types.rs
> create mode 100644 src/running_config.rs
> create mode 100644 src/state.rs
> create mode 100644 src/subsystem.rs
> create mode 100644 src/tc.rs
>
>
> pve-cluster:
>
> Hannes Laimer (1):
> cfs: add 'sdn/microseg.cfg' to observed files
>
> src/PVE/Cluster.pm | 1 +
> 1 file changed, 1 insertion(+)
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add microseg config binding
>
> pve-rs/Makefile | 1 +
> pve-rs/src/bindings/sdn/microseg.rs | 235 ++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 3 files changed, 237 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/microseg.rs
>
>
> ifupdown2:
>
> Hannes Laimer (1):
> d/patches: add support for VXLAN-GBP flag
>
> ...addons-vxlan-add-vxlan-gbp-attribute.patch | 228 ++++++++++++++++++
> debian/patches/series | 1 +
> 2 files changed, 229 insertions(+)
> create mode 100644 debian/patches/pve/0016-addons-vxlan-add-vxlan-gbp-attribute.patch
>
>
> pve-network:
>
> Hannes Laimer (8):
> sdn: microseg: add config, API and guest inventory
> sdn: dry-run: surface pending microseg changes
> sdn: zones: trigger microseg apply on tap_plug
> sdn: zones: add vxlan-gbp option to vxlan and evpn zones
> evpn: disable vxlan-learning on create if GBP is enabled
> sdn: microseg: add tag matcher
> sdn: microseg: add name regex matcher
> sdn: microseg: add carrier bridge API
>
> src/PVE/API2/Network/SDN.pm | 31 ++
> src/PVE/API2/Network/SDN/Makefile | 2 +
> src/PVE/API2/Network/SDN/Microseg.pm | 204 +++++++
> .../API2/Network/SDN/Microseg/Assignment.pm | 185 +++++++
> src/PVE/API2/Network/SDN/Microseg/Bridge.pm | 179 ++++++
> src/PVE/API2/Network/SDN/Microseg/Group.pm | 179 ++++++
> src/PVE/API2/Network/SDN/Microseg/Makefile | 8 +
> src/PVE/API2/Network/SDN/Microseg/Rule.pm | 180 +++++++
> src/PVE/Network/SDN.pm | 37 ++
> src/PVE/Network/SDN/Makefile | 1 +
> src/PVE/Network/SDN/Microseg.pm | 509 ++++++++++++++++++
> src/PVE/Network/SDN/Zones.pm | 6 +
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 11 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 9 +
> 14 files changed, 1541 insertions(+)
> create mode 100644 src/PVE/API2/Network/SDN/Microseg.pm
> create mode 100644 src/PVE/API2/Network/SDN/Microseg/Assignment.pm
> create mode 100644 src/PVE/API2/Network/SDN/Microseg/Bridge.pm
> create mode 100644 src/PVE/API2/Network/SDN/Microseg/Group.pm
> create mode 100644 src/PVE/API2/Network/SDN/Microseg/Makefile
> create mode 100644 src/PVE/API2/Network/SDN/Microseg/Rule.pm
> create mode 100644 src/PVE/Network/SDN/Microseg.pm
>
>
> pve-manager:
>
> Hannes Laimer (6):
> ui: sdn: add microsegmentation panel
> ui: sdn: dry-run: show pending microseg diff
> network: apply microseg state on reload
> ui: sdn: zones: add vxlan-gbp checkbox to vxlan and evpn
> ui: sdn: microseg: add tag matcher
> ui: sdn: microseg: add name regex matcher
>
> PVE/API2/Network.pm | 4 +
> www/manager6/Makefile | 9 +
> www/manager6/Utils.js | 34 ++
> www/manager6/dc/Config.js | 8 +
> www/manager6/form/MicrosegGroupSelector.js | 77 +++++
> www/manager6/form/MicrosegGuestSelector.js | 83 +++++
> www/manager6/sdn/MicrosegView.js | 143 ++++++++
> www/manager6/sdn/SdnDiffView.js | 24 ++
> www/manager6/sdn/microseg/AssignmentEdit.js | 245 ++++++++++++++
> www/manager6/sdn/microseg/Base.js | 137 ++++++++
> www/manager6/sdn/microseg/GroupEdit.js | 45 +++
> www/manager6/sdn/microseg/PolicyView.js | 181 ++++++++++
> www/manager6/sdn/microseg/RuleEdit.js | 104 ++++++
> www/manager6/sdn/microseg/Tree.js | 356 ++++++++++++++++++++
> www/manager6/sdn/zones/EvpnEdit.js | 8 +
> www/manager6/sdn/zones/VxlanEdit.js | 11 +
> 16 files changed, 1469 insertions(+)
> create mode 100644 www/manager6/form/MicrosegGroupSelector.js
> create mode 100644 www/manager6/form/MicrosegGuestSelector.js
> create mode 100644 www/manager6/sdn/MicrosegView.js
> create mode 100644 www/manager6/sdn/microseg/AssignmentEdit.js
> create mode 100644 www/manager6/sdn/microseg/Base.js
> create mode 100644 www/manager6/sdn/microseg/GroupEdit.js
> create mode 100644 www/manager6/sdn/microseg/PolicyView.js
> create mode 100644 www/manager6/sdn/microseg/RuleEdit.js
> create mode 100644 www/manager6/sdn/microseg/Tree.js
>
>
> pve-docs:
>
> Hannes Laimer (2):
> sdn: add microsegmentation section
> sdn: add VXLAN-GBP flag to evpn/vxlan zone sections
>
> pvesdn.adoc | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 134 insertions(+)
>
>
> Summary over all repositories:
> 64 files changed, 8268 insertions(+), 1 deletions(-)
>
^ permalink raw reply [relevance 2%]
* [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs,-ve-rs}/qemu-server v5 00/15] sdn: implement DHCP for all zones using eBPF
@ 2026-11-02 15:18 11% Hannes Laimer
2026-11-05 10:05 7% ` superseded: " Hannes Laimer
0 siblings, 1 reply; 25+ results
From: Hannes Laimer @ 2026-11-02 15:18 UTC (permalink / raw)
To: pve-devel
This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
picks its backend. dnsmasq stays limited to simple zones, while ebpf
answers on the guest's own interface and works on every zone type. A
guest on a zone with the ebpf backend gets the address its NIC has in
the IPAM. There is no daemon per zone and no lease file. The answers
are held in the kernel and do not depend on the IPAM being reachable.
The responder is a BPF program on the ingress of each guest interface
of a zone with the ebpf backend. It answers a request from the record
of that interface, and the exchange never reaches the bridge. A
request whose client MAC is not the interface's own passes on
unanswered. So a guest cannot read another guest's record, and a
nested client does not get the outer guest's address.
An edit through /cluster/sdn/vnets/{vnet}/ips is proxied to the
guest's node and updates the backend there. The guest sees the change
at its next renewal, so the lease time bounds how long an old answer
survives. Subnets get a dhcp-lease-time property for both backends.
Without it dnsmasq hands out infinite leases and the responder ten
minutes. An apply attaches the responder to running guests, so a zone
switched to ebpf serves them without a restart.
Changes reach the kernel in the order they read their input. So no
change overwrites a newer one with older input. A hotplug moves the
interface before the guest config names the new bridge. An apply or an
edit that read the older config in between leaves the moved interface
as its plug left it. A change that fails only warns, and what was
served stays served. Nothing of the responder survives a reboot, so it
is loaded again at boot before the guests start.
Only DHCPv4 is answered. A request the guest tagged itself passes
unanswered as well, so a trunk port keeps working as before. The
request is answered on the guest interface, so the guest's firewall
rules, its DHCP firewall option and its rate limit do not apply to it.
The reply leaves through the interface's egress, where the rate limit
shapes it. A request the responder does not answer passes on to the
bridge and through the firewall as before. Mappings changed directly
in an external IPAM are not picked up, as with dnsmasq.
In patch order, the series adds
- proxmox-ebpf, the dhcp subsystem, a tc program answering on the
guest interface and the per-interface map it answers from
- pve-rs, the bindings
- pve-network, the VXLAN and EVPN MTU taken from the underlay
interface, the ebpf backend, the hooks that keep a backend current
when a guest interface changes, and dhcp on every zone type
- qemu-server and pve-container, the reports of a guest NIC coming,
going or moving
- pve-manager, the backend and subnet options in the UI, and the
backends brought up at boot ahead of the guests
- proxmox-ve-rs, the ebpf variant of the dhcp backend type
- pve-docs, documentation
- proxmox-ebpf applies on top of the v5 of its own series [1]
- pve-network and qemu-server apply on top of [2]
- pve-rs needs proxmox-ebpf with the dhcp feature
- pve-network needs pve-rs, at build and run time
- qemu-server, pve-container and pve-manager need pve-network
- proxmox-ve-config needs nothing, and proxmox-firewall needs its
dependency on it bumped, since an older one fails to parse a zone
with the ebpf backend and the firewall then cannot load its config
An older pve-network fails its apply on the unknown backend, so every
node needs the new one before a zone gets ebpf.
v5:
* rebased onto ebpf-lib v5 [1]
* the MAC cache and dnsmasq fixes moved to [2], as did running a
mapping edit on the guest's node and the push on resume
* a mapping edit only changes the answers on its own vnet
* the VXLAN and EVPN bridges get the MTU that DHCP hands out, both
take it from the underlay interface
* a MAC change on the same vnet is no longer undone by an apply
running meanwhile
v4, thanks @Stefan!:
* a mapping edit runs on the guest's node instead of being pushed to
it, the node endpoint is gone
* the MAC cache is read and written with lower-case keys, and its
three fixes are three commits
* the guest NIC list is keyed by MAC
* add the missing proxmox-ve-rs patch, the ebpf variant of the dhcp
backend type
* reword log lines and warnings
* (notes on patches with changes)
v3:
* drop the generation counter. Every change takes the responder's
lock before it reads its input instead. An edit takes it
exclusively
* the resume at the end of a live migration pushes the guest's
mappings again on the target, so an edit made during the migration
reaches it
* new first pve-network commit, a dnsmasq fix that replaces a stale
reservation of another MAC instead of dropping it
* no MTU option for a zone without an MTU, where v2 handed out 1500
* a mapping edit without a MAC no longer reaches the backends
* rewrite commit messages, cover letter and parts of the docs
* rebase onto current master
pre-build packages are on sani(`packages/ebpf-dhcp-v5`)
[1] https://lore.proxmox.com/pve-devel/20261102150047.1584789-1-h.laimer@proxmox.com/
[2] https://lore.proxmox.com/pve-devel/20261102145630.1555953-1-h.laimer@proxmox.com/
proxmox-ebpf:
Hannes Laimer (2):
dhcp: add the per-tap DHCPv4 responder program
dhcp: add the subsystem that loads the responder and keeps its records
Cargo.toml | 5 +
debian/control | 6 +-
src/bpf-shim/bpf/bpf_helpers.h | 3 +
src/bpf-shim/vmlinux.h | 1 +
src/dhcp/bpf/dhcp.bpf.c | 401 +++++++++++
src/dhcp/bpf/types.h | 24 +
src/dhcp/mod.rs | 1131 ++++++++++++++++++++++++++++++++
src/dhcp/types.rs | 65 ++
src/lib.rs | 3 +
src/subsystem.rs | 2 +-
tests/common/mod.rs | 63 +-
tests/dhcp.rs | 825 +++++++++++++++++++++++
12 files changed, 2523 insertions(+), 6 deletions(-)
create mode 100644 src/dhcp/bpf/dhcp.bpf.c
create mode 100644 src/dhcp/bpf/types.h
create mode 100644 src/dhcp/mod.rs
create mode 100644 src/dhcp/types.rs
create mode 100644 tests/dhcp.rs
proxmox-perl-rs:
Hannes Laimer (1):
pve-rs: sdn: add bindings for the eBPF DHCP responder
pve-rs/Cargo.toml | 2 +
pve-rs/Makefile | 3 +
pve-rs/debian/control | 2 +
pve-rs/src/bindings/sdn/dhcp.rs | 237 ++++++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
5 files changed, 245 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
pve-network:
Hannes Laimer (6):
sdn: zones: take the VXLAN and EVPN MTU from the underlay interface
sdn: dhcp: make the lease time configurable per subnet
sdn: dhcp: require a backend only if a zone on this node uses it
sdn: dhcp: add an eBPF backend answering on each guest interface
sdn: zones: report interface plugs and unplugs to the DHCP backends
sdn: zones: allow the ebpf DHCP backend on every zone type
debian/libpve-network-perl.prerm | 13 +
src/PVE/API2/Network/SDN/Zones.pm | 11 +-
src/PVE/Network/SDN/Dhcp.pm | 103 +-
src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 3 +-
src/PVE/Network/SDN/Dhcp/Ebpf.pm | 301 ++++++
src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
src/PVE/Network/SDN/Dhcp/Plugin.pm | 24 +-
src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
src/PVE/Network/SDN/Vnets.pm | 2 +-
src/PVE/Network/SDN/Zones.pm | 29 +-
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 40 +-
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 31 +-
src/test/run_test_vnets_blackbox.pl | 999 +++++++++++++++++-
.../underlay_mtu/expected_controller_config | 44 +
.../evpn/underlay_mtu/expected_sdn_interfaces | 42 +
src/test/zones/evpn/underlay_mtu/interfaces | 8 +
src/test/zones/evpn/underlay_mtu/sdn_config | 26 +
.../underlay_mtu/expected_sdn_interfaces | 15 +
src/test/zones/vxlan/underlay_mtu/interfaces | 8 +
src/test/zones/vxlan/underlay_mtu/sdn_config | 11 +
24 files changed, 1704 insertions(+), 36 deletions(-)
create mode 100755 debian/libpve-network-perl.prerm
create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
create mode 100644 src/test/zones/evpn/underlay_mtu/expected_controller_config
create mode 100644 src/test/zones/evpn/underlay_mtu/expected_sdn_interfaces
create mode 100644 src/test/zones/evpn/underlay_mtu/interfaces
create mode 100644 src/test/zones/evpn/underlay_mtu/sdn_config
create mode 100644 src/test/zones/vxlan/underlay_mtu/expected_sdn_interfaces
create mode 100644 src/test/zones/vxlan/underlay_mtu/interfaces
create mode 100644 src/test/zones/vxlan/underlay_mtu/sdn_config
qemu-server:
Hannes Laimer (1):
network: sdn: keep the DHCP backends current on guest NICs
src/PVE/CLI/qm.pm | 4 ++--
src/PVE/QemuServer.pm | 4 ++++
src/PVE/QemuServer/Network.pm | 4 ++--
src/test/hotplug/net-change-bridge.conf.expected | 3 ++-
src/usr/pve-bridge | 8 +++++++-
src/usr/pve-bridgedown | 4 ++--
6 files changed, 19 insertions(+), 8 deletions(-)
pve-container:
Hannes Laimer (1):
net: report NIC plugs and removals to the SDN DHCP backends
src/PVE/LXC.pm | 13 +++++++++++--
src/PVE/LXC/Config.pm | 3 ++-
src/lxc-pve-poststop-hook | 6 +++---
3 files changed, 16 insertions(+), 6 deletions(-)
pve-manager:
Hannes Laimer (2):
ui: sdn: add zone DHCP backend selector and subnet DHCP options
sdn: bring up the DHCP backends at boot before the guests start
bin/pve-sdn-commit | 4 ++++
services/pve-sdn-commit.service | 1 +
www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
5 files changed, 45 insertions(+), 11 deletions(-)
proxmox-ve-rs:
Hannes Laimer (1):
ve-config: sdn: add the ebpf dhcp backend
proxmox-ve-config/src/sdn/config.rs | 3 +++
1 file changed, 3 insertions(+)
pve-docs:
Hannes Laimer (1):
sdn: dhcp: add eBPF backend section
pvesdn.adoc | 127 ++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 98 insertions(+), 29 deletions(-)
Summary over all repositories:
57 files changed, 4653 insertions(+), 96 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 11%]
* superseded: [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs,-ve-rs}/qemu-server v4 00/20] sdn: implement DHCP for all zones using eBPF
2026-10-21 8:44 11% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs,-ve-rs}/qemu-server v4 00/20] " Hannes Laimer
@ 2026-11-02 15:19 7% ` Hannes Laimer
0 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-11-02 15:19 UTC (permalink / raw)
To: pve-devel
superseded-by:
https://lore.proxmox.com/pve-devel/20261102151842.1605234-1-h.laimer@proxmox.com
On 2026-10-21 10:45, Hannes Laimer wrote:
> This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
> picks its backend. dnsmasq stays limited to simple zones, while ebpf
> answers on the guest's own interface and works on every zone type. A
> guest on a zone with the ebpf backend gets the address its NIC has in
> the IPAM. There is no daemon per zone and no lease file. The answers
> are held in the kernel and do not depend on the IPAM being reachable.
>
> The responder is a BPF program on the ingress of each guest interface
> of a zone with the ebpf backend. It answers a request from the record
> of that interface, and the exchange never reaches the bridge. A
> request whose client MAC is not the interface's own passes on
> unanswered. So a guest cannot read another guest's record, and a
> nested client does not get the outer guest's address.
>
> An edit through /cluster/sdn/vnets/{vnet}/ips is proxied to the
> guest's node and updates the backend there. The guest sees the change
> at its next renewal, so the lease time bounds how long an old answer
> survives. Subnets get a dhcp-lease-time property for both backends.
> Without it dnsmasq hands out infinite leases and the responder ten
> minutes. An apply attaches the responder to running guests, so a zone
> switched to ebpf serves them without a restart.
>
> Changes reach the kernel in the order they read their input. So no
> change overwrites a newer one with older input. A hotplug moves the
> interface before the guest config names the new bridge. An apply or an
> edit that read the older config in between leaves the moved interface
> as its plug left it. A change that fails only warns, and what was
> served stays served. Nothing of the responder survives a reboot, so it
> is loaded again at boot before the guests start.
>
> Only DHCPv4 is answered. A request the guest tagged itself passes
> unanswered as well, so a trunk port keeps working as before. The
> request is answered on the guest interface, so the guest's firewall
> rules, its DHCP firewall option and its rate limit do not apply to it.
> The reply leaves through the interface's egress, where the rate limit
> shapes it. A request the responder does not answer passes on to the
> bridge and through the firewall as before. Mappings changed directly
> in an external IPAM are not picked up, as with dnsmasq.
>
> In patch order, the series adds
> - proxmox-ebpf, the dhcp subsystem, a tc program answering on the
> guest interface and the per-interface map it answers from
> - pve-rs, the bindings
> - pve-network, the ebpf backend, the hooks that keep a backend current
> when a guest interface or a mapping changes, dhcp on every zone
> type, and fixes to the dnsmasq reservations and the MAC cache
> - qemu-server and pve-container, the reports of a guest NIC coming,
> going or moving, and for VMs the push at a migration's resume
> - pve-manager, the backend and subnet options in the UI, and the
> backends brought up at boot ahead of the guests
> - proxmox-ve-rs, the ebpf variant of the dhcp backend type
> - pve-docs, documentation
>
> - proxmox-ebpf applies on top of the v4 of its own series [1]
> - pve-rs needs proxmox-ebpf with the dhcp feature
> - pve-network needs pve-rs, at build and run time
> - qemu-server, pve-container and pve-manager need pve-network
> - proxmox-ve-config needs nothing, and proxmox-firewall needs its
> dependency on it bumped, since an older one fails to parse a zone
> with the ebpf backend and the firewall then cannot load its config
> An older pve-network fails its apply on the unknown backend, so every
> node needs the new one before a zone gets ebpf.
>
> Changes since v3, thanks @Stefan!:
> * a mapping edit runs on the guest's node instead of being pushed to
> it, the node endpoint is gone
> * the MAC cache is read and written with lower-case keys, and its
> three fixes are three commits
> * the guest NIC list is keyed by MAC
> * add the missing proxmox-ve-rs patch, the ebpf variant of the dhcp
> backend type
> * reword log lines and warnings
> * (notes on patches with changes)
>
> Changes since v2:
> * drop the generation counter. Every change takes the responder's
> lock before it reads its input instead. An edit takes it
> exclusively
> * the resume at the end of a live migration pushes the guest's
> mappings again on the target, so an edit made during the migration
> reaches it
> * new first pve-network commit, a dnsmasq fix that replaces a stale
> reservation of another MAC instead of dropping it
> * no MTU option for a zone without an MTU, where v2 handed out 1500
> * a mapping edit without a MAC no longer reaches the backends
> * rewrite commit messages, cover letter and parts of the docs
> * rebase onto current master
>
> (pre-build packages on sani)
>
> [1] https://lore.proxmox.com/pve-devel/20261019142413.2255644-1-h.laimer@proxmox.com/
>
>
> proxmox-ebpf:
>
> Hannes Laimer (2):
> dhcp: add the per-tap DHCPv4 responder program
> dhcp: add the subsystem that loads the responder and keeps its records
>
> Cargo.toml | 5 +
> debian/control | 6 +-
> src/bpf-shim/bpf/bpf_helpers.h | 3 +
> src/bpf-shim/vmlinux.h | 1 +
> src/dhcp/bpf/dhcp.bpf.c | 401 ++++++++++++
> src/dhcp/bpf/types.h | 24 +
> src/dhcp/mod.rs | 1037 ++++++++++++++++++++++++++++++++
> src/dhcp/types.rs | 64 ++
> src/lib.rs | 3 +
> src/subsystem.rs | 2 +-
> tests/common/mod.rs | 63 +-
> tests/dhcp.rs | 825 +++++++++++++++++++++++++
> 12 files changed, 2428 insertions(+), 6 deletions(-)
> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 src/dhcp/bpf/types.h
> create mode 100644 src/dhcp/mod.rs
> create mode 100644 src/dhcp/types.rs
> create mode 100644 tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add bindings for the eBPF DHCP responder
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 3 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 229 ++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 237 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (11):
> sdn: ipam: stop caching IPAM misses
> sdn: ipam: write the lookup's cache entry under the cluster lock
> sdn: ipam: key the MAC cache by lower-case MAC
> sdn: dhcp: replace a stale dnsmasq reservation instead of dropping it
> sdn: dhcp: update reservations when ip mappings change
> sdn: dhcp: make the lease time configurable per subnet
> sdn: dhcp: require a backend only if a zone on this node uses it
> sdn: dhcp: add an eBPF backend answering on each guest interface
> sdn: zones: report interface plugs and unplugs to the DHCP backends
> sdn: dhcp: run IP mapping edits on the guest's node
> sdn: zones: allow the ebpf DHCP backend on every zone type
>
> debian/libpve-network-perl.prerm | 13 +
> src/PVE/API2/Network/SDN/Ips.pm | 23 +
> src/PVE/API2/Network/SDN/Zones.pm | 11 +-
> src/PVE/Network/SDN/Dhcp.pm | 139 +-
> src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 106 +-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 295 +++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Dhcp/Plugin.pm | 26 +-
> src/PVE/Network/SDN/Ipams.pm | 50 +-
> src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
> src/PVE/Network/SDN/Vnets.pm | 5 +-
> src/PVE/Network/SDN/Zones.pm | 29 +-
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 32 +
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 25 +
> src/test/run_test_vnets_blackbox.pl | 1464 ++++++++++++++++++++-
> 19 files changed, 2169 insertions(+), 79 deletions(-)
> create mode 100755 debian/libpve-network-perl.prerm
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
>
>
> qemu-server:
>
> Hannes Laimer (1):
> network: sdn: keep the DHCP backends current on guest NICs
>
> src/PVE/CLI/qm.pm | 4 ++--
> src/PVE/QemuServer.pm | 4 ++++
> src/PVE/QemuServer/Network.pm | 19 +++++++++++++++++--
> src/PVE/QemuServer/RunState.pm | 2 ++
> src/usr/pve-bridge | 8 +++++++-
> src/usr/pve-bridgedown | 4 ++--
> 6 files changed, 34 insertions(+), 7 deletions(-)
>
>
> pve-container:
>
> Hannes Laimer (1):
> net: report NIC plugs and removals to the SDN DHCP backends
>
> src/PVE/LXC.pm | 13 +++++++++++--
> src/PVE/LXC/Config.pm | 3 ++-
> src/lxc-pve-poststop-hook | 6 +++---
> 3 files changed, 16 insertions(+), 6 deletions(-)
>
>
> pve-manager:
>
> Hannes Laimer (2):
> ui: sdn: add zone DHCP backend selector and subnet DHCP options
> sdn: bring up the DHCP backends at boot before the guests start
>
> bin/pve-sdn-commit | 4 ++++
> services/pve-sdn-commit.service | 1 +
> www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 5 files changed, 45 insertions(+), 11 deletions(-)
>
>
> proxmox-ve-rs:
>
> Hannes Laimer (1):
> ve-config: sdn: add the ebpf dhcp backend
>
> proxmox-ve-config/src/sdn/config.rs | 3 +++
> 1 file changed, 3 insertions(+)
>
>
> pve-docs:
>
> Hannes Laimer (1):
> sdn: dhcp: add eBPF backend section
>
> pvesdn.adoc | 101 ++++++++++++++++++++++++++++++++++++++++++----------
> 1 file changed, 83 insertions(+), 18 deletions(-)
>
>
> Summary over all repositories:
> 52 files changed, 5015 insertions(+), 127 deletions(-)
>
^ permalink raw reply [relevance 7%]
* [PATCH container/docs/manager/network/proxmox{,-perl-rs,-ve-rs}/qemu-server v6 00/17] sdn: implement DHCP for all zones using eBPF
@ 2026-11-05 10:02 10% Hannes Laimer
2026-11-12 12:45 6% ` superseded: " Hannes Laimer
0 siblings, 1 reply; 25+ results
From: Hannes Laimer @ 2026-11-05 10:02 UTC (permalink / raw)
To: pve-devel
This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
picks its backend. dnsmasq stays limited to simple zones, while ebpf
answers on the guest's own interface and works on every zone type. A
guest on a zone with the ebpf backend gets the address its NIC has in
the IPAM. There is no daemon per zone and no lease file. The answers
are held in the kernel and do not depend on the IPAM being reachable.
The responder is a BPF program on the ingress of each guest interface
of a zone with the ebpf backend. It answers a request from the record
of that interface, and the exchange never reaches the bridge. A
request whose client MAC is not the interface's own passes on
unanswered. So a guest cannot read another guest's record, and a
nested client does not get the outer guest's address.
An edit through /cluster/sdn/vnets/{vnet}/ips is proxied to the
guest's node and updates the backend there. The guest sees the change
at its next renewal, so the lease time bounds how long an old answer
survives. Subnets get a dhcp-lease-time property for both backends.
Without it dnsmasq hands out infinite leases and the responder ten
minutes. An apply attaches the responder to running guests, so a zone
switched to ebpf serves them without a restart.
Changes reach the kernel in the order they read their input. So no
change overwrites a newer one with older input. A hotplug moves the
interface before the guest config names the new bridge. An apply or an
edit that read the older config in between leaves the moved interface
as its plug left it. Once the config names the bridge the interface
sits on, an apply also repairs an interface whose plug failed. An edit
through the API whose update fails returns an error, with the mapping
saved. Any other change that fails only warns, and what was served
stays served. Nothing of the responder survives a reboot, so it is
loaded again at boot before the guests start.
Only DHCPv4 is answered. A request the guest tagged itself passes
unanswered as well, so a trunk port keeps working as before. The
request is answered on the guest interface, so the guest's firewall
rules, its DHCP firewall option and its rate limit do not apply to it.
The reply leaves through the interface's egress, where the rate limit
shapes it. A request the responder does not answer passes on to the
bridge and through the firewall as before. Mappings changed directly
in an external IPAM are not picked up, as with dnsmasq.
In patch order, the series adds
- proxmox, a byte accessor for the MAC address type of
proxmox-network-types, and the dhcp subsystem of proxmox-ebpf, a tc
program answering on the guest interface and the per-interface map
it answers from
- pve-rs, the bindings
- pve-network, the VXLAN and EVPN MTU taken from the underlay
interface, the ebpf backend, the hooks that keep a backend current
when a guest interface changes, and dhcp on every zone type
- qemu-server and pve-container, the reports of a guest NIC coming,
going or moving
- pve-manager, the backend and subnet options in the UI, and the
backends brought up at boot ahead of the guests
- proxmox-ve-rs, the ebpf variant of the dhcp backend type
- pve-docs, the MTU VXLAN and EVPN zones take from the underlay, and
the documentation of the backend
- proxmox applies on top of the proxmox-ebpf series [1]
- pve-network, qemu-server and pve-docs apply on top of [2]
- pve-rs needs proxmox-ebpf with the dhcp feature and
proxmox-network-types with the byte accessor
- pve-network needs pve-rs, at build and run time
- qemu-server, pve-container and pve-manager need pve-network
- proxmox-ve-config needs nothing, and proxmox-firewall needs its
dependency on it bumped, since an older one fails to parse a zone
with the ebpf backend and the firewall then cannot load its config
An older pve-network fails its apply on the unknown backend, so every
node needs the new one before a zone gets ebpf.
v6:
* like the ebpf-lib v8 [1] that this is based on, this moved into the
proxmox workspace
* rebased onto the ipam series v6 [2]
* rebased onto current master
* an apply repairs an interface whose plug failed, once it sits on
the bridge its config names
* a plug reads the zone's backend under the responder's lock, so an
apply switching it meanwhile is not undone
* a map replacement that cannot write every entry keeps the old maps
* an API edit whose DHCP update fails returns an error
* the bindings use the MAC address type of proxmox-network-types
* docs: the MTU default of VXLAN and EVPN zones
v5:
* rebased onto ebpf-lib v5
* the MAC cache and dnsmasq fixes moved to [2], as did running a
mapping edit on the guest's node and the push on resume
* a mapping edit only changes the answers on its own vnet
* the VXLAN and EVPN bridges get the MTU that DHCP hands out, both
take it from the underlay interface
* a MAC change on the same vnet is no longer undone by an apply
running meanwhile
v4, thanks @Stefan!:
* a mapping edit runs on the guest's node instead of being pushed to
it, the node endpoint is gone
* the MAC cache is read and written with lower-case keys, and its
three fixes are three commits
* the guest NIC list is keyed by MAC
* add the missing proxmox-ve-rs patch, the ebpf variant of the dhcp
backend type
* reword log lines and warnings
* (notes on patches with changes)
v3:
* drop the generation counter. Every change takes the responder's
lock before it reads its input instead. An edit takes it
exclusively
* the resume at the end of a live migration pushes the guest's
mappings again on the target, so an edit made during the migration
reaches it
* new first pve-network commit, a dnsmasq fix that replaces a stale
reservation of another MAC instead of dropping it
* no MTU option for a zone without an MTU, where v2 handed out 1500
* a mapping edit without a MAC no longer reaches the backends
* rewrite commit messages, cover letter and parts of the docs
* rebase onto current master
pre-build packages are on sani(`packages/ebpf-dhcp-v6`)
[1] https://lore.proxmox.com/pve-devel/20261104172918.2643810-1-h.laimer@proxmox.com/
[2] https://lore.proxmox.com/pve-devel/20261105093529.209052-1-h.laimer@proxmox.com/
proxmox:
Hannes Laimer (3):
network-types: mac address: add an accessor for the bytes
ebpf: dhcp: add the per-tap DHCPv4 responder program
ebpf: dhcp: add the subsystem that loads the responder and keeps its
records
proxmox-ebpf/Cargo.toml | 5 +
proxmox-ebpf/debian/control | 18 +
proxmox-ebpf/src/bpf-shim/bpf/bpf_helpers.h | 1 +
proxmox-ebpf/src/bpf-shim/linux/bpf.h | 3 +
proxmox-ebpf/src/dhcp/bpf/dhcp.bpf.c | 400 ++++++
proxmox-ebpf/src/dhcp/bpf/types.h | 24 +
proxmox-ebpf/src/dhcp/mod.rs | 1219 +++++++++++++++++++
proxmox-ebpf/src/dhcp/types.rs | 65 +
proxmox-ebpf/src/lib.rs | 3 +
proxmox-ebpf/src/subsystem.rs | 2 +-
proxmox-ebpf/tests/common/mod.rs | 63 +-
proxmox-ebpf/tests/dhcp.rs | 825 +++++++++++++
proxmox-network-types/src/mac_address.rs | 13 +
13 files changed, 2636 insertions(+), 5 deletions(-)
create mode 100644 proxmox-ebpf/src/dhcp/bpf/dhcp.bpf.c
create mode 100644 proxmox-ebpf/src/dhcp/bpf/types.h
create mode 100644 proxmox-ebpf/src/dhcp/mod.rs
create mode 100644 proxmox-ebpf/src/dhcp/types.rs
create mode 100644 proxmox-ebpf/tests/dhcp.rs
proxmox-perl-rs:
Hannes Laimer (1):
pve-rs: sdn: add bindings for the eBPF DHCP responder
pve-rs/Cargo.toml | 2 +
pve-rs/Makefile | 3 +
pve-rs/debian/control | 2 +
pve-rs/src/bindings/sdn/dhcp.rs | 217 ++++++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
5 files changed, 225 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
pve-network:
Hannes Laimer (6):
sdn: zones: take the VXLAN and EVPN MTU from the underlay interface
sdn: dhcp: make the lease time configurable per subnet
sdn: dhcp: require a backend only if a zone on this node uses it
sdn: dhcp: add an eBPF backend answering on each guest interface
sdn: zones: report interface plugs and unplugs to the DHCP backends
sdn: zones: allow the ebpf DHCP backend on every zone type
debian/libpve-network-perl.prerm | 13 +
src/PVE/API2/Network/SDN/Zones.pm | 11 +-
src/PVE/Network/SDN/Dhcp.pm | 107 +-
src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 3 +-
src/PVE/Network/SDN/Dhcp/Ebpf.pm | 345 ++++++
src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
src/PVE/Network/SDN/Dhcp/Plugin.pm | 24 +-
src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
src/PVE/Network/SDN/Vnets.pm | 2 +-
src/PVE/Network/SDN/Zones.pm | 29 +-
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 40 +-
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 31 +-
src/test/run_test_vnets_blackbox.pl | 1017 ++++++++++++++++-
.../underlay_mtu/expected_controller_config | 44 +
.../evpn/underlay_mtu/expected_sdn_interfaces | 42 +
src/test/zones/evpn/underlay_mtu/interfaces | 8 +
src/test/zones/evpn/underlay_mtu/sdn_config | 26 +
.../underlay_mtu/expected_sdn_interfaces | 16 +
src/test/zones/vxlan/underlay_mtu/interfaces | 8 +
src/test/zones/vxlan/underlay_mtu/sdn_config | 11 +
24 files changed, 1770 insertions(+), 37 deletions(-)
create mode 100755 debian/libpve-network-perl.prerm
create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
create mode 100644 src/test/zones/evpn/underlay_mtu/expected_controller_config
create mode 100644 src/test/zones/evpn/underlay_mtu/expected_sdn_interfaces
create mode 100644 src/test/zones/evpn/underlay_mtu/interfaces
create mode 100644 src/test/zones/evpn/underlay_mtu/sdn_config
create mode 100644 src/test/zones/vxlan/underlay_mtu/expected_sdn_interfaces
create mode 100644 src/test/zones/vxlan/underlay_mtu/interfaces
create mode 100644 src/test/zones/vxlan/underlay_mtu/sdn_config
qemu-server:
Hannes Laimer (1):
network: sdn: keep the DHCP backends current on guest NICs
src/PVE/CLI/qm.pm | 4 ++--
src/PVE/QemuServer.pm | 4 ++++
src/PVE/QemuServer/Network.pm | 4 ++--
src/test/hotplug/net-change-bridge.conf.expected | 3 ++-
src/usr/pve-bridge | 8 +++++++-
src/usr/pve-bridgedown | 4 ++--
6 files changed, 19 insertions(+), 8 deletions(-)
pve-container:
Hannes Laimer (1):
net: report NIC plugs and removals to the SDN DHCP backends
src/PVE/LXC.pm | 13 +++++++++++--
src/PVE/LXC/Config.pm | 3 ++-
src/lxc-pve-poststop-hook | 6 +++---
3 files changed, 16 insertions(+), 6 deletions(-)
pve-manager:
Hannes Laimer (2):
ui: sdn: add zone DHCP backend selector and subnet DHCP options
sdn: bring up the DHCP backends at boot before the guests start
bin/pve-sdn-commit | 4 ++++
services/pve-sdn-commit.service | 1 +
www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
5 files changed, 45 insertions(+), 11 deletions(-)
proxmox-ve-rs:
Hannes Laimer (1):
ve-config: sdn: add the ebpf dhcp backend
proxmox-ve-config/src/sdn/config.rs | 3 +++
1 file changed, 3 insertions(+)
pve-docs:
Hannes Laimer (2):
sdn: zones: document the MTU taken from the underlay interface
sdn: dhcp: add eBPF backend section
pvesdn.adoc | 142 +++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 108 insertions(+), 34 deletions(-)
Summary over all repositories:
58 files changed, 4822 insertions(+), 101 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 10%]
* superseded: [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs,-ve-rs}/qemu-server v5 00/15] sdn: implement DHCP for all zones using eBPF
2026-11-02 15:18 11% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs,-ve-rs}/qemu-server v5 00/15] " Hannes Laimer
@ 2026-11-05 10:05 7% ` Hannes Laimer
0 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-11-05 10:05 UTC (permalink / raw)
To: pve-devel
superseded-by:
https://lore.proxmox.com/pve-devel/20261105100316.449163-1-h.laimer@proxmox.com
On 2026-11-02 16:18, Hannes Laimer wrote:
> This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
> picks its backend. dnsmasq stays limited to simple zones, while ebpf
> answers on the guest's own interface and works on every zone type. A
> guest on a zone with the ebpf backend gets the address its NIC has in
> the IPAM. There is no daemon per zone and no lease file. The answers
> are held in the kernel and do not depend on the IPAM being reachable.
>
> The responder is a BPF program on the ingress of each guest interface
> of a zone with the ebpf backend. It answers a request from the record
> of that interface, and the exchange never reaches the bridge. A
> request whose client MAC is not the interface's own passes on
> unanswered. So a guest cannot read another guest's record, and a
> nested client does not get the outer guest's address.
>
> An edit through /cluster/sdn/vnets/{vnet}/ips is proxied to the
> guest's node and updates the backend there. The guest sees the change
> at its next renewal, so the lease time bounds how long an old answer
> survives. Subnets get a dhcp-lease-time property for both backends.
> Without it dnsmasq hands out infinite leases and the responder ten
> minutes. An apply attaches the responder to running guests, so a zone
> switched to ebpf serves them without a restart.
>
> Changes reach the kernel in the order they read their input. So no
> change overwrites a newer one with older input. A hotplug moves the
> interface before the guest config names the new bridge. An apply or an
> edit that read the older config in between leaves the moved interface
> as its plug left it. A change that fails only warns, and what was
> served stays served. Nothing of the responder survives a reboot, so it
> is loaded again at boot before the guests start.
>
> Only DHCPv4 is answered. A request the guest tagged itself passes
> unanswered as well, so a trunk port keeps working as before. The
> request is answered on the guest interface, so the guest's firewall
> rules, its DHCP firewall option and its rate limit do not apply to it.
> The reply leaves through the interface's egress, where the rate limit
> shapes it. A request the responder does not answer passes on to the
> bridge and through the firewall as before. Mappings changed directly
> in an external IPAM are not picked up, as with dnsmasq.
>
> In patch order, the series adds
> - proxmox-ebpf, the dhcp subsystem, a tc program answering on the
> guest interface and the per-interface map it answers from
> - pve-rs, the bindings
> - pve-network, the VXLAN and EVPN MTU taken from the underlay
> interface, the ebpf backend, the hooks that keep a backend current
> when a guest interface changes, and dhcp on every zone type
> - qemu-server and pve-container, the reports of a guest NIC coming,
> going or moving
> - pve-manager, the backend and subnet options in the UI, and the
> backends brought up at boot ahead of the guests
> - proxmox-ve-rs, the ebpf variant of the dhcp backend type
> - pve-docs, documentation
>
> - proxmox-ebpf applies on top of the v5 of its own series [1]
> - pve-network and qemu-server apply on top of [2]
> - pve-rs needs proxmox-ebpf with the dhcp feature
> - pve-network needs pve-rs, at build and run time
> - qemu-server, pve-container and pve-manager need pve-network
> - proxmox-ve-config needs nothing, and proxmox-firewall needs its
> dependency on it bumped, since an older one fails to parse a zone
> with the ebpf backend and the firewall then cannot load its config
> An older pve-network fails its apply on the unknown backend, so every
> node needs the new one before a zone gets ebpf.
>
>
> v5:
> * rebased onto ebpf-lib v5 [1]
> * the MAC cache and dnsmasq fixes moved to [2], as did running a
> mapping edit on the guest's node and the push on resume
> * a mapping edit only changes the answers on its own vnet
> * the VXLAN and EVPN bridges get the MTU that DHCP hands out, both
> take it from the underlay interface
> * a MAC change on the same vnet is no longer undone by an apply
> running meanwhile
>
> v4, thanks @Stefan!:
> * a mapping edit runs on the guest's node instead of being pushed to
> it, the node endpoint is gone
> * the MAC cache is read and written with lower-case keys, and its
> three fixes are three commits
> * the guest NIC list is keyed by MAC
> * add the missing proxmox-ve-rs patch, the ebpf variant of the dhcp
> backend type
> * reword log lines and warnings
> * (notes on patches with changes)
>
> v3:
> * drop the generation counter. Every change takes the responder's
> lock before it reads its input instead. An edit takes it
> exclusively
> * the resume at the end of a live migration pushes the guest's
> mappings again on the target, so an edit made during the migration
> reaches it
> * new first pve-network commit, a dnsmasq fix that replaces a stale
> reservation of another MAC instead of dropping it
> * no MTU option for a zone without an MTU, where v2 handed out 1500
> * a mapping edit without a MAC no longer reaches the backends
> * rewrite commit messages, cover letter and parts of the docs
> * rebase onto current master
>
> pre-build packages are on sani(`packages/ebpf-dhcp-v5`)
>
> [1] https://lore.proxmox.com/pve-devel/20261102150047.1584789-1-h.laimer@proxmox.com/
> [2] https://lore.proxmox.com/pve-devel/20261102145630.1555953-1-h.laimer@proxmox.com/
>
>
> proxmox-ebpf:
>
> Hannes Laimer (2):
> dhcp: add the per-tap DHCPv4 responder program
> dhcp: add the subsystem that loads the responder and keeps its records
>
> Cargo.toml | 5 +
> debian/control | 6 +-
> src/bpf-shim/bpf/bpf_helpers.h | 3 +
> src/bpf-shim/vmlinux.h | 1 +
> src/dhcp/bpf/dhcp.bpf.c | 401 +++++++++++
> src/dhcp/bpf/types.h | 24 +
> src/dhcp/mod.rs | 1131 ++++++++++++++++++++++++++++++++
> src/dhcp/types.rs | 65 ++
> src/lib.rs | 3 +
> src/subsystem.rs | 2 +-
> tests/common/mod.rs | 63 +-
> tests/dhcp.rs | 825 +++++++++++++++++++++++
> 12 files changed, 2523 insertions(+), 6 deletions(-)
> create mode 100644 src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 src/dhcp/bpf/types.h
> create mode 100644 src/dhcp/mod.rs
> create mode 100644 src/dhcp/types.rs
> create mode 100644 tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add bindings for the eBPF DHCP responder
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 3 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 237 ++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 245 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (6):
> sdn: zones: take the VXLAN and EVPN MTU from the underlay interface
> sdn: dhcp: make the lease time configurable per subnet
> sdn: dhcp: require a backend only if a zone on this node uses it
> sdn: dhcp: add an eBPF backend answering on each guest interface
> sdn: zones: report interface plugs and unplugs to the DHCP backends
> sdn: zones: allow the ebpf DHCP backend on every zone type
>
> debian/libpve-network-perl.prerm | 13 +
> src/PVE/API2/Network/SDN/Zones.pm | 11 +-
> src/PVE/Network/SDN/Dhcp.pm | 103 +-
> src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 3 +-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 301 ++++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Dhcp/Plugin.pm | 24 +-
> src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
> src/PVE/Network/SDN/Vnets.pm | 2 +-
> src/PVE/Network/SDN/Zones.pm | 29 +-
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 40 +-
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 31 +-
> src/test/run_test_vnets_blackbox.pl | 999 +++++++++++++++++-
> .../underlay_mtu/expected_controller_config | 44 +
> .../evpn/underlay_mtu/expected_sdn_interfaces | 42 +
> src/test/zones/evpn/underlay_mtu/interfaces | 8 +
> src/test/zones/evpn/underlay_mtu/sdn_config | 26 +
> .../underlay_mtu/expected_sdn_interfaces | 15 +
> src/test/zones/vxlan/underlay_mtu/interfaces | 8 +
> src/test/zones/vxlan/underlay_mtu/sdn_config | 11 +
> 24 files changed, 1704 insertions(+), 36 deletions(-)
> create mode 100755 debian/libpve-network-perl.prerm
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
> create mode 100644 src/test/zones/evpn/underlay_mtu/expected_controller_config
> create mode 100644 src/test/zones/evpn/underlay_mtu/expected_sdn_interfaces
> create mode 100644 src/test/zones/evpn/underlay_mtu/interfaces
> create mode 100644 src/test/zones/evpn/underlay_mtu/sdn_config
> create mode 100644 src/test/zones/vxlan/underlay_mtu/expected_sdn_interfaces
> create mode 100644 src/test/zones/vxlan/underlay_mtu/interfaces
> create mode 100644 src/test/zones/vxlan/underlay_mtu/sdn_config
>
>
> qemu-server:
>
> Hannes Laimer (1):
> network: sdn: keep the DHCP backends current on guest NICs
>
> src/PVE/CLI/qm.pm | 4 ++--
> src/PVE/QemuServer.pm | 4 ++++
> src/PVE/QemuServer/Network.pm | 4 ++--
> src/test/hotplug/net-change-bridge.conf.expected | 3 ++-
> src/usr/pve-bridge | 8 +++++++-
> src/usr/pve-bridgedown | 4 ++--
> 6 files changed, 19 insertions(+), 8 deletions(-)
>
>
> pve-container:
>
> Hannes Laimer (1):
> net: report NIC plugs and removals to the SDN DHCP backends
>
> src/PVE/LXC.pm | 13 +++++++++++--
> src/PVE/LXC/Config.pm | 3 ++-
> src/lxc-pve-poststop-hook | 6 +++---
> 3 files changed, 16 insertions(+), 6 deletions(-)
>
>
> pve-manager:
>
> Hannes Laimer (2):
> ui: sdn: add zone DHCP backend selector and subnet DHCP options
> sdn: bring up the DHCP backends at boot before the guests start
>
> bin/pve-sdn-commit | 4 ++++
> services/pve-sdn-commit.service | 1 +
> www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 5 files changed, 45 insertions(+), 11 deletions(-)
>
>
> proxmox-ve-rs:
>
> Hannes Laimer (1):
> ve-config: sdn: add the ebpf dhcp backend
>
> proxmox-ve-config/src/sdn/config.rs | 3 +++
> 1 file changed, 3 insertions(+)
>
>
> pve-docs:
>
> Hannes Laimer (1):
> sdn: dhcp: add eBPF backend section
>
> pvesdn.adoc | 127 ++++++++++++++++++++++++++++++++++++++++------------
> 1 file changed, 98 insertions(+), 29 deletions(-)
>
>
> Summary over all repositories:
> 57 files changed, 4653 insertions(+), 96 deletions(-)
>
^ permalink raw reply [relevance 7%]
* [PATCH access-control/cluster/container/docs/manager/network/proxmox{,-ve-rs,-perl-rs}/qemu-server v4 00/45] sdn: add microsegmentation support
@ 2026-11-05 11:12 6% Hannes Laimer
0 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-11-05 11:12 UTC (permalink / raw)
To: pve-devel
This series adds group-based microsegmentation to SDN, enforced by eBPF
programs on the guest interfaces. Assignments put guest interfaces into
groups, and rules between groups decide which traffic passes. Sets that
every rule treats the same share one identity, a 16-bit value that
travels with the frame in the low bits of the packet mark. The host
stamps it where a frame comes off the guest interface, so a guest cannot
forge its own. A new zone option turns on VXLAN-GBP[2] for VXLAN and
EVPN zones, which carries the identity across nodes. On a zone without
it, traffic from another node arrives without an identity. An identity
that loses one of its sets after a config change is retired. Its value
is reused only after a quarantine, since a frame stamped under the old
config can still be in flight.
The config in /etc/pve/sdn/microseg.cfg, with its API under
/cluster/sdn/microseg and the ACL path /sdn/microseg, holds groups,
rules and assignments and takes effect with an SDN apply. Groups can
nest, and a member of a subgroup is in every group above it. A rule
allows or denies traffic from a source predicate to a destination
predicate at a priority. A predicate of the kind `any`, `all` or
`exact` lists groups and matches an interface that has one of them, all
of them, or those and no others. An `every` predicate lists none and
matches each interface that has a group. Beyond the pair, a rule can be
narrowed to a protocol and ports, an ICMP type, a firewall macro or
non-first fragments. Which groups an interface has is determined by the
assignments, an ordered list that matches interfaces by guest, tag or
name regex. An interface takes the groups of the first one that covers
it.
Default is deny. Only interfaces that have at least one group assigned
are enforced. Enforcement happens when a frame arrives at an enforced
interface, so nothing is dropped on the way out of a guest's interface.
Traffic from interfaces that are not enforced is untagged, which
includes guests without groups on their NICs, the host and the outside.
Such traffic has to be allowed explicitly with the built-in untagged
group. Rules are stateless and directional, so a reply needs its own
allow, or the rule is marked bidirectional. Stateless also means no
reassembly, so fragments after the first carry no transport header. A
narrowed rule matches them only when it is narrowed to fragments.
The highest priority wins. At the same priority the rule with the more
specific `all` or `exact` predicate decides, so an `all` or `exact` rule
on a subgroup outranks the same rule on its parent. Equally specific
rules deny if one of them denies. Narrowed rules are checked before the
rules that decide the whole pair at the same priority.
A guest interface gets its groups the moment it comes up, from the
assignment that matches the guest at that moment. Changing the tags or
the name of a running guest takes effect right after the config is
written. The NICs get the groups the assignments now give them. Once no
assignment matches the guest, their enforcement stops. A change that
reaches the config another way, such as a restore or a migration, takes
effect the next time the NIC comes up or at the next SDN apply. A tag
or name the assignments match moves a guest between groups. So a tag
change or a rename that moves a guest into or out of an assignment
needs SDN.Use on /sdn/microseg besides the right to change the option.
Putting a NIC on a vnet needs SDN.Use on the vnet the same way.
As long as the policy has an assignment, every node keeps the programs
and maps loaded, about 20 MiB plus what the pairs take. Without one, the
nodes drop them. The BPF state does not survive a reboot, so a node
applies the policy again at boot, before any guest starts. The programs
are compiled into libpve-rs-perl, so an upgrade of that package applies
the policy again as well.
The SDN apply checks the policy against what a node can hold before it
writes the running config, and refuses one that exceeds it. A node that
cannot apply the policy fails its network reload task and keeps its
previous enforcement. A node without loaded programs, as after a failed
load at boot, starts no guest with an assigned interface until an apply
or a reload succeeds there. A guest also does not start when its node
cannot read or parse the running config, or cannot set up the
enforcement of its assigned interface.
ARP and neighbor solicitations/advertisements pass wherever either
direction of a pair allows anything, so the two ends of a one-way allow
can resolve each other's addresses. They also pass when the host itself
sends them without an identity. That is how the suppression replies of
an EVPN zone reach the guest. A frame the host turns around on the
interface it came in on passes as a whole, since only the host can make
one. Behind a firewall bridge the host's frames cannot be told from
other unstamped ones, so an interface there takes these frames from
every unstamped sender. The narrowed rules of a pair run first, so a
narrowed rule that denies neighbor discovery still holds.
In patch order, the series adds
- proxmox, the policy subsystem of the proxmox-ebpf crate, with the tc
programs that stamp and check the identities
- proxmox-ve-rs, the types, the identity engine and the desired state
in proxmox-ve-config, and the new proxmox-microseg crate that hands
the desired state to the subsystem
- pve-cluster, microseg.cfg as an observed file
- pve-access-control, the /sdn/microseg ACL path
- proxmox-perl-rs, the config binding and the data plane binding in
pve-rs
- pve-network, the config, the API, the dry-run view, the zone option
and the enforcement on interface plug and after a library upgrade
- pve-manager, the panel, the dry-run view and the apply on network
reload and at boot
- qemu-server and pve-container, the immediate update of a running
guest's NICs on a tag or name change, and SDN.Use for a tag or name
the policy matches
- pve-docs, documentation
- pve-network needs pve-cluster, pve-access-control, pve-rs,
pve-guest-common and ifupdown2 3.3.0-1+pmx13 for the vxlan-gbp
attribute
- pve-manager needs pve-docs to build and pve-network and
pve-access-control at runtime
- pve-rs needs proxmox-microseg and proxmox-ve-config
- qemu-server and pve-container need pve-network
- proxmox-microseg needs proxmox-ve-config and the proxmox-ebpf crate
- the proxmox patches apply on top of the eBPF library series[1], which
adds the proxmox-ebpf crate there
The series is independent of the eBPF DHCP series[3]. Both add a
subsystem to the proxmox-ebpf crate behind a feature of its own. The
run order is the one place that needs an order when both are applied,
dhcp goes ahead of policy so its replies pass the policy as the host's
answers.
[1] https://lore.proxmox.com/pve-devel/20261104172918.2643810-1-h.laimer@proxmox.com/
[2] https://lore.proxmox.com/pve-devel/20260828134708.692354-1-h.laimer@proxmox.com/
[3] https://lore.proxmox.com/pve-devel/20261105100316.449163-1-h.laimer@proxmox.com/
note: I did also have this implemented with nft instead of ebpf as a
dataplane. Without narrowing, packets per second (small UDP packets) was
about the same, with multiple checks nft's rate went down, nothing super
dramatic but about a 1.5-2x compared to eBPF (~140k vs ~250k). eBPF is
also more flexible, in case we want to expand possible actions in the
future, but replacing the dataplane is pretty simple which also allowed
me to do the side-by-side testing.
changelog
v4:
- the SDN.Use checks for a tag or name change read the applied policy
instead of the pending one, and creating, cloning or restoring a
guest with such a tag or name needs SDN.Use too
- the SDN.Use check for a tag change asks the matcher whether the guest
enters or leaves a tag assignment, instead of looking for a changed
tag the assignments name. A tag none of them names still moves a
guest out of an exact match, which the old check let pass
- an identity is retired as soon as it loses one of its sets, not only
once all are gone. A node on the new config then never takes a stamp
from a node still on the old one for the shrunken class
- a destroy with purge removes the guest's own assignments, tag and
regex assignments stay
- only zones that share a VXLAN port on the same node must agree on
vxlan-gbp
- a boot commit of pending sdn changes leaves the policy pending, since
it reloads only that node
- a check for AH matches an IPv6 frame whose AH was walked past as well
- ui: the panel shows for SDN.Audit on the policy without Sys.Audit,
like the storage panel, and the dry-run lists the groups with their
parents
- a pass writes the policy into fresh maps and switches programs and
maps together, so a failed apply leaves the node on the policy it
had, and the desired state is folded one pair at a time, pairs with
the same checks sharing one list
v3:
- the data plane is a library crate in the proxmox-ve-rs workspace that
pve-rs binds, on a policy subsystem in proxmox-ebpf, no agent binary
and no boot unit. A node loads the programs while the policy has an
assignment and takes new programs on a package upgrade
- the model changed in five places:
* groups have no numeric mark and can form a hierarchy
* assignments are an ordered list and an interface takes the groups
of the first that covers it instead of the union of all
* rules can be narrowed similar to how firewall rules work,
additionally non-first fragments can be matched and an explicit
bidirectional flag exists
* at a priority tie the more specific rule decides
* new `every` predicate that matches everything that has at least
one group assigned
- interface group (re)assignment happens whenever an interface comes
up, sdn apply runs or the tags or name of a running guest change. A
tag change or a rename that moves a guest into or out of an
assignment now also needs SDN.Use on the policy, similar to how we
check if a user is allowed to assign a vnet
- if a node cannot apply the policy, its network reload task fails.
while a node has no loaded programs, as after a failed load at boot,
guests with an assigned NIC do not start on it. a nic with groups
only comes up enforced
- ARP and NS/NA are automatically allowed if there exists a (src,dst)
-> [checks ->] allow in either direction, this is so address
resolution for allowed connections is possible. Also host-generated
ARP and NS/NA frames are allowed, this is specifically needed for
EVPN suppression to work, and a frame the host turns around on the
interface it came in on passes
- api: section types and property keys are kebab-case, the endpoints
check /sdn/microseg (a pve-access-control patch adds the ACL path),
and the overview reports members, evaluation order and specificity
instead of a realized state, plus the id space usage
- rule and assignment ids are derived from their identifying fields,
so those cannot change on an existing object
- ui: a panel with the rule grid by priority, the assignments in match
order, the dry-run view, the rule editor on the firewall's selectors,
and a guest tab with its groups and rules
- the SRv6 carrier and its bridge object are out, the ifupdown2
vxlan-gbp attribute is a standalone patch, the zone option stays,
docs rewritten
v2:
- core model reworked: each interface now holds a *set* of groups
compiled into a per-NIC wire identity, replacing the single-group
parent/child tree
- rules gained explicit `src`/`dst` predicates (any/all/exact) and a
`prio`, replacing the implicit tree-distance ordering
- `untagged` is now a nameable built-in group (mark 0)
- assignments are additive: a NIC's set is the union of all that
resolve to it
- added tag-matcher and name-regex assignments
- rule and dynamic-assignment ids are now generated
- identity allocation is fresh-first with quarantined reclamation, so
churn cannot exhaust the id space
- split the SRv6 carrier support into droppable tail patches
- updated docs
- updated cover-letter
proxmox:
Hannes Laimer (3):
ebpf: build: keep the build directory out of the BPF objects
ebpf: policy: add the enforcement subsystem for guest interfaces
ebpf: policy: add a check for non-first fragments
proxmox-ebpf/Cargo.toml | 1 +
proxmox-ebpf/build.rs | 4 +
proxmox-ebpf/debian/control | 18 +
proxmox-ebpf/src/bpf-shim/bpf/bpf_helpers.h | 1 +
proxmox-ebpf/src/bpf-shim/linux/bpf.h | 1 +
proxmox-ebpf/src/lib.rs | 3 +
proxmox-ebpf/src/policy/bpf/mark.h | 27 +
proxmox-ebpf/src/policy/bpf/policy.bpf.c | 383 +++++++++
proxmox-ebpf/src/policy/bpf/types.h | 75 ++
proxmox-ebpf/src/policy/mod.rs | 820 +++++++++++++++++++
proxmox-ebpf/src/policy/types.rs | 159 ++++
proxmox-ebpf/src/subsystem.rs | 23 +-
proxmox-ebpf/tests/common/mod.rs | 36 +
proxmox-ebpf/tests/policy.rs | 857 ++++++++++++++++++++
14 files changed, 2407 insertions(+), 1 deletion(-)
create mode 100644 proxmox-ebpf/src/policy/bpf/mark.h
create mode 100644 proxmox-ebpf/src/policy/bpf/policy.bpf.c
create mode 100644 proxmox-ebpf/src/policy/bpf/types.h
create mode 100644 proxmox-ebpf/src/policy/mod.rs
create mode 100644 proxmox-ebpf/src/policy/types.rs
create mode 100644 proxmox-ebpf/tests/policy.rs
proxmox-ve-rs:
Hannes Laimer (11):
ve-config: firewall: add a constructor for sctp matches
ve-config: sdn: microseg: add identity allocation for group sets
ve-config: sdn: microseg: add config types
ve-config: sdn: microseg: add tag matcher
ve-config: sdn: microseg: add name regex matcher
ve-config: sdn: microseg: narrow rules by protocol and ports
ve-config: sdn: microseg: add group hierarchy
ve-config: firewall: expose protocol, icmp type and code numbers
ve-config: sdn: microseg: add the desired state
microseg: add a crate that applies the policy to a node's guest NICs
microseg: add a rule option that matches non-first fragments
Cargo.toml | 2 +
proxmox-microseg/Cargo.toml | 20 +
proxmox-microseg/debian/changelog | 5 +
proxmox-microseg/debian/control | 46 +
proxmox-microseg/debian/copyright | 18 +
proxmox-microseg/debian/debcargo.toml | 7 +
proxmox-microseg/debian/source/format | 1 +
proxmox-microseg/src/ebpf.rs | 249 +++
proxmox-microseg/src/lib.rs | 66 +
proxmox-microseg/src/nic.rs | 120 ++
proxmox-microseg/src/running_config.rs | 26 +
proxmox-ve-config/src/firewall/fw_macros.rs | 7 +
proxmox-ve-config/src/firewall/ports.rs | 65 +
.../src/firewall/types/rule_match.rs | 63 +
proxmox-ve-config/src/sdn/microseg/api.rs | 719 +++++++++
.../src/sdn/microseg/identity.rs | 570 +++++++
proxmox-ve-config/src/sdn/microseg/mod.rs | 1421 +++++++++++++++++
proxmox-ve-config/src/sdn/microseg/state.rs | 650 ++++++++
proxmox-ve-config/src/sdn/microseg/types.rs | 549 +++++++
proxmox-ve-config/src/sdn/mod.rs | 1 +
20 files changed, 4605 insertions(+)
create mode 100644 proxmox-microseg/Cargo.toml
create mode 100644 proxmox-microseg/debian/changelog
create mode 100644 proxmox-microseg/debian/control
create mode 100644 proxmox-microseg/debian/copyright
create mode 100644 proxmox-microseg/debian/debcargo.toml
create mode 100644 proxmox-microseg/debian/source/format
create mode 100644 proxmox-microseg/src/ebpf.rs
create mode 100644 proxmox-microseg/src/lib.rs
create mode 100644 proxmox-microseg/src/nic.rs
create mode 100644 proxmox-microseg/src/running_config.rs
create mode 100644 proxmox-ve-config/src/sdn/microseg/api.rs
create mode 100644 proxmox-ve-config/src/sdn/microseg/identity.rs
create mode 100644 proxmox-ve-config/src/sdn/microseg/mod.rs
create mode 100644 proxmox-ve-config/src/sdn/microseg/state.rs
create mode 100644 proxmox-ve-config/src/sdn/microseg/types.rs
pve-cluster:
Hannes Laimer (1):
cfs: add 'sdn/microseg.cfg' to observed files
src/PVE/Cluster.pm | 1 +
src/pmxcfs/status.c | 1 +
2 files changed, 2 insertions(+)
pve-access-control:
Hannes Laimer (1):
permissions: add ACL path for SDN microsegmentation
src/PVE/AccessControl.pm | 1 +
1 file changed, 1 insertion(+)
proxmox-perl-rs:
Hannes Laimer (4):
pve-rs: sdn: add microseg config binding
pve-rs: sdn: microseg: bind the data plane
pve-rs: sdn: microseg: check the data plane limits on render
pve-rs: debian: fire the pve-microseg-update trigger on upgrade
pve-rs/Cargo.toml | 2 +
pve-rs/Makefile | 3 +
pve-rs/debian/control | 1 +
pve-rs/debian/triggers | 1 +
pve-rs/src/bindings/sdn/microseg.rs | 364 ++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
6 files changed, 372 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/microseg.rs
pve-network:
Hannes Laimer (10):
sdn: zones: add vxlan-gbp option to vxlan and evpn zones
sdn: microseg: add config, API and guest inventory
sdn: dry-run: show pending microseg changes
sdn: microseg: enforce the policy on guest NICs
sdn: microseg: add tag matcher
sdn: microseg: add name regex matcher
sdn: microseg: add an update for a running NIC
sdn: microseg: expose protocol, port and macro rule options
sdn: microseg: allow nesting groups under a parent
sdn: microseg: expose the fragments rule option
debian/control | 1 +
debian/libpve-network-perl.postinst | 21 +
debian/triggers | 1 +
src/PVE/API2/Network/SDN.pm | 47 +-
src/PVE/API2/Network/SDN/Makefile | 2 +
src/PVE/API2/Network/SDN/Microseg.pm | 236 ++++++++
.../API2/Network/SDN/Microseg/Assignment.pm | 23 +
src/PVE/API2/Network/SDN/Microseg/Base.pm | 382 +++++++++++++
src/PVE/API2/Network/SDN/Microseg/Group.pm | 17 +
src/PVE/API2/Network/SDN/Microseg/Makefile | 11 +
src/PVE/API2/Network/SDN/Microseg/Rule.pm | 22 +
src/PVE/API2/Network/SDN/Zones.pm | 8 +
src/PVE/Network/SDN.pm | 32 +-
src/PVE/Network/SDN/Makefile | 1 +
src/PVE/Network/SDN/Microseg.pm | 502 ++++++++++++++++++
src/PVE/Network/SDN/Zones.pm | 41 ++
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 8 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 12 +
.../zones/evpn/gbp/expected_controller_config | 77 +++
.../zones/evpn/gbp/expected_sdn_interfaces | 45 ++
src/test/zones/evpn/gbp/interfaces | 7 +
src/test/zones/evpn/gbp/sdn_config | 26 +
.../zones/vxlan/gbp/expected_sdn_interfaces | 17 +
src/test/zones/vxlan/gbp/interfaces | 7 +
src/test/zones/vxlan/gbp/sdn_config | 11 +
25 files changed, 1553 insertions(+), 4 deletions(-)
create mode 100644 src/PVE/API2/Network/SDN/Microseg.pm
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Assignment.pm
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Base.pm
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Group.pm
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Makefile
create mode 100644 src/PVE/API2/Network/SDN/Microseg/Rule.pm
create mode 100644 src/PVE/Network/SDN/Microseg.pm
create mode 100644 src/test/zones/evpn/gbp/expected_controller_config
create mode 100644 src/test/zones/evpn/gbp/expected_sdn_interfaces
create mode 100644 src/test/zones/evpn/gbp/interfaces
create mode 100644 src/test/zones/evpn/gbp/sdn_config
create mode 100644 src/test/zones/vxlan/gbp/expected_sdn_interfaces
create mode 100644 src/test/zones/vxlan/gbp/interfaces
create mode 100644 src/test/zones/vxlan/gbp/sdn_config
pve-manager:
Hannes Laimer (11):
network: apply the microseg policy on reload
pve-sdn-commit: apply the microseg policy at boot
ui: sdn: zones: add vxlan-gbp checkbox to vxlan and evpn
ui: sdn: add microsegmentation panel
ui: sdn: dry-run: show pending microseg diff
ui: sdn: microseg: add tag matcher
ui: sdn: microseg: add name regex matcher
ui: sdn: microseg: add narrowing to the rule form
ui: sdn: microseg: show and edit the group hierarchy
ui: sdn: microseg: add fragments option to the rule form
ui: sdn: microseg: add a guest tab with its groups and rules
PVE/API2/Network.pm | 31 +-
bin/pve-sdn-commit | 49 ++-
services/pve-sdn-commit.service | 1 +
www/css/ext6-pve.css | 23 ++
www/manager6/Makefile | 10 +
www/manager6/Utils.js | 103 ++++++
www/manager6/data/PermPathStore.js | 1 +
www/manager6/dc/Config.js | 11 +
www/manager6/form/SDNMicrosegGroupSelector.js | 105 ++++++
www/manager6/grid/FirewallRules.js | 2 +
www/manager6/lxc/Config.js | 10 +
www/manager6/qemu/Config.js | 10 +
www/manager6/sdn/MicrosegView.js | 98 +++++
www/manager6/sdn/SdnDiffView.js | 29 ++
www/manager6/sdn/microseg/AssignmentEdit.js | 148 ++++++++
www/manager6/sdn/microseg/AssignmentView.js | 195 ++++++++++
www/manager6/sdn/microseg/Base.js | 262 ++++++++++++++
www/manager6/sdn/microseg/GroupEdit.js | 40 ++
www/manager6/sdn/microseg/GuestPanel.js | 117 ++++++
www/manager6/sdn/microseg/RuleEdit.js | 285 +++++++++++++++
www/manager6/sdn/microseg/RuleView.js | 342 ++++++++++++++++++
www/manager6/sdn/microseg/Tree.js | 278 ++++++++++++++
www/manager6/sdn/zones/EvpnEdit.js | 8 +
www/manager6/sdn/zones/VxlanEdit.js | 11 +
24 files changed, 2140 insertions(+), 29 deletions(-)
create mode 100644 www/manager6/form/SDNMicrosegGroupSelector.js
create mode 100644 www/manager6/sdn/MicrosegView.js
create mode 100644 www/manager6/sdn/microseg/AssignmentEdit.js
create mode 100644 www/manager6/sdn/microseg/AssignmentView.js
create mode 100644 www/manager6/sdn/microseg/Base.js
create mode 100644 www/manager6/sdn/microseg/GroupEdit.js
create mode 100644 www/manager6/sdn/microseg/GuestPanel.js
create mode 100644 www/manager6/sdn/microseg/RuleEdit.js
create mode 100644 www/manager6/sdn/microseg/RuleView.js
create mode 100644 www/manager6/sdn/microseg/Tree.js
qemu-server:
Hannes Laimer (1):
network: update the microseg enforcement on a tag or name change
src/PVE/API2/Qemu.pm | 39 +++++++++++++++++++++++++++++++++++
src/PVE/QemuServer.pm | 17 ++++++++++++++-
src/PVE/QemuServer/Network.pm | 14 +++++++++++++
3 files changed, 69 insertions(+), 1 deletion(-)
pve-container:
Hannes Laimer (1):
lxc: update the microseg enforcement on a tag or hostname change
src/PVE/API2/LXC.pm | 14 ++++++++++++++
src/PVE/API2/LXC/Config.pm | 3 +++
src/PVE/LXC.pm | 28 ++++++++++++++++++++++++++++
src/PVE/LXC/Create.pm | 4 ++++
4 files changed, 49 insertions(+)
pve-docs:
Hannes Laimer (2):
sdn: zones: document the VXLAN-GBP option
sdn: add microsegmentation section
pvesdn.adoc | 411 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 411 insertions(+)
Summary over all repositories:
100 files changed, 11609 insertions(+), 35 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 6%]
* [PATCH container/docs/manager/network/proxmox{,-perl-rs,-ve-rs}/qemu-server v7 00/21] sdn: implement DHCP for all zones using eBPF
@ 2026-11-12 12:41 10% Hannes Laimer
0 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-11-12 12:41 UTC (permalink / raw)
To: pve-devel
This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
picks its backend. dnsmasq stays limited to simple zones, while ebpf
answers on the guest's own interface and works on every zone type. A
guest on a zone with the ebpf backend gets the address its NIC has in
the IPAM. There is no daemon per zone and no lease file. The answers
are held in the kernel and do not depend on the IPAM being reachable.
The responder is a BPF program on the ingress of each guest interface
of a zone with the ebpf backend. It answers a request from the record
of that interface, and the exchange never reaches the bridge. A
request whose client MAC is not the interface's own passes on
unanswered. So a guest cannot read another guest's record, and a
nested client does not get the outer guest's address.
An edit through /cluster/sdn/vnets/{vnet}/ips is proxied to the
guest's node and updates the backend there. The guest sees the change
at its next renewal, so the lease time bounds how long an old answer
survives. Subnets get a dhcp-lease-time property for both backends.
Without it dnsmasq hands out infinite leases and the responder ten
minutes. An apply attaches the responder to running guests, so a zone
switched to ebpf serves them without a restart.
Changes reach the kernel in the order they read their input. So no
change overwrites a newer one with older input. A hotplug moves the
interface while the new bridge is still a pending change in the guest
config. The responder drops the interface at the move and serves it
again once the change is applied. A request sent in between is not
answered. An apply serves an interface only on the bridge its config
names, and it also repairs an interface whose plug failed. An edit
through the API whose update fails returns an error, with the mapping
saved. Any other change that fails only warns, and the next apply
makes up for it. Nothing of the responder survives a reboot, so it is
loaded again at boot before the guests start.
Only DHCPv4 is answered. A request the guest tagged itself passes
unanswered as well, so a trunk port keeps working as before. The
request is answered on the guest interface, so the guest's firewall
rules, its DHCP firewall option and its rate limit do not apply to it.
The reply leaves through the interface's egress, where the rate limit
shapes it. A request the responder does not answer passes on to the
bridge and through the firewall as before. Mappings changed directly
in an external IPAM are not picked up, as with dnsmasq.
In patch order, the series adds
- proxmox, a byte accessor for the MAC address type of
proxmox-network-types
- pve-rs, the Perl bindings for the responder, and a trigger that
loads the responder again after an upgrade of pve-rs
- pve-network, the VXLAN and EVPN MTU taken from the underlay
interface, the BPF program in a package of its own, the ebpf
backend, the plug and unplug hooks for the DHCP backends, and DHCP
on every zone type
- qemu-server and pve-container, the calls that tell the DHCP backends
when a guest NIC is plugged, unplugged or moved to another bridge
- pve-manager, the backend and subnet options in the UI, and the DHCP
backends started at boot before the guests
- proxmox-ve-rs, ebpf as a DHCP backend type in proxmox-ve-config,
and the crate that loads the program and fills its map with the
answer for each guest interface
- pve-docs, the MTU VXLAN and EVPN zones take from the underlay, and
the documentation of the backend
- proxmox applies on top of the proxmox-ebpf series [1]
- pve-network, qemu-server and pve-docs apply on top of [2]
- pve-container applies on top of [3]
- proxmox-ve-rs needs proxmox-ebpf from [1]
- pve-rs needs proxmox-sdn-dhcp from proxmox-ve-rs, and
proxmox-network-types with the byte accessor
- pve-network needs pve-rs, at build and run time, and clang-21,
libbpf-dev and proxmox-kernel-libc-dev to build the program
- pve-network needs the qemu-server and pve-container of this series
as well, since older ones plug a guest NIC without its MAC
- qemu-server, pve-container and pve-manager need pve-network
- proxmox-firewall needs proxmox-ve-config, since an older one
fails to parse a zone with the ebpf backend and the firewall then
cannot load its config
An older pve-network fails its apply on the unknown backend, so every
node needs the new one before a zone gets ebpf.
v7:
* move dhcp update call to after the config commit, this avoids the
whole problem of the kernel state being newer than the committed
config. the cost of having (hot)plugs and sdn applies based on the
same information, is that during a hotplug, there is a short
timeframe, namely between the unplug and the config commit from
pending, where no responder is active. so between the interface
changing, and the committed config reflecting this change the guest
does not get its dhcp requests answered. this is short, and for dhcp
it'll just ask again
* have the zone mtu consider the address family, v6 needs 20 bytes more
than v4
* rebased onto the ebpf-lib v9 [1] and current master
* the program moved from proxmox to pve-network, into the new
pve-network-ebpf package. the tests for the C bpf programs stayed in
rust, with perl we cant call the compiled program directly, and
having them in C seemed worse than rust, even if the cargo build-dep
for the tests seemed a little odd
* the code that loads the program moved from proxmox into the new
proxmox-sdn-dhcp crate in proxmox-ve-rs
* new pve-rs patch, the responder is loaded again after an upgrade of
pve-rs
* an apply asks the IPAM for missing addresses before it takes the
responder's lock
* new pve-network patch, the underlay lookup of VXLAN and EVPN zones
in a function of its own
v6:
* like the ebpf-lib v8 that this is based on, this moved into the
proxmox workspace
* rebased onto the ipam series v6 [2]
* rebased onto current master
* an apply repairs an interface whose plug failed, once it sits on
the bridge its config names
* a plug reads the zone's backend under the responder's lock, so an
apply switching it meanwhile is not undone
* a map replacement that cannot write every entry keeps the old maps
* an API edit whose DHCP update fails returns an error
* the bindings use the MAC address type of proxmox-network-types
* docs: the MTU default of VXLAN and EVPN zones
v5:
* rebased onto ebpf-lib v5
* the MAC cache and dnsmasq fixes moved to [2], as did running a
mapping edit on the guest's node and the push on resume
* a mapping edit only changes the answers on its own vnet
* the VXLAN and EVPN bridges get the MTU that DHCP hands out, both
take it from the underlay interface
* a MAC change on the same vnet is no longer undone by an apply
running meanwhile
v4, thanks @Stefan!:
* a mapping edit runs on the guest's node instead of being pushed to
it, the node endpoint is gone
* the MAC cache is read and written with lower-case keys, and its
three fixes are three commits
* the guest NIC list is keyed by MAC
* add the missing proxmox-ve-rs patch, the ebpf variant of the dhcp
backend type
* reword log lines and warnings
* (notes on patches with changes)
v3:
* drop the generation counter. Every change takes the responder's
lock before it reads its input instead. An edit takes it
exclusively
* the resume at the end of a live migration pushes the guest's
mappings again on the target, so an edit made during the migration
reaches it
* new first pve-network commit, a dnsmasq fix that replaces a stale
reservation of another MAC instead of dropping it
* no MTU option for a zone without an MTU, where v2 handed out 1500
* a mapping edit without a MAC no longer reaches the backends
* rewrite commit messages, cover letter and parts of the docs
* rebase onto current master
pre-build packages are on sani(`packages/ebpf-dhcp-v7`)
[1] https://lore.proxmox.com/pve-devel/20261110135005.2847847-1-h.laimer@proxmox.com/
[2] https://lore.proxmox.com/pve-devel/20261105093529.209052-1-h.laimer@proxmox.com/
[3] https://lore.proxmox.com/pve-devel/20261112104059.2377096-1-h.laimer@proxmox.com/
proxmox:
Hannes Laimer (1):
network-types: mac address: add an accessor for the bytes
proxmox-network-types/src/mac_address.rs | 5 +++++
1 file changed, 5 insertions(+)
proxmox-perl-rs:
Hannes Laimer (2):
pve-rs: sdn: add bindings for the eBPF DHCP responder
pve-rs: fire the pve-ebpf-update trigger on upgrade
pve-rs/Cargo.toml | 2 +
pve-rs/Makefile | 3 +
pve-rs/debian/control | 1 +
pve-rs/debian/triggers | 1 +
pve-rs/src/bindings/sdn/dhcp.rs | 200 ++++++++++++++++++++++++++++++++
pve-rs/src/bindings/sdn/mod.rs | 1 +
6 files changed, 208 insertions(+)
create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
pve-network:
Hannes Laimer (10):
sdn: zones: take the VXLAN and EVPN MTU from the underlay interface
sdn: zones: account for IPv6 in the VXLAN and EVPN MTU
sdn: dhcp: make the lease time configurable per subnet
sdn: dhcp: require a backend only if a zone on this node uses it
bpf: add the build, the package and a native harness for BPF programs
sdn: dhcp: add the per-tap DHCPv4 responder program
sdn: dhcp: add an eBPF backend answering on each guest interface
sdn: zones: report interface plugs and unplugs to the DHCP backends
sdn: zones: factor out the underlay lookup of VXLAN and EVPN zones
sdn: zones: allow the ebpf DHCP backend on every zone type
.gitignore | 3 +
Makefile | 1 +
debian/control | 14 +
debian/libpve-network-perl.postinst | 22 +
debian/libpve-network-perl.prerm | 13 +
debian/pve-network-ebpf.install | 1 +
debian/pve-network-ebpf.lintian-overrides | 2 +
debian/triggers | 1 +
src/Makefile | 3 +-
src/PVE/API2/Network/SDN/Zones.pm | 16 +-
src/PVE/Network/SDN/Dhcp.pm | 109 +-
src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 5 +-
src/PVE/Network/SDN/Dhcp/Ebpf.pm | 395 ++++++
src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
src/PVE/Network/SDN/Dhcp/Plugin.pm | 24 +-
src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
src/PVE/Network/SDN/Vnets.pm | 2 +-
src/PVE/Network/SDN/Zones.pm | 42 +-
src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 98 +-
src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 105 +-
src/bpf/Makefile | 37 +
src/bpf/dhcp/dhcp.bpf.c | 393 ++++++
src/bpf/dhcp/types.h | 27 +
src/bpf/harness/Cargo.toml | 8 +
src/bpf/harness/build.rs | 101 ++
src/bpf/harness/shim/bpf/bpf_helpers.h | 35 +
src/bpf/harness/shim/bpf_debug.h | 10 +
src/bpf/harness/shim/linux/bpf.h | 28 +
src/bpf/harness/tests/bpf/fixture.bpf.c | 37 +
src/bpf/harness/tests/common/mod.rs | 267 ++++
src/bpf/harness/tests/dhcp.rs | 804 +++++++++++
src/bpf/harness/tests/harness.rs | 98 ++
src/bpf/include/bpf_debug.h | 12 +
src/bpf/order | 1 +
src/test/run_test_vnets_blackbox.pl | 1183 ++++++++++++++++-
.../evpn/ipv6underlay/expected_sdn_interfaces | 8 +-
.../expected_sdn_interfaces | 8 +-
.../expected_sdn_interfaces | 8 +-
.../underlay_mtu/expected_controller_config | 44 +
.../evpn/underlay_mtu/expected_sdn_interfaces | 42 +
src/test/zones/evpn/underlay_mtu/interfaces | 8 +
src/test/zones/evpn/underlay_mtu/sdn_config | 26 +
.../zones/vxlan/ipv6/expected_sdn_interfaces | 4 +-
.../underlay_mtu/expected_sdn_interfaces | 16 +
src/test/zones/vxlan/underlay_mtu/interfaces | 8 +
src/test/zones/vxlan/underlay_mtu/sdn_config | 11 +
.../underlay_mtu_ipv6/expected_sdn_interfaces | 16 +
.../zones/vxlan/underlay_mtu_ipv6/interfaces | 8 +
.../zones/vxlan/underlay_mtu_ipv6/sdn_config | 17 +
53 files changed, 4028 insertions(+), 123 deletions(-)
create mode 100755 debian/libpve-network-perl.prerm
create mode 100644 debian/pve-network-ebpf.install
create mode 100644 debian/pve-network-ebpf.lintian-overrides
create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
create mode 100644 src/bpf/Makefile
create mode 100644 src/bpf/dhcp/dhcp.bpf.c
create mode 100644 src/bpf/dhcp/types.h
create mode 100644 src/bpf/harness/Cargo.toml
create mode 100644 src/bpf/harness/build.rs
create mode 100644 src/bpf/harness/shim/bpf/bpf_helpers.h
create mode 100644 src/bpf/harness/shim/bpf_debug.h
create mode 100644 src/bpf/harness/shim/linux/bpf.h
create mode 100644 src/bpf/harness/tests/bpf/fixture.bpf.c
create mode 100644 src/bpf/harness/tests/common/mod.rs
create mode 100644 src/bpf/harness/tests/dhcp.rs
create mode 100644 src/bpf/harness/tests/harness.rs
create mode 100644 src/bpf/include/bpf_debug.h
create mode 100644 src/bpf/order
create mode 100644 src/test/zones/evpn/underlay_mtu/expected_controller_config
create mode 100644 src/test/zones/evpn/underlay_mtu/expected_sdn_interfaces
create mode 100644 src/test/zones/evpn/underlay_mtu/interfaces
create mode 100644 src/test/zones/evpn/underlay_mtu/sdn_config
create mode 100644 src/test/zones/vxlan/underlay_mtu/expected_sdn_interfaces
create mode 100644 src/test/zones/vxlan/underlay_mtu/interfaces
create mode 100644 src/test/zones/vxlan/underlay_mtu/sdn_config
create mode 100644 src/test/zones/vxlan/underlay_mtu_ipv6/expected_sdn_interfaces
create mode 100644 src/test/zones/vxlan/underlay_mtu_ipv6/interfaces
create mode 100644 src/test/zones/vxlan/underlay_mtu_ipv6/sdn_config
qemu-server:
Hannes Laimer (1):
network: sdn: keep the DHCP backends current on guest NICs
src/PVE/CLI/qm.pm | 4 ++--
src/PVE/QemuServer.pm | 16 ++++++++++++++++
src/PVE/QemuServer/Network.pm | 10 ++++++++--
.../aarch64/net-add-pci-bridge.conf.expected | 1 +
src/test/hotplug/aarch64/net-add.conf.expected | 1 +
.../aarch64/x86-guest-net-add.conf.expected | 1 +
.../hotplug/net-add-pci-bridge.conf.expected | 1 +
src/test/hotplug/net-add.conf.expected | 1 +
src/test/hotplug/net-change-bridge.conf.expected | 4 +++-
src/test/hotplug/net-change-model.conf.expected | 1 +
src/test/hotplug/net-change-rate.conf.expected | 1 +
src/test/run_hotplug_tests.pl | 5 ++++-
src/usr/pve-bridge | 8 +++++++-
src/usr/pve-bridgedown | 4 ++--
14 files changed, 49 insertions(+), 9 deletions(-)
pve-container:
Hannes Laimer (1):
net: report NIC plugs and removals to the SDN DHCP backends
src/PVE/LXC.pm | 33 +++++++++++++++++++++++++++------
src/PVE/LXC/Config.pm | 3 ++-
src/lxc-pve-poststop-hook | 6 +++---
3 files changed, 32 insertions(+), 10 deletions(-)
pve-manager:
Hannes Laimer (2):
ui: sdn: add zone DHCP backend selector and subnet DHCP options
sdn: bring up the DHCP backends at boot before the guests start
bin/pve-sdn-commit | 4 ++++
services/pve-sdn-commit.service | 1 +
www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
5 files changed, 45 insertions(+), 11 deletions(-)
proxmox-ve-rs:
Hannes Laimer (2):
ve-config: sdn: add the ebpf dhcp backend
sdn-dhcp: add the crate that runs the eBPF DHCP responder
Cargo.toml | 2 +
proxmox-sdn-dhcp/Cargo.toml | 18 +
proxmox-sdn-dhcp/debian/changelog | 5 +
proxmox-sdn-dhcp/debian/control | 42 ++
proxmox-sdn-dhcp/debian/copyright | 18 +
proxmox-sdn-dhcp/debian/debcargo.toml | 7 +
proxmox-sdn-dhcp/src/lib.rs | 688 ++++++++++++++++++++++++++
proxmox-sdn-dhcp/src/types.rs | 42 ++
proxmox-ve-config/src/sdn/config.rs | 3 +
9 files changed, 825 insertions(+)
create mode 100644 proxmox-sdn-dhcp/Cargo.toml
create mode 100644 proxmox-sdn-dhcp/debian/changelog
create mode 100644 proxmox-sdn-dhcp/debian/control
create mode 100644 proxmox-sdn-dhcp/debian/copyright
create mode 100644 proxmox-sdn-dhcp/debian/debcargo.toml
create mode 100644 proxmox-sdn-dhcp/src/lib.rs
create mode 100644 proxmox-sdn-dhcp/src/types.rs
pve-docs:
Hannes Laimer (2):
sdn: zones: document the MTU taken from the underlay interface
sdn: dhcp: add eBPF backend section
pvesdn.adoc | 154 +++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 117 insertions(+), 37 deletions(-)
Summary over all repositories:
92 files changed, 5309 insertions(+), 190 deletions(-)
--
Generated by murpp 0.12.0
^ permalink raw reply [relevance 10%]
* superseded: [PATCH container/docs/manager/network/proxmox{,-perl-rs,-ve-rs}/qemu-server v6 00/17] sdn: implement DHCP for all zones using eBPF
2026-11-05 10:02 10% [PATCH container/docs/manager/network/proxmox{,-perl-rs,-ve-rs}/qemu-server v6 00/17] " Hannes Laimer
@ 2026-11-12 12:45 6% ` Hannes Laimer
0 siblings, 0 replies; 25+ results
From: Hannes Laimer @ 2026-11-12 12:45 UTC (permalink / raw)
To: pve-devel
superseded-by:
https://lore.proxmox.com/pve-devel/20261112124201.2844423-1-h.laimer@proxmox.com/
On 2026-11-05 11:04, Hannes Laimer wrote:
> This series adds a second DHCP backend, ebpf, next to dnsmasq. A zone
> picks its backend. dnsmasq stays limited to simple zones, while ebpf
> answers on the guest's own interface and works on every zone type. A
> guest on a zone with the ebpf backend gets the address its NIC has in
> the IPAM. There is no daemon per zone and no lease file. The answers
> are held in the kernel and do not depend on the IPAM being reachable.
>
> The responder is a BPF program on the ingress of each guest interface
> of a zone with the ebpf backend. It answers a request from the record
> of that interface, and the exchange never reaches the bridge. A
> request whose client MAC is not the interface's own passes on
> unanswered. So a guest cannot read another guest's record, and a
> nested client does not get the outer guest's address.
>
> An edit through /cluster/sdn/vnets/{vnet}/ips is proxied to the
> guest's node and updates the backend there. The guest sees the change
> at its next renewal, so the lease time bounds how long an old answer
> survives. Subnets get a dhcp-lease-time property for both backends.
> Without it dnsmasq hands out infinite leases and the responder ten
> minutes. An apply attaches the responder to running guests, so a zone
> switched to ebpf serves them without a restart.
>
> Changes reach the kernel in the order they read their input. So no
> change overwrites a newer one with older input. A hotplug moves the
> interface before the guest config names the new bridge. An apply or an
> edit that read the older config in between leaves the moved interface
> as its plug left it. Once the config names the bridge the interface
> sits on, an apply also repairs an interface whose plug failed. An edit
> through the API whose update fails returns an error, with the mapping
> saved. Any other change that fails only warns, and what was served
> stays served. Nothing of the responder survives a reboot, so it is
> loaded again at boot before the guests start.
>
> Only DHCPv4 is answered. A request the guest tagged itself passes
> unanswered as well, so a trunk port keeps working as before. The
> request is answered on the guest interface, so the guest's firewall
> rules, its DHCP firewall option and its rate limit do not apply to it.
> The reply leaves through the interface's egress, where the rate limit
> shapes it. A request the responder does not answer passes on to the
> bridge and through the firewall as before. Mappings changed directly
> in an external IPAM are not picked up, as with dnsmasq.
>
> In patch order, the series adds
> - proxmox, a byte accessor for the MAC address type of
> proxmox-network-types, and the dhcp subsystem of proxmox-ebpf, a tc
> program answering on the guest interface and the per-interface map
> it answers from
> - pve-rs, the bindings
> - pve-network, the VXLAN and EVPN MTU taken from the underlay
> interface, the ebpf backend, the hooks that keep a backend current
> when a guest interface changes, and dhcp on every zone type
> - qemu-server and pve-container, the reports of a guest NIC coming,
> going or moving
> - pve-manager, the backend and subnet options in the UI, and the
> backends brought up at boot ahead of the guests
> - proxmox-ve-rs, the ebpf variant of the dhcp backend type
> - pve-docs, the MTU VXLAN and EVPN zones take from the underlay, and
> the documentation of the backend
>
> - proxmox applies on top of the proxmox-ebpf series [1]
> - pve-network, qemu-server and pve-docs apply on top of [2]
> - pve-rs needs proxmox-ebpf with the dhcp feature and
> proxmox-network-types with the byte accessor
> - pve-network needs pve-rs, at build and run time
> - qemu-server, pve-container and pve-manager need pve-network
> - proxmox-ve-config needs nothing, and proxmox-firewall needs its
> dependency on it bumped, since an older one fails to parse a zone
> with the ebpf backend and the firewall then cannot load its config
> An older pve-network fails its apply on the unknown backend, so every
> node needs the new one before a zone gets ebpf.
>
>
> v6:
> * like the ebpf-lib v8 [1] that this is based on, this moved into the
> proxmox workspace
> * rebased onto the ipam series v6 [2]
> * rebased onto current master
> * an apply repairs an interface whose plug failed, once it sits on
> the bridge its config names
> * a plug reads the zone's backend under the responder's lock, so an
> apply switching it meanwhile is not undone
> * a map replacement that cannot write every entry keeps the old maps
> * an API edit whose DHCP update fails returns an error
> * the bindings use the MAC address type of proxmox-network-types
> * docs: the MTU default of VXLAN and EVPN zones
>
> v5:
> * rebased onto ebpf-lib v5
> * the MAC cache and dnsmasq fixes moved to [2], as did running a
> mapping edit on the guest's node and the push on resume
> * a mapping edit only changes the answers on its own vnet
> * the VXLAN and EVPN bridges get the MTU that DHCP hands out, both
> take it from the underlay interface
> * a MAC change on the same vnet is no longer undone by an apply
> running meanwhile
>
> v4, thanks @Stefan!:
> * a mapping edit runs on the guest's node instead of being pushed to
> it, the node endpoint is gone
> * the MAC cache is read and written with lower-case keys, and its
> three fixes are three commits
> * the guest NIC list is keyed by MAC
> * add the missing proxmox-ve-rs patch, the ebpf variant of the dhcp
> backend type
> * reword log lines and warnings
> * (notes on patches with changes)
>
> v3:
> * drop the generation counter. Every change takes the responder's
> lock before it reads its input instead. An edit takes it
> exclusively
> * the resume at the end of a live migration pushes the guest's
> mappings again on the target, so an edit made during the migration
> reaches it
> * new first pve-network commit, a dnsmasq fix that replaces a stale
> reservation of another MAC instead of dropping it
> * no MTU option for a zone without an MTU, where v2 handed out 1500
> * a mapping edit without a MAC no longer reaches the backends
> * rewrite commit messages, cover letter and parts of the docs
> * rebase onto current master
>
> pre-build packages are on sani(`packages/ebpf-dhcp-v6`)
>
> [1] https://lore.proxmox.com/pve-devel/20261104172918.2643810-1-h.laimer@proxmox.com/
> [2] https://lore.proxmox.com/pve-devel/20261105093529.209052-1-h.laimer@proxmox.com/
>
>
> proxmox:
>
> Hannes Laimer (3):
> network-types: mac address: add an accessor for the bytes
> ebpf: dhcp: add the per-tap DHCPv4 responder program
> ebpf: dhcp: add the subsystem that loads the responder and keeps its
> records
>
> proxmox-ebpf/Cargo.toml | 5 +
> proxmox-ebpf/debian/control | 18 +
> proxmox-ebpf/src/bpf-shim/bpf/bpf_helpers.h | 1 +
> proxmox-ebpf/src/bpf-shim/linux/bpf.h | 3 +
> proxmox-ebpf/src/dhcp/bpf/dhcp.bpf.c | 400 ++++++
> proxmox-ebpf/src/dhcp/bpf/types.h | 24 +
> proxmox-ebpf/src/dhcp/mod.rs | 1219 +++++++++++++++++++
> proxmox-ebpf/src/dhcp/types.rs | 65 +
> proxmox-ebpf/src/lib.rs | 3 +
> proxmox-ebpf/src/subsystem.rs | 2 +-
> proxmox-ebpf/tests/common/mod.rs | 63 +-
> proxmox-ebpf/tests/dhcp.rs | 825 +++++++++++++
> proxmox-network-types/src/mac_address.rs | 13 +
> 13 files changed, 2636 insertions(+), 5 deletions(-)
> create mode 100644 proxmox-ebpf/src/dhcp/bpf/dhcp.bpf.c
> create mode 100644 proxmox-ebpf/src/dhcp/bpf/types.h
> create mode 100644 proxmox-ebpf/src/dhcp/mod.rs
> create mode 100644 proxmox-ebpf/src/dhcp/types.rs
> create mode 100644 proxmox-ebpf/tests/dhcp.rs
>
>
> proxmox-perl-rs:
>
> Hannes Laimer (1):
> pve-rs: sdn: add bindings for the eBPF DHCP responder
>
> pve-rs/Cargo.toml | 2 +
> pve-rs/Makefile | 3 +
> pve-rs/debian/control | 2 +
> pve-rs/src/bindings/sdn/dhcp.rs | 217 ++++++++++++++++++++++++++++++++
> pve-rs/src/bindings/sdn/mod.rs | 1 +
> 5 files changed, 225 insertions(+)
> create mode 100644 pve-rs/src/bindings/sdn/dhcp.rs
>
>
> pve-network:
>
> Hannes Laimer (6):
> sdn: zones: take the VXLAN and EVPN MTU from the underlay interface
> sdn: dhcp: make the lease time configurable per subnet
> sdn: dhcp: require a backend only if a zone on this node uses it
> sdn: dhcp: add an eBPF backend answering on each guest interface
> sdn: zones: report interface plugs and unplugs to the DHCP backends
> sdn: zones: allow the ebpf DHCP backend on every zone type
>
> debian/libpve-network-perl.prerm | 13 +
> src/PVE/API2/Network/SDN/Zones.pm | 11 +-
> src/PVE/Network/SDN/Dhcp.pm | 107 +-
> src/PVE/Network/SDN/Dhcp/Dnsmasq.pm | 3 +-
> src/PVE/Network/SDN/Dhcp/Ebpf.pm | 345 ++++++
> src/PVE/Network/SDN/Dhcp/Makefile | 2 +-
> src/PVE/Network/SDN/Dhcp/Plugin.pm | 24 +-
> src/PVE/Network/SDN/SubnetPlugin.pm | 11 +
> src/PVE/Network/SDN/Vnets.pm | 2 +-
> src/PVE/Network/SDN/Zones.pm | 29 +-
> src/PVE/Network/SDN/Zones/EvpnPlugin.pm | 40 +-
> src/PVE/Network/SDN/Zones/FaucetPlugin.pm | 1 +
> src/PVE/Network/SDN/Zones/QinQPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/SimplePlugin.pm | 2 +-
> src/PVE/Network/SDN/Zones/VlanPlugin.pm | 7 +
> src/PVE/Network/SDN/Zones/VxlanPlugin.pm | 31 +-
> src/test/run_test_vnets_blackbox.pl | 1017 ++++++++++++++++-
> .../underlay_mtu/expected_controller_config | 44 +
> .../evpn/underlay_mtu/expected_sdn_interfaces | 42 +
> src/test/zones/evpn/underlay_mtu/interfaces | 8 +
> src/test/zones/evpn/underlay_mtu/sdn_config | 26 +
> .../underlay_mtu/expected_sdn_interfaces | 16 +
> src/test/zones/vxlan/underlay_mtu/interfaces | 8 +
> src/test/zones/vxlan/underlay_mtu/sdn_config | 11 +
> 24 files changed, 1770 insertions(+), 37 deletions(-)
> create mode 100755 debian/libpve-network-perl.prerm
> create mode 100644 src/PVE/Network/SDN/Dhcp/Ebpf.pm
> create mode 100644 src/test/zones/evpn/underlay_mtu/expected_controller_config
> create mode 100644 src/test/zones/evpn/underlay_mtu/expected_sdn_interfaces
> create mode 100644 src/test/zones/evpn/underlay_mtu/interfaces
> create mode 100644 src/test/zones/evpn/underlay_mtu/sdn_config
> create mode 100644 src/test/zones/vxlan/underlay_mtu/expected_sdn_interfaces
> create mode 100644 src/test/zones/vxlan/underlay_mtu/interfaces
> create mode 100644 src/test/zones/vxlan/underlay_mtu/sdn_config
>
>
> qemu-server:
>
> Hannes Laimer (1):
> network: sdn: keep the DHCP backends current on guest NICs
>
> src/PVE/CLI/qm.pm | 4 ++--
> src/PVE/QemuServer.pm | 4 ++++
> src/PVE/QemuServer/Network.pm | 4 ++--
> src/test/hotplug/net-change-bridge.conf.expected | 3 ++-
> src/usr/pve-bridge | 8 +++++++-
> src/usr/pve-bridgedown | 4 ++--
> 6 files changed, 19 insertions(+), 8 deletions(-)
>
>
> pve-container:
>
> Hannes Laimer (1):
> net: report NIC plugs and removals to the SDN DHCP backends
>
> src/PVE/LXC.pm | 13 +++++++++++--
> src/PVE/LXC/Config.pm | 3 ++-
> src/lxc-pve-poststop-hook | 6 +++---
> 3 files changed, 16 insertions(+), 6 deletions(-)
>
>
> pve-manager:
>
> Hannes Laimer (2):
> ui: sdn: add zone DHCP backend selector and subnet DHCP options
> sdn: bring up the DHCP backends at boot before the guests start
>
> bin/pve-sdn-commit | 4 ++++
> services/pve-sdn-commit.service | 1 +
> www/manager6/sdn/SubnetEdit.js | 23 +++++++++++++++++++++++
> www/manager6/sdn/zones/Base.js | 17 +++++++++++++++++
> www/manager6/sdn/zones/SimpleEdit.js | 11 -----------
> 5 files changed, 45 insertions(+), 11 deletions(-)
>
>
> proxmox-ve-rs:
>
> Hannes Laimer (1):
> ve-config: sdn: add the ebpf dhcp backend
>
> proxmox-ve-config/src/sdn/config.rs | 3 +++
> 1 file changed, 3 insertions(+)
>
>
> pve-docs:
>
> Hannes Laimer (2):
> sdn: zones: document the MTU taken from the underlay interface
> sdn: dhcp: add eBPF backend section
>
> pvesdn.adoc | 142 +++++++++++++++++++++++++++++++++++++++-------------
> 1 file changed, 108 insertions(+), 34 deletions(-)
>
>
> Summary over all repositories:
> 58 files changed, 4822 insertions(+), 101 deletions(-)
>
^ permalink raw reply [relevance 6%]
Results 1-25 of 25 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2026-07-09 9:18 6% SPAM: [RFC cluster/docs/ifupdown2/manager/network/proxmox{-ve-rs,-ebpf,-perl-rs} v2 00/27] sdn: add microsegmentation support Hannes Laimer
2026-10-27 8:57 2% ` superseded: " Hannes Laimer
2026-09-02 12:47 13% [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
2026-09-02 12:47 17% ` [PATCH pve-network 10/12] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
2026-09-02 12:54 7% ` [RFC manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
2026-09-03 4:26 7% ` Hannes Laimer
2026-09-04 9:39 7% ` superseded: " Hannes Laimer
2026-09-04 9:38 13% [PATCH " Hannes Laimer
2026-09-04 9:38 17% ` [PATCH pve-network 10/12] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
2026-09-09 10:43 7% ` superseded: [PATCH manager/network/proxmox{-ebpf,-perl-rs} 00/12] sdn: implement DHCP for all zones using eBPF Hannes Laimer
2026-09-09 10:41 10% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v2 00/16] " Hannes Laimer
2026-09-09 10:41 23% ` [PATCH pve-network v2 11/16] sdn: zones: offer dhcp on all zone types, keep dnsmasq simple-only Hannes Laimer
2026-10-20 8:01 7% ` superseded: [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v2 00/16] sdn: implement DHCP for all zones using eBPF Hannes Laimer
2026-10-20 7:59 11% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs}/qemu-server v3 00/17] " Hannes Laimer
2026-10-20 13:11 12% ` Stefan Hanreich
2026-10-21 7:35 7% ` Hannes Laimer
2026-10-21 8:46 7% ` superseded: " Hannes Laimer
2026-10-21 8:44 11% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs,-ve-rs}/qemu-server v4 00/20] " Hannes Laimer
2026-11-02 15:19 7% ` superseded: " Hannes Laimer
2026-11-02 15:18 11% [PATCH container/docs/manager/network/proxmox{-ebpf,-perl-rs,-ve-rs}/qemu-server v5 00/15] " Hannes Laimer
2026-11-05 10:05 7% ` superseded: " Hannes Laimer
2026-11-05 10:02 10% [PATCH container/docs/manager/network/proxmox{,-perl-rs,-ve-rs}/qemu-server v6 00/17] " Hannes Laimer
2026-11-12 12:45 6% ` superseded: " Hannes Laimer
2026-11-05 11:12 6% [PATCH access-control/cluster/container/docs/manager/network/proxmox{,-ve-rs,-perl-rs}/qemu-server v4 00/45] sdn: add microsegmentation support Hannes Laimer
2026-11-12 12:41 10% [PATCH container/docs/manager/network/proxmox{,-perl-rs,-ve-rs}/qemu-server v7 00/21] sdn: implement DHCP for all zones using eBPF Hannes Laimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox