5

I'm trying to add an interface to my bond0 but I always get the error.

   sudo ip link set dev eth0 master bond0
  RTNETLINK answers: Operation not permitted

I already tried it with sudo and with the root user neither worked. Is my command wrong. I got it from here:
https://github.com/ebiken/doc-network/wiki/Linux-iproute2-:-ip-link-bridge-operations

1
  • 1
    some kernels appear to require the slave device to be down before it can be bound
    – duanev
    Commented Nov 8, 2018 at 3:38

2 Answers 2

1

As was said in comment, try first make eth0 interface down and then add to the bond0. It helped in my case:

sudo ip link set dev eth0 down
sudo ip link set dev eth0 master bond0
0

Make sure the ("slave") interface (eth0) is down before you try to add it to the bond.

If it still doesn't work, it's possible your bond mode is not supported. For me balance-alb won't work, but balance-rr will. e.g.

$ sudo ip link add bond1 type bond miimon 100 mode balance-alb
$ sudo ip link set wlp0s20f0u1u1 master bond1
RTNETLINK answers: Operation not supported
$ sudo ip link del bond1 
$ sudo ip link add bond1 type bond miimon 100 mode balance-rr
$ sudo ip link set wlp0s20f0u1u1 master bond1
$ # works!

You must log in to answer this question.

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