2NICS + Bonding + OVS + VLAN

marcosmiras

New Member
May 30, 2023
1
0
1
good morning,

have installed Proxmox VE 7.4
I am not able to do the following configuration with OVS.
I have two cards eno1 and eno2, I need them to be in LACP bonding.
These cards have vlan10 as their native VLAN and others such as vlan20 for the rest.I have tried the settings in the documentation but can't get the settings to work.
Any recommendations for this configuration or something to keep in mind and it doesn't look good in the official documentation?

***Currently I can only get the setup with one card, this is the current setup.

Bash:
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual
        ovs_type OVSPort
        ovs_bridge vmbr0
        ovs_mtu 9000
        ovs_options tag=1 vlan_mode=native-untagged

iface eno2 inet manual

auto vlan10
iface vlan10 inet static
        address 10.10.1.5/24
        gateway 10.10.1.254
        ovs_type OVSIntPort
        ovs_bridge vmbr0
        ovs_mtu 1500
        ovs_options tag=1

auto vlan8
iface vlan8 inet static
        address 10.10.8.5/24
        ovs_type OVSIntPort
        ovs_bridge vmbr0
        ovs_mtu 9000
        ovs_options tag=8

auto vmbr0
iface vmbr0 inet manual
        ovs_type OVSBridge
        ovs_ports eno1 vlan10 vlan8
        ovs_mtu 9000

Greetings and thank you very much in advance
 
Last edited:
Hey,

for your LACP bonding and VLAN configuration with OVS, you need to ensure a few key steps are followed:
  1. Configure LACP on the switch side: Make sure that the switch ports to which eno1 and eno2 are connected are configured for LACP.
  2. Define an LACP bond on OVS: In Proxmox, this can be achieved by editing the /etc/network/interfaces file to define an LACP bond.
here your /etc/network/interfaces should look something like:
Bash:
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual
        ovs_type OVSPort
        ovs_bridge bond0
        ovs_options bond_mode=balance-tcp

auto eno2
iface eno2 inet manual
        ovs_type OVSPort
        ovs_bridge bond0
        ovs_options bond_mode=balance-tcp

auto bond0
iface bond0 inet manual
        ovs_type OVSBond
        ovs_bridge vmbr0
        ovs_bonds eno1 eno2
        ovs_options bond_mode=balance-tcp lacp=active

auto vmbr0
iface vmbr0 inet manual
        ovs_type OVSBridge
        ovs_ports bond0 vlan10 vlan8

auto vlan10
iface vlan10 inet static
        address 10.10.1.5/24
        gateway 10.10.1.254
        ovs_type OVSIntPort
        ovs_bridge vmbr0
        ovs_options tag=10

auto vlan20
iface vlan20 inet static
        address 10.10.8.5/24
        ovs_type OVSIntPort
        ovs_bridge vmbr0
        ovs_options tag=20

The above configuration should create a LACP bond between eno1 and eno2, and attach it to vmbr0, while also creating VLAN 10 and 20 on the same bridge. Make sure that vlan10 has tag=10. Also, note that you should replace balance-tcp with the appropriate bonding mode for your specific use case.

Once you have done this, restart your network(with systemctl restart networking) or reboot your server to apply the changes. Use ovs-vsctl show to verify your settings.

Be sure to have console access to the machine or remote access that does not depend on this setup, as network configuration changes can disrupt access.

Also, keep in mind that your switch should be configured to allow the VLANs you've tagged, and LACP should be configured on the switch for these ports.
 

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!