This configuration (perhaps you'll call it a work-around) took me a while to sort out, so hopefully it will save you some time.
The problem:
When you bond 2 interfaces and then want to make a "vmbr" (for example vmbr0) over them, you'll find that the moment a VM starts with the same vlan tag as your proxmox machine, bad things will happen. The VM will not start, or your proxmox machine will loose connection. This is because Linux bridges don't play nice with VLANs.
Newer versions of the Linux kernel support a "bridge-vlan-aware yes" option, which allows the bridge to pass VLANs properly. This means you can have one vmbr0 bridge for all your VMs to share, and still be able to specify the "vlan tag" in the proxmox GUI. In my experience this works great until a VM is started using the same tag as your proxmox machine (in my case that is VLAN 5), as described above. The workaround I've come up with is to specify a sub-interface with a high offset, such as "vmbr0.5:256". In case it's not obvious to some, this translates to "use vmbr0, on vlan 5, on sub-interface identified by 256).
Note: the idea of sharing a VLAN for proxmox with your VM guests may not be the best idea for everyone. If you can have your hypervisors on the their own VLAN, then you won't encounter the issue I have described here.
Hopefully someone will find this useful! If you do, please let me know
root@kvm1:~# cat /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage part of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
iface eth2 inet manual
iface eth3 inet manual
iface eth91 inet manual
iface eth92 inet manual
auto bond0
iface bond0 inet manual
auto vmbr0
iface vmbr0 inet manual
auto vmbr0.5:256
iface vmbr0.5:256 inet static
The problem:
When you bond 2 interfaces and then want to make a "vmbr" (for example vmbr0) over them, you'll find that the moment a VM starts with the same vlan tag as your proxmox machine, bad things will happen. The VM will not start, or your proxmox machine will loose connection. This is because Linux bridges don't play nice with VLANs.
Newer versions of the Linux kernel support a "bridge-vlan-aware yes" option, which allows the bridge to pass VLANs properly. This means you can have one vmbr0 bridge for all your VMs to share, and still be able to specify the "vlan tag" in the proxmox GUI. In my experience this works great until a VM is started using the same tag as your proxmox machine (in my case that is VLAN 5), as described above. The workaround I've come up with is to specify a sub-interface with a high offset, such as "vmbr0.5:256". In case it's not obvious to some, this translates to "use vmbr0, on vlan 5, on sub-interface identified by 256).
Note: the idea of sharing a VLAN for proxmox with your VM guests may not be the best idea for everyone. If you can have your hypervisors on the their own VLAN, then you won't encounter the issue I have described here.
Hopefully someone will find this useful! If you do, please let me know
root@kvm1:~# cat /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage part of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
iface eth2 inet manual
iface eth3 inet manual
iface eth91 inet manual
iface eth92 inet manual
auto bond0
iface bond0 inet manual
slaves eth0 eth1 eth2 eth3
bond_miimon 100
bond_mode 802.3ad
bond_xmit_hash_policy layer2+3
bond_miimon 100
bond_mode 802.3ad
bond_xmit_hash_policy layer2+3
auto vmbr0
iface vmbr0 inet manual
bridge_ports bond0
bridge_stp off
bridge_fd 0
bridge-vlan-aware yes
bridge_stp off
bridge_fd 0
bridge-vlan-aware yes
auto vmbr0.5:256
iface vmbr0.5:256 inet static
address 10.1.5.101
netmask 255.255.255.0
gateway 10.1.5.1
netmask 255.255.255.0
gateway 10.1.5.1
Last edited: