0

I am using network-manager. I tried bonding my two wired connections eth0 and usb0, using GUI similar to nm-connection-editor (eth0 is connected to my router and usb0 is connected to cellphone). I can create a bond type device and add slaves, but for some reasons they didn't connect.

Googling for an answer, I found what I need to edit /etc/network/interfaces. I tried by it didn't work.

I added bonding to /etc/modules for booting and executing modprobe + lsmod | grep bonding to ensure the module is loaded, and my /etc/network/interfaces file is:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
    bond-master bond0
    bond-primary eth0 usb0

auto usb0
iface usb0 inet manual
    bond-master bond0
    bond-primary eth0 usb0

auto bond0
iface bond0 inet dhcp
    bond-slaves none
    bond-mode 6
    bond-miimon 100

When I rebooted, it showed a message saying A start job is running for Raise network interfaces... after about 5 minutes system start with no connections.

I tried with some variants I found:

/etc/network/interfaces:

auto bond0
iface bond0 inet dhcp
    bond-slaves eth0 usb0
    bond-mode 6
    bond-miimon 100
    bond-primary eth0 usb0

Even I tried setting inet to static and adding static parameters but no one helped.

Another method that I tried was to use ip link set and ip link add, but when I used ip link set eth0 master bond0, it showed me an error saying RTNETLINK answers: Operation not supported

System info:
OS: Linux Mint 19 Tara
Kernel: Linux 4.15.0-34-generic (x86_64)

Finally, I want bonding my networks to increase torrent's download speed and stay connected even when a network isn't available. I found network bonding in mode balance-alb the best option to do this, but if anyone know a better way to do that, I'm open to suggestions.

To guide me I found these links:

Ubuntu Bonding

Bonding Networking - Kernel Documentation

Link Aggregation in Linux Mint 18.1

How to Configure Network Bonding in Ubuntu

  • @sebasth Sorry I don't understand your questions very well, I have two wired connections one 'eth0' is provided by my router and second 'usb0' is provided by my cellphone via usb, 'eth0' give me an andress in range 192.168.0.* and 'usb0' give me an andress in range 192.168.42.* – Noss Sep 23 '18 at 21:11
  • related: unix.stackexchange.com/questions/212697/… ; You probably at least missing separate NIC labels, since you have different IP addresses for the interfaces. – sebasth Sep 23 '18 at 21:19
0

You can't "bond" different ISPs.

Bonding is for combining two LAN connections into a virtual single LAN connection, on both ends. This happens on layer 2, not on layer 3 (where the different IP addresses by your provider are assigned). And since you are only doing it on one end (the other end being your two different ISPs), there's no chance to make this work.

Your experiment turned out to be "unstable" because essentially you are just using one of them.

"How do I connect to two ISPs at once" is a FAQ and shows up regularly. The answer is "not easily". You can do some custom load balancing, but you need to code this up yourself.

-1

Well... researching more deeper this time.

I found with mode balance-alb show an error when service is trying to start.

bond0: dev_set_mac_address of dev eth0 failed! ALB mode requires that the base driver support setting the hw address also when the network device's interface is open

This error is showed, executing journalctl -xe in terminal after service don't starting.

So. I tried another method and mode balance-rr and finally I bring up bonding network with next steps:

1) $ echo bonding >> /etc/modules

2) $ sudo modprobe bonding && lsmod | grep bonding

3) $ sudo systemctl stop network-manager && sudo systemctl disable network-manager

4) $ sudo nano /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

allow-hotplug eth0
auto eth0
iface eth0 inet manual
    bond-master bond0

allow-hotplug usb0
auto usb0
iface usb0 inet manual
    bond-master bond0

auto bond0
iface bond0 inet dhcp
    bond-slaves none
    bond-mode balance_rr
    bond-miimon 100
    bond-downdelay 200
    bond-updelay 200

info: iface bond0 inet static with static parameters (address,netmask,network,gateway) including dns_nameservers doesn't work to me, because never connect to DNS.

5) $ sudo systemctl restart networking

At last, comprobe bonding with:

$ cat /proc/net/bonding/bond0

But, contrary to my thoughts the connection was very unstable, and doesn't work if any connection eth0 or usb0 was unplugged on starting or if any device lost the connection bond0 still trying connect to them and finish losing packages.

  • To get this to work (albeit unstably), did you have to completely disable the GUI configuration of network adapters in Mint 19? – mcarans Mar 1 at 14:42

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.