I really banged my head on the wall on this one. I recently decided to re-architect my networking setup in proxmox to utilize bonded network configuration. I followed this writeup exactly. The problem is it didn’t work.
I would copy the example exactly, only changing the interface name, and yet every time I tried to start the networking service I would get this lovely error:
rawdevice bond0 not present
I finally found on the Debian Wiki one critical line :
First install the ifenslave package, necessary to enable bonding
For some reason the ProxMox howtos don’t speak of this – I guess because it comes installed by default. I discovered, however, that if you install ifupdown2 it removes ifenslave. I had installed ifupdown2 in the past to reload network configuration without rebooting. Aha!
I re-installed ifenslave (which removed ifupdown2 and re-installed ifupdown) and suddenly, the bond worked!
Bond not falling back to primary intrerface
I had configured my bond in active – backup mode. I wanted it to prefer the faster link, but if there was a failure in that link it wouldn’t switch back automatically (thanks to this site for showing me the command to check:
I read again in Debian bonding wiki that I needed to add this directive to the bond:
Here is my complete working active-backup configuration, assigning vlan 2 to the host, and making enp2s0 (the 10gig nic) the primary, with a 1gig backup (eno1)
auto bond0 iface bond0 inet manual slaves enp2s0 eno1 bond-primary enp2s0 bond_miimon 100 bond_mode active-backup iface bond0.2 inet manual auto vmbr0v2 iface vmbr0v2 inet static address 192.168.2.2 netmask 255.255.255.0 gateway 192.168.2.1 bridge_ports bond0.2 bridge_stp off bridge_fd 0 auto vmbr0 iface vmbr0 inet manual bridge_ports bond0 brideg_stp off bridge_fd 0