Prerequisites
- The switch port facing the host configured as an 802.1Q trunk, with the desired VLANs
- Console access, in case the host’s network goes down
01Why
Without this option you need one bridge per VLAN. With a “VLAN-aware” bridge, one is enough: the VLAN is chosen per network card, at the level of each VM.
02The configuration
Here the host is managed on VLAN 5 (interface vmbr0.5), and the bridge carries VLANs 2 to 4094. You can restrict bridge-vids to the VLANs actually in use.
Untagged traffic arriving from the switch (the trunk’s native VLAN) is attached to the bridge’s VLAN 1: a VM without a VLAN Tag ends up in that native VLAN.
iface eno1 inet manual
auto vmbr0.5
iface vmbr0.5 inet static
address 10.10.10.2/24
gateway 10.10.10.1
auto vmbr0
iface vmbr0 inet manual
bridge-ports eno1
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-409403Apply without rebooting
Since Proxmox VE 7.0, ifupdown2 is installed by default and reloads the configuration live. Keep a console open: a mistake on the management interface cuts access.
ifreload -a04On the VM side
In the VM’s hardware, the network card stays on vmbr0; just fill in the “VLAN Tag” field. The VM has nothing to configure: it receives untagged frames, as on an access port.
05Verify
# VLANs allowed on each bridge port (eno1, VM interfaces tapXXXiY)
bridge vlan showKey takeaways
- A VLAN-aware bridge replaces one bridge per VLAN.
- The VLAN is chosen per VM network card (VLAN Tag).
- No tag: the VM lands in the trunk’s native VLAN.
- ifreload -a applies live, console open.
Example addresses.