In Ubuntu 18.04 I have the netplan bonding configuration like this:
bonds:
bond0:
interfaces:
- eno1
- eno2
parameters:
mode: active-backup
primary: eno1
I discovered that this does not actually cause the network to fail over to eno2 if the cable is unplugged from eno1 unless I set mii-monitor-interval
, like this:
bonds:
bond0:
interfaces:
- eno1
- eno2
parameters:
mode: active-backup
mii-monitor-interval: 100
(Setting primary
seems to be unnecessary - is it?)
However, this change does not seem to take effect after netplan apply
- cat /proc/net/bonding/bond0
does not show the new MII Polling Interval value until I reboot.
Is there a way to apply this change without rebooting?
https://unix.stackexchange.com/questions/148838/reset-ethernet-bonding-without-rebooting suggests service network restart
but there is no "network" service in Ubuntu 18.04.
I found a Launch bug about this, which mentions the workaround: https://bugs.launchpad.net/ubuntu/+source/nplan/+bug/1746419
Running the following as root does the trick, though this still briefly disconnects the machine from the network
(I would advise against running the above if you only have network access to the machine!)