Simple Vlan on Bond in Proxmox 7.1.

BiteMyElbow

Member
Jul 5, 2021
27
0
6
39
Have spent a lot of time, but have no luck to config my bonding interface. Mby someone can help?

For now i have Proxmox server with some virtual machines. No management vlan, but some vm's have 24 and 25 vlans:
2.png
So now i need to only setup 24 and 25 vlan in virtual machines hardware config.

But i have second network interface in the server and i want to setup Bond with Vlans:
1.png
There is o problem with native vlan 1, but i can't setup vlan 24 and 25 in Proxmox nohow. Please could someone write network/interfaces config to me or show how can i do it by web interface?

TY in advance.
 
Should be something like this:
Code:
auto eno1
iface eno1 inet manual

auto eno2
iface eno1 inet manual

auto bond0
iface bond0 inet manual
        bond-slaves eno1 eno2
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer3+4
      
auto vmbr0
iface vmbr51 inet static
        address 192.168.0.2/24
        gateway 192.168.0.1
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094
You can then set the VLAN tag in the VMs hardware tab under the virtual NICs options. Also make sure the LACP hash-policy matches the one you set in your managed switch.
 
Should be something like this:
Code:
auto eno1
iface eno1 inet manual

auto eno2
iface eno1 inet manual

auto bond0
iface bond0 inet manual
        bond-slaves eno1 eno2
        bond-miimon 100
        bond-mode 802.3ad
        bond-xmit-hash-policy layer3+4
     
auto vmbr0
iface vmbr51 inet static
        address 192.168.0.2/24
        gateway 192.168.0.1
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094
You can then set the VLAN tag in the VMs hardware tab under the virtual NICs options. Also make sure the LACP hash-policy matches the one you set in your managed switch.

Thanks, i'll try it.
Could you plz explain:
1. Why "bond-xmit-hash-policy layer3+4"? I always tried layer2+3.
2. Should i reboot Proxmox 7.1 server every time after changing network config or "service networking reload" is enough to apply changes?
 
1. Why "bond-xmit-hash-policy layer3+4"? I always tried layer2+3.
With layer2+3 you can only use 2 Gbit when communicating with two other hosts simultaniously (so basically 1 Gbit per different IP). With layer3+4 you can communicate with 2Gbit even with a single host if connecting to different ports (so basically 1 Gbit per port).
2. Should i reboot Proxmox 7.1 server every time after changing network config or "service networking reload" is enough to apply changes?
Doing a systemctl restart networking to restart the network should be enough.
 
Last edited:
With layer2+3 you can only use 2 Gbit when communicating with two other hosts simultaniously (so basically 1 Gbit per different IP). With layer3+4 you can communicate with 2Gbit even with a single host if connecting to different ports (so basically 1 Gbit per port).

Doing a systemctl restart networking to restart the network should be enough.

Thank You! With your help i finally did it. The problem was i didnt restart networking i believe :(

Actually, i've tested other configs and you were right, layer2+3 didnt work at all. Further, layer3+4 can be setuped only with LACP (802.3ad) or balance-xor mode of BONDs in Proxmox (despite that all mods are supported in Mikrotik). I read about bond modes and found out that LACP (802.3ad) provides failover only and balance-xor provides load balancing too.
That's why i chose balance-xor.


My final config is:
Code:
auto lo
 iface lo inet loopback
 
auto eno1
 iface eno1 inet manual
 
auto eno2
 iface eno2 inet manual

auto bond0
 iface bond0 inet manual
    bond-slaves eno1 eno2
    bond-miimon 100
    bond-mode balance-xor
    bond-xmit-hash-policy layer3+4

auto vmbr0
 iface vmbr0 inet static
    address 192.168.0.101/24
    gateway 192.168.0.1
    bridge-ports bond0
    bridge-stp off
    bridge-fd 0
    bridge-vlan-aware yes
    bridge-vids 2-4094

And in Proxmox GUI it looks like:
2022-02-02 23_43_50-pve1 - Proxmox Virtual Environment.png
2022-02-02 23_44_34-pve1 - Proxmox Virtual Environment.png
2022-02-02 23_44_46-pve1 - Proxmox Virtual Environment.png

That's all.

For now i got vlans work with my bond with load balancing and failover.

The last thing is that i don't know how to test it, because it turns out that i have 2Gbit channel from Mikrotik to Server and only 1Gbit per every VMs in Proxmox.
 
Last edited:
Thank You! With your help i finally did it. The problem was i didnt restart networking i believe :(

Actually, i've tested other configs and you were right, layer2+3 didnt work at all. Further, layer3+4 can be setuped only with LACP (802.3ad) or balance-xor mode of BONDs in Proxmox (despite that all mods are supported in Mikrotik). I read about bond modes and found out that LACP (802.3ad) provides failover only and balance-xor provides load balancing too.
That's why i chose balance-xor.
LACP is using failover and load balancing and is the most advanced of the bond modes that should give you best results as long as your router/switch supports 802.3ad. And as far as I understand "bond-xmit-hash-policy layer3+4" will only be used with LACP.
The last thing is that i don't know how to test it, because it turns out that i have 2Gbit channel from Mikrotik to Server and only 1Gbit per every VMs in Proxmox.
A bond will never make your 2x 1Gbit NICs to real 1x 2Gbit so the network won't get any faster. A bond only increases the bandwidth and that only if you use multiple connections at once. You always only got two single 1Gbit connections.
Think of it like a road. If you got a single lane road with a 70 MPH/KMH speed limit and you add a second lane, then you won't reach your target faster as you still only can travel with 70 MPH. But a second lane will enable the road to handle more traffic at once, so you get less traffic jams so you won't be slowed down at rush hours as much and if there is an accident on a single lane the road isn't completely blocked and still can continue operation.

So if you use "balance-xor" a single VM can talk to two different hosts at the same time with 1Gbit each but not with 2Gbit to a single host.
 
Last edited:

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!