Well, what I did was:
Remove auto
from vlans, added the following to the bond0
:
pre-up vconfig add bond0 20; vconfig add bond0 30
This way the vlans are created before the bond0 interface goes up.
Final config file:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # Bonding interfaces allow-hotplug eno1 iface eno1 inet manual allow-hotplug eno2 iface eno2 inet manual allow-hotplug eno3 iface eno3 inet manual allow-hotplug eno4 iface eno4 inet manual # Main bonding interface auto bond0 iface bond0 inet static address 10.10.0.1 gateway 10.10.0.254 netmask 255.255.255.0 dns-nameservers 10.10.0.254 dns-search mydomain.local bond-mode 802.3ad bond-miimon 100 bond-downdelay 200 bond-updelay 200 bond-lacp-rate 1 bond_xmit_hash_policy layer2+3 bond-slaves eno1 eno2 eno3 eno4 pre-up vconfig add bond0 20; vconfig add bond0 30 iface bond0.20 inet static address 10.20.0.1 gateway 10.20.0.254 netmask 255.255.255.0 iface bond0.30 inet static address 10.30.0.1 gateway 10.30.0.254 netmask 255.255.255.0