[SOLVED] Connect LACP Linux bond with bridge and vlan at the same time

semira uthsala

Active Member
Nov 19, 2019
43
6
28
33
Singapore
Hi,

In my proxmox network configuration, I have 4 LACP bonded interface as follows.

Code:
bond0 -> for management
bond1 -> for cluster network
bond2 -> storage
bond3 -> external

All of those connected to juniper switch and carry multiple vlans. I need some of that VLAN on my pve host as well as guest VMs. So I added below configuration

Code:
auto bond0
iface bond0 inet manual
        bond-slaves eno1 eno2
        bond-miimon 100
        bond-mode 802.3ad
#pve-mgmt-bond

auto bond0.100
iface bond0.100 inet static
        address  192.168.100.10
        netmask  24
#pve-mgmt-vlan

auto bond1
iface bond1 inet manual
        bond-slaves eno3 eno4
        bond-miimon 100
        bond-mode 802.3ad
#pve-cluster-bond

auto bond1.200
iface bond1.200 inet static
        address  192.168.200.10
        netmask  24
#pve-cluster-vlan

auto bond2
iface bond2 inet manual
        bond-slaves eno49 ens1f0
        bond-miimon 100
        bond-mode 802.3ad
#pve-storage-bond

auto bond2.120
iface bond2.120 inet static
        address  192.168.120.10
        netmask  24
#pve-storage-120

auto bond3
iface bond3 inet manual
        bond-slaves ens1f1 ens2f0
        bond-miimon 100
        bond-mode 802.3ad
#pve-external-bond

auto bond3.130
iface bond3.130 inet static
        address  192.168.130.10
        netmask  24
#pve-external-vlan-130


auto vmbr0
iface vmbr0 inet manual
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0
#bridge-pve-mgmt

auto vmbr1
iface vmbr1 inet manual
        bridge-ports bond3
        bridge-stp off
        bridge-fd 0
#bridge-pve-external

At the initial stage, this configuration just works. But when I try to assign vmbr0 (management bridge) to vm and start the VM I lose the connectivity to Proxmox webGUI.

Is this the proper way to share bond between host and guest VMs? Or do I need to create VLAN bridge instead of VLAN bond for the host ?. None of my bridges a re VLAN aware
 
>>At the initial stage, this configuration just works. But when I try to assign vmbr0 (management bridge) to vm and start the VM I lose the connectivity >>to Proxmox webGUI.

do you mean you assign a vm on vmbr0 + vlan100 ? (same vlan than proxmox management ip )?

if yes, this is because proxmox create a "vmbr0v100" bridge when vm is starting and assigne bond0.100 inside it.
(but when a interface is in a bridge, you can't setup ip on this interface, only on the bridge)

2 workaround:

1) without vlanware
Code:
auto bond0.100
iface bond0.100 inet manual


auto vmbr0v100
iface vmbr0v100 inet static
        address  192.168.100.10
        netmask  24
        bridge-ports bon0.100
#pve-mgmt-vlan

2) better, with vlan aware

Code:
auto vmbr0
iface vmbr0 inet manual
        bridge-ports bond0
        bridge-vlan-aware yes
        bridge-stp off
        bridge-fd 0

auto vmbr0.100
iface vmbr0.100 inet static
        address  192.168.100.10
        netmask  24
 
Thanks for the reply. I can see what I did wrong now. I'm confused about the VLAN aware option in Linux bridge

which option I should use If I need to tag VLAN in the network tab in VM itself. ? Bridge with or without VLAN aware?
 
which option I should use If I need to tag VLAN in the network tab in VM itself. ? Bridge with or without VLAN aware?

both are working.

with vlan-aware bridge, proxmox set vlan directly on port of the vmbr0

without vlan-aware, proxmox create a new bridge "vmbr0v100" (v100=vlan100), create a bond0.100 and put this bond in vmbr0v100.
 
I cannot create bridge names vmbr0.100 or vmbr0v100 via Proxmox GUI and apply configuration without rebooting via GUI become useless. When manually edit the files and click apply it failed with error messages.

However configuration is working as you mentioned. Is there any way I can do this without breaking the apply configuration option on GUI ?
 
>>When manually edit the files and click apply it failed with error messages.

Please provide error messages ? (it should work)

(Note that I'm currently working to add gui support for vlan interface management)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!