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

apuboard
  • 187
  • 4
  • 8

2 Answers2

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
manka_272
  • 9
  • 1
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!
Codebling
  • 745
  • 1
  • 7
  • 16