1

I am trying to bond two internet connections on my raspberry pi (Raspbian Linux 10). The bonding mode should be fault-tolerance. The primary connection should be a wifi connection (wlan0), the second one an LTE Surfstick (eth1). The problem here is that when I turn off wlan0 the bonding interface switches to eth1 but tries to access the internet through the local IP of the WLAN. The local address in the wifi network is 192.168.178.81 the one given by the LTE-Surfstick is 192.168.8.100, so when I disable wlan0 the bond tries to access the internet through 192.168.178.81. This happens likewise if I change eht1 to be the main connection. The way I tried it was installing ifenslave and editing the /etc/network/interfaces document as follows:

auto bond0
iface bond0 inet dhcp
        bond-slaves wlan0 eth1
        bond-mode active-backup
        bond-primary wlan0
        bond-miimon 100
        bond-fail_over_mac 1

allow-bond0 wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf wpa-bridge bond0 bond-give-a-chance 10

allow-bond0 eth1 allow-hotplug eth1 iface eth1 inet manual pre-up sleep 15

When I set it up like this looking at /proc/net/bonding/bond0 shows:

Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup) (fail_over_mac active) Primary Slave: wlan0 (primary_reselect always) Currently Active Slave: wlan0 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0

Slave Interface: wlan0 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: 8f:4f:87:cb:88:50 Slave queue ID: 0

Slave Interface: eth1 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: 67:1b:4d:6e:c3:8c Slave queue ID: 0

Pinging google works fine. After taking wlan0 down and pinging google 172.217.21.195 it returns: From 192.168.178.81 Dest Host Unreachable. I also tried the same with a bond0 static IP but it also fails. I know that I might mix up some notions and also that I am missing something very trivial but I am new to Linux and bonding so sorry for that. Thank you!

0 Answers0