I'm trying to get a bond between the onboard eth0 and an edimax EW-7811Un working on raspbian. So far I installed ifenslave-2.6 and tried like a million different configurations. The best achievement was with DHCP set on the bond, but when I pull the ethernet cable, the wlan0 won't take over but the bond0 fails - even after reconnecting the cable.

My target would be eth0 und wlan0 with static ip in activ-backup an balance-rr mode, since I need it for an HA project.


I have a Raspberry PI running raspbian with an USB Wifi Dongle and an ethernet cable connected. Furthermore I have an asus rt-n66u router connected to the pi, which has an DHCP server running. So I'd like to have an active-backup and/or balance-rr bond with these two interfaces. Reason is I'm currently doing a project on high availability.

So in the normal state I'd like to have the ethernet connection up, in case of an error (or me pulling the cable) I'd like to have a smooth failover to the wlan0 interface.

I'd thought a static IP would be easier for the router, but it didn't work out with static. The closest I came to what it want was a working bond with DHCP adress, but as soon as I pulled the cable the failover to wlan0 didn't work.

Right now I'm thinking my router may be confused when the same IP (and MAC) comes from ethernet first and within a second from wifi.

I hope this made the whole situation i little bit more easy to understand.

  • You can only have 1 DHCP server on a subnet. And that should be the Pi in this case, or a DHCP server always accessible by the Pi. Preferably you also want DNS from that DHCP server. You shouldn't be switching DHCP servers. Not entirely sure what you are trying to do though, can you explain a bit more. – Piotr Kula Mar 28 '14 at 12:51
  • thanks for your answer. i edited the question. hope it helped a bit. – ferdibua Mar 28 '14 at 13:16
  • You cant have the same IP for both network devices. If you have both LAN and WLAN connected using DHCP from the router and you pull the LAN, I would have thought traffic will be routed via WLAN (At least Windows does this- It takes 5~10seconds but it works PNP) OK- Second problem. You cant have high available from 1 router(I know you might be experimenting, but if LAN goes down then surely WIfi too? :) ) Load balancing is possible, but best used across LAN interfaces. – Piotr Kula Mar 28 '14 at 13:32
  • 1
    I know I can't have the same IP twice. Thats why I use a bonding device (bond0 in my case). And I am ware that there is no HA with just one router, but like you said I'm just experimenting and it's kinda like an POC. Guess I'm going for a USB to ethernet adapter – ferdibua Mar 28 '14 at 13:48
  • You are aware I hope that the router has to support bonding as well? (Or am I confused?) As far as I know you can only do bond over Ethernet as it's a separate hardware protocol, 802.3ad. I've only ever seen switches do it, but there are probably enterprise routers that do it too. I guess if your router is running OpenWRT, you could disassemble the bridge, bond two ports, and then add the bonded ports back into the bridge, but a regular configuration there isn't going to work. It might be more feasible if the Pi monitored for a lack of connection and brought up the other interface as needed. – Fred Mar 28 '14 at 23:00

I got myself a USB-Ethernet Adapter. With two wired connections the bond works like a charm.

Seems like my router has troubles managing a bond over ethernet and wifi.

Thanks for help!

  • @RPiAwesomeness But this is an answer. – Jivings Apr 8 '14 at 15:26

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.