Change network bonding parameters without reboot

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?

suggests service network restart but there is no "network" service in Ubuntu 18.04.

1 Answer

I found a Launch bug about this, which mentions the workaround:

Running the following as root does the trick, though this still briefly disconnects the machine from the network

ip link del dev bond0 && netplan apply

(I would advise against running the above if you only have network access to the machine!)

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like