Sure:
------
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian
installation
# (network, broadcast and gateway are optional)
#auto eth0
auto bond0
iface bond0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
mtu 9000
slaves ens6 eth1
bond-mode active-backup
bond-miimon 100
bond-downdelay 200
bond-updelay 200
post-up route add 192.168.0.1 gw 192.168.1.147 && ip route add
1.1.1.1 via 192.168.1.11 && ip route add 1.0.0.1 via 192.168.1.12
pre-down route del 192.168.0.1 gw 192.168.1.147 && ip route del
1.1.1.1 via 192.168.1.11 && ip route del 1.0.0.1 via 192.168.1.12
iface bond0 inet6 auto
privext 2
auto bond0:0
allow-hotplug bond0:0
iface bond0:0 inet static
address 192.168.1.5
netmask 255.255.255.0
iface bond0:0 inet6 auto
privext 2
------
My guess is that the fact that there's no iface definition for the
slaves (ens6 and eth1) caused them to be taken over by NM. (The only
indication NM could've had to avoid them is the "slaves" stanza within
the bond0 iface definition.)
I've since tried to re-define them like this:
------
# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8)
# The loopback interface
auto lo
iface lo inet loopback
# The first network card - this entry was created during the Debian
installation
# (network, broadcast and gateway are optional)
#auto eth0
auto bond0
iface bond0 inet static
address 192.168.1.200
netmask 255.255.255.0
gateway 192.168.1.1
mtu 9000
bond-slaves ens6 eth1
bond-primary ens6
bond-mode active-backup
bond-miimon 100
bond-downdelay 200
bond-updelay 200
post-up route add 192.168.0.1 gw 192.168.1.1 && ip route add
1.1.1.1 via 192.168.1.11 && ip route add 1.0.0.1 via 192.168.1.12
pre-down route del 192.168.0.1 gw 192.168.1.1 && ip route del
1.1.1.1 via 192.168.1.11 && ip route del 1.0.0.1 via 192.168.1.12
iface bond0 inet6 auto
privext 2
auto ens6
allow-bond ens6
iface ens6 inet manual
bond-master bond0
auto eth1
allow-bond eth1
iface eth1 inet manual
bond-master bond0
auto bond0:0
allow-hotplug bond0:0
iface bond0:0 inet static
address 192.168.1.5
netmask 255.255.255.0
iface bond0:0 inet6 auto
privext 2
------
But that fails with:
------
Mar 1 10:15:07 server ifup[69522]: No iface stanza found for master
bond0
Mar 1 10:15:07 server ifup[69518]: run-parts:
/etc/network/if-pre-up.d/ifenslave exited with return code 1
Mar 1 10:15:07 server ifup[69516]: ifup: failed to bring up ens6
------
I have yet to figure out why the ifenslave check fails. (Seems to be
running 'ifstate -l "$IF_BOND_MASTER"': ifstate is not a command that's
in my path and the only ifstate script that I found in
/usr/share/doc/ifupdown/contrib/ifstate doesn't take -l as a parameter.
Maybe some package versions are out of sync on my system.)
tl;dr: If it's easy to catch the 'slaves' stanza in /e/n/i and have NM
consider the specified slaves as unmanaged, that would be nice, but the
occurrence of this issue is admittedly very rare and thus may not be
worth the effort.
- Michel