Help with setting bond primary slave

giox069

New Member
Jan 2, 2025
3
0
1
PVE 8.3.2

I created a bond0 interface with 3 NICS (2x1Gpbs, 1x2.5Gbps).
I would like to have the faster NIC (enp6s0) as primary.
When I disconnect its cable, one of the two 1Gbps slaves becomes active. But when I reconnect the cable, the current active slave is never changed back to the 2.5Gbps NIC (enp6s0).
I already put enp6s0 in bond-primay config of the bond0 interface, but it does not work.

What am I doing wrong ?

Thank you

/etc/network/interfaces:
Code:
...
auto eno2
iface eno2 inet manual

auto eno1
iface eno1 inet manual

auto enp6s0
iface enp6s0 inet manual

auto bond0
iface bond0 inet manual
        bond-slaves eno1 eno2 enp6s0
        bond-miimon 100
        bond-mode active-backup
        bond-primary enp6s0

auto vmbr0
iface vmbr0 inet static
        address 192.168.98.120/24
        gateway 192.168.98.254
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0

source /etc/network/interfaces.d/*

cat /proc/net/bonding/bond0
Code:
Ethernet Channel Bonding Driver: v6.8.12-5-pve

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None                                   <-----  should enp6s0 appear here ??
Currently Active Slave: enp6s0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

Slave Interface: enp6s0
MII Status: up
Speed: 2500 Mbps
Duplex: full
Link Failure Count: 2
Permanent HW addr: 00:e0:4c:68:18:f3
Slave queue ID: 0

Slave Interface: eno1
MII Status: down
Speed: Unknown
Duplex: Unknown
Link Failure Count: 1
Permanent HW addr: d4:ae:52:70:bd:e2
Slave queue ID: 0

Slave Interface: eno2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 4
Permanent HW addr: d4:ae:52:70:bd:e3
Slave queue ID: 0
 
Code:
auto bond0
iface bond0 inet manual
        bond-slaves eno1 eno2 enp6s0      <-----
        bond-miimon 100
        bond-mode active-backup
        bond-primary enp6s0

Switch positions. It's 'bond-slaves master slave slave', so you want 'bond-slaves enp6s0 eno1 eno2'
 
I try to switch position from the web GUI, but when I click "ok" nothing changes.
So I went to /etc/network/interface, and the list is correctly saved with my new order, not the one I see on the web GUI.
I launched ifreload -a, and did some testing... but nothing. The faster ethernet does not become active in the bond when the cable is plugged in.
 
Mhm. I have vswitch/OVS bonds. But I don't think the position thing differs vs. Linux bond, that should follow the same logic.

Try what happens if you power off the switch where enp6s0 is plugged in...if you have a switch on this path? Or is it direct cable?

If in doubt, kick the settings and try again with only enp6s0 and eno1 + reboot to be sure.
 
Uhm... it seems that after a full reboot of the proxmox OS, "Primary Slave: None" changed to "Primary Slave: enp6s0 (primary_reselect always)", and now when I detachk the 10Gbps cable and reattach it, the 10Gbps interface enp6s0 becomes the master again.

Maybe ifreload -a is ignoring "bond-primary" of /etc/network/interfaces when launched manually ?
 
Does it work as intended if you try it out with just eno1 and eno2?
I'm suspecting that with the 2.5G is something flaky.