diff options
| author | 2026-05-13 13:43:41 +0100 | |
|---|---|---|
| committer | 2026-05-13 13:43:41 +0100 | |
| commit | 8567dd49e9e688f26dc0b266f211655974539299 (patch) | |
| tree | c6569150eb6e983f947f83ab02d72310c2c687ae | |
| parent | 1135d66d925d2b60ae5f56bc46320999fde6b34e (diff) | |
| download | dotfiles-8567dd49e9e688f26dc0b266f211655974539299.tar.gz dotfiles-8567dd49e9e688f26dc0b266f211655974539299.tar.bz2 dotfiles-8567dd49e9e688f26dc0b266f211655974539299.zip | |
fix(networkd): exclude virtual taps/bridges from bond0 enslavement
Type=ether matches ALL L2 ethernet interfaces, including libvirt-created
vnet* tap devices. Without Name= negations, when a VM starts its tap is
pulled into bond0 instead of staying with virbr0, killing DHCP/NAT for
the guest (Windows ends up with a 169.254.x APIPA address).
Add Name= negations to skip libvirt taps/bridges, generic taps, and
common container engine virtual interfaces.
| -rw-r--r-- | etc/systemd/network/30-ethernet-bond0.network | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/etc/systemd/network/30-ethernet-bond0.network b/etc/systemd/network/30-ethernet-bond0.network index 39c4c7a..5aab8bf 100644 --- a/etc/systemd/network/30-ethernet-bond0.network +++ b/etc/systemd/network/30-ethernet-bond0.network @@ -1,8 +1,18 @@ # NOTE: Type=ether matches ALL ethernet interfaces. Any future USB/Thunderbolt # ethernet dongle would be auto-enslaved into bond0. If that becomes a problem, # narrow the [Match] section to MACAddress= or a persistent Name= (e.g. enp*s0). +# +# Name= negations below exclude virtual interfaces that should NEVER be enslaved: +# vnet* — libvirt tap devices (VM NICs) +# virbr* — libvirt bridges +# tap* — generic TAP interfaces +# veth* — container/namespace veth pairs +# docker*, br-*, podman* — container engine bridges +# Without these, e.g. libvirt VM taps get pulled into bond0 and lose their bridge, +# breaking VM networking (DHCP, NAT). [Match] Type=ether +Name=!vnet* !virbr* !tap* !veth* !docker* !br-* !podman* [Network] Bond=bond0 |
