Hi everyone,
I wanted to share a configuration that worked for me on Proxmox VE 9.2.
It allows two VLANs to use different preferred physical NICs, with each VLAN failing over to the other NIC if its preferred link goes down.
This is similar to VMware vSphere's per-Port Group Active/Standby teaming policy.
1. Goal
I have two physical NICs, 'ens194' and 'ens226', connected to switch ports configured as 802.1Q trunks. Both trunks carry VLANs 100 and 200.
I wanted the following behavior:
The important requirement was to have independent failover per VLAN, rather than one active-backup bond shared by both VLANs.
2. Configuration
The solution is to create a Linux VLAN subinterface for each VLAN on each physical NIC, then create a separate OVS active-backup bond for each VLAN.
This gives each VLAN its own independent bond and preferred member.
The following is an example configuration for /etc/network/interfaces.
The interface names, VLAN IDs, and IP addresses are examples and should be adapted to your environment.
3. How it works
- Each physical NIC has a VLAN subinterface for VLAN 100 and another for VLAN 200.
- 'bond100' uses 'ens194.100' as its preferred member.
- 'bond200' uses `ens226.200' as its preferred member.
- Both bonds use OVS 'active-backup' mode, so each VLAN has an independent active uplink.
- Both physical switch ports must allow VLANs 100 and 200 as tagged traffic.
- IP addresses can be assigned to the respective bonds when host-level connectivity is required on those VLANs.
IP addresses can also be assigned to the bonds for host connectivity on their respective VLANs, as shown above.
The example addresses are illustrative; use addresses appropriate for your network.
When attaching VMs in the Proxmox VE GUI, select vmbr100200 as the bridge and set the VM's VLAN tag to either 100 or 200.
The same approach can also be used to separate other traffic, such as storage or migration traffic, onto different VLANs with independent preferred uplinks.
Additionally, vmbr100200 can be selected as the bridge when creating a VLAN zone in Proxmox VE SDN.
4. Verification
I checked the bond status with:
# ovs-vsctl show
# ovs-appctl bond/show bond100
# ovs-appctl bond/show bond200
The active members matched the intended configuration.
5. Limitations
This configuration does not work in Proxmox VE GUI. You should modify configuration file (/etc/network/interfaces) manually.
This configuration detects only physical link-state failures. It does not, by itself, detect every possible upstream network failure when the local switch port remains up.
I have confirmed that this configuration works in my environment. I am sharing it in case it is useful to others who want VLAN-specific active/standby uplinks in Proxmox VE without using LACP.
Feedback and suggestions are welcome!
I wanted to share a configuration that worked for me on Proxmox VE 9.2.
It allows two VLANs to use different preferred physical NICs, with each VLAN failing over to the other NIC if its preferred link goes down.
This is similar to VMware vSphere's per-Port Group Active/Standby teaming policy.
1. Goal
I have two physical NICs, 'ens194' and 'ens226', connected to switch ports configured as 802.1Q trunks. Both trunks carry VLANs 100 and 200.
I wanted the following behavior:
| VLAN | Preferred uplink | Standby uplink |
| 100 | ens194 | ens226 |
| 200 | ens226 | ens194 |
The important requirement was to have independent failover per VLAN, rather than one active-backup bond shared by both VLANs.
2. Configuration
The solution is to create a Linux VLAN subinterface for each VLAN on each physical NIC, then create a separate OVS active-backup bond for each VLAN.
This gives each VLAN its own independent bond and preferred member.
The following is an example configuration for /etc/network/interfaces.
The interface names, VLAN IDs, and IP addresses are examples and should be adapted to your environment.
Code:
# Physical NICs
auto ens194
iface ens194 inet manual
auto ens226
iface ens226 inet manual
# VLAN subinterfaces
auto ens194.100
iface ens194.100 inet manual
vlan-raw-device ens194
auto ens226.100
iface ens226.100 inet manual
vlan-raw-device ens226
auto ens194.200
iface ens194.200 inet manual
vlan-raw-device ens194
auto ens226.200
iface ens226.200 inet manual
vlan-raw-device ens226
# OVS bridge
auto vmbr100200
iface vmbr100200 inet manual
ovs_type OVSBridge
ovs_ports bond100 bond200
# VLAN 100: ens194 preferred
auto bond100
iface bond100 inet static
address 10.100.0.11/24
ovs_type OVSBond
ovs_bridge vmbr100200
ovs_bonds ens194.100 ens226.100
ovs_options tag=100 bond_mode=active-backup other_config:bond-primary=ens194.100
# VLAN 200: ens226 preferred
auto bond200
iface bond200 inet static
address 10.200.0.11/24
ovs_type OVSBond
ovs_bridge vmbr100200
ovs_bonds ens194.200 ens226.200
ovs_options tag=200 bond_mode=active-backup other_config:bond-primary=ens226.200
3. How it works
- Each physical NIC has a VLAN subinterface for VLAN 100 and another for VLAN 200.
- 'bond100' uses 'ens194.100' as its preferred member.
- 'bond200' uses `ens226.200' as its preferred member.
- Both bonds use OVS 'active-backup' mode, so each VLAN has an independent active uplink.
- Both physical switch ports must allow VLANs 100 and 200 as tagged traffic.
- IP addresses can be assigned to the respective bonds when host-level connectivity is required on those VLANs.
IP addresses can also be assigned to the bonds for host connectivity on their respective VLANs, as shown above.
The example addresses are illustrative; use addresses appropriate for your network.
When attaching VMs in the Proxmox VE GUI, select vmbr100200 as the bridge and set the VM's VLAN tag to either 100 or 200.
The same approach can also be used to separate other traffic, such as storage or migration traffic, onto different VLANs with independent preferred uplinks.
Additionally, vmbr100200 can be selected as the bridge when creating a VLAN zone in Proxmox VE SDN.
4. Verification
I checked the bond status with:
# ovs-vsctl show
# ovs-appctl bond/show bond100
# ovs-appctl bond/show bond200
The active members matched the intended configuration.
5. Limitations
This configuration does not work in Proxmox VE GUI. You should modify configuration file (/etc/network/interfaces) manually.
This configuration detects only physical link-state failures. It does not, by itself, detect every possible upstream network failure when the local switch port remains up.
I have confirmed that this configuration works in my environment. I am sharing it in case it is useful to others who want VLAN-specific active/standby uplinks in Proxmox VE without using LACP.
Feedback and suggestions are welcome!
Last edited: