2

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.

1 Answer 1

4

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

ip link del dev bond0 && netplan apply

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

3
  • 1
    you saved my life.
    – Satish
    Feb 4, 2022 at 21:51
  • In April 2022, this is still the only method that worked for me on Ubuntu 21.10.
    – mr.zog
    Apr 21, 2022 at 18:05
  • Don't run this command remotely or it's going to be a trip to the datacenter... Apr 5, 2023 at 18:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .