Score:0

Error while creating a bonding interface

br flag

I have a problem with creating a bonding interface on Debian 10.11.

What I did was install ifenslave and then stop networking. I edited /etc/network/interfaces as below:

#WiFi Interface
auto mlan0
iface mlan0 inet manual
        bond-master bond0
        bond-primary mlan0
        bond-mode active-backup
        wpa-ssid SSID
        wpa-psk PSK

#Bonding Interface
auto bond0
iface bond0 inet dhcp
       bond-slaves none
       bond-primary mlan0
       bond-mode active-backup
       bond-miimon 100

Next one was to restart networking service and I get errors in syslog like below:

Feb 18 13:25:16 A11VRW systemd[1]: Starting Raise network interfaces...
Feb 18 13:25:16 A11VRW ifup[2278]: /etc/network/if-pre-up.d/ifenslave: 19: /etc/network/if-pre-up.d/ifenslave: cannot create /sys/class/net/bonding_masters: Permission denied
Feb 18 13:25:16 A11VRW ifup[2278]: /etc/network/if-pre-up.d/ifenslave: 47: /etc/network/if-pre-up.d/ifenslave: cannot create /sys/class/net/bond0/bonding/miimon: Directory nonexistent
Feb 18 13:25:16 A11VRW ifup[2278]: Device "bond0" does not exist.
Feb 18 13:25:16 A11VRW ifup[2278]: /etc/network/if-pre-up.d/ifenslave: 47: /etc/network/if-pre-up.d/ifenslave: cannot create /sys/class/net/bond0/bonding/mode: Directory nonexistent
Feb 18 13:25:16 A11VRW dhclient[2321]: Internet Systems Consortium DHCP Client 4.4.1
Feb 18 13:25:16 A11VRW dhclient[2321]: Copyright 2004-2018 Internet Systems Consortium.
Feb 18 13:25:16 A11VRW ifup[2278]: Internet Systems Consortium DHCP Client 4.4.1
Feb 18 13:25:16 A11VRW ifup[2278]: Copyright 2004-2018 Internet Systems Consortium.
Feb 18 13:25:16 A11VRW ifup[2278]: All rights reserved.
Feb 18 13:25:16 A11VRW ifup[2278]: For info, please visit https://www.isc.org/software/dhcp/
Feb 18 13:25:16 A11VRW dhclient[2321]: All rights reserved.
Feb 18 13:25:16 A11VRW dhclient[2321]: For info, please visit https://www.isc.org/software/dhcp/
Feb 18 13:25:16 A11VRW dhclient[2321]:
Feb 18 13:25:16 A11VRW ifup[2278]: Cannot find device "bond0"
Feb 18 13:25:16 A11VRW dhclient[2321]: Failed to get interface index: No such device
Feb 18 13:25:16 A11VRW ifup[2278]: Failed to get interface index: No such device
Feb 18 13:25:16 A11VRW ifup[2278]: If you think you have received this message due to a bug rather
Feb 18 13:25:16 A11VRW ifup[2278]: than a configuration issue please read the section on submitting
Feb 18 13:25:16 A11VRW ifup[2278]: bugs on either our web page at www.isc.org or in the README file
Feb 18 13:25:16 A11VRW ifup[2278]: before submitting a bug.  These pages explain the proper
Feb 18 13:25:16 A11VRW ifup[2278]: process and the information we find helpful for debugging.
Feb 18 13:25:16 A11VRW ifup[2278]: exiting.
Feb 18 13:25:16 A11VRW dhclient[2321]:
Feb 18 13:25:17 A11VRW dhclient[2321]: If you think you have received this message due to a bug rather
Feb 18 13:25:17 A11VRW dhclient[2321]: than a configuration issue please read the section on submitting
Feb 18 13:25:17 A11VRW dhclient[2321]: bugs on either our web page at www.isc.org or in the README file
Feb 18 13:25:17 A11VRW dhclient[2321]: before submitting a bug.  These pages explain the proper
Feb 18 13:25:17 A11VRW dhclient[2321]: process and the information we find helpful for debugging.
Feb 18 13:25:17 A11VRW ifup[2278]: ifup: failed to bring up bond0
Feb 18 13:25:17 A11VRW dhclient[2321]:
Feb 18 13:25:17 A11VRW dhclient[2321]: exiting.
Feb 18 13:25:17 A11VRW systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Feb 18 13:25:17 A11VRW systemd[1]: networking.service: Failed with result 'exit-code'.
Feb 18 13:25:17 A11VRW systemd[1]: Failed to start Raise network interfaces.

I tried to make modprobe bonding and even adding it to /etc/modules but I got error like this:

# modprobe bonding
modprobe: FATAL: Module bonding not found in directory /lib/modules/4.19.94-1.0.12+

What should I do?

A.B avatar
cl flag
A.B
Looks that's not a Debian kernel (easily hintedby the `+` sign at the end of the kernel version meaning it was built from git and which never appears in any Debian kernel version, but usually does in RaspberryPi OS derivative). So grab an actual Debian kernel to get the bonding driver or explain why the kernel was changed. There might be other config issues or not, but without the kernel driver nothing more can be done. You might also check if it's built-in with `grep bonding /lib/modules/4.19.94-1.0.12+/modules.builtin` .
A.B avatar
cl flag
A.B
My guess is that indeed this is a Pi or other SoC and it's not running Debian despite the Debian tag. Here, the correct tag in the question does matter.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.