I want to use WiFi port of my server as redundant link for copper connection to my home DSL router. My router if SAGEM 2704 with very limited functionality. So practically the only possibility is to configure something on the server. Is it possible to use WiFi for redundancy. If so, what I have to implement on my server?

1 Answer 1


You're looking for bonding. This driver is intended for (surprise!) bonding individual links to one logical link. Several modes are supported, one of them is fail-over mode (you have one primary link, in your case wired ethernet, and several fail-over links, which take over when the primary link fails).

What you'll need is CONFIG_BONDING enabled in the kernel. With this enabled (and the appropriate module bonding loaded if built as module) can do the following:

  1. Create a bonding interface:

    # echo +bond0 > /sys/class/net/bonding_masters
  2. Set active-backup mode (fail-over):

    # echo active-backup > /sys/class/net/bond0/bonding/mode
  3. Add interfaces to the bonding device:

    # echo +eth0 >  /sys/class/net/bond0/bonding/slaves
    # echo +wlan0 > /sys/class/net/bond0/bonding/slaves
  4. Make eth0 the primary interface:

    # echo eth0 > /sys/class/net/bond0/bonding/master
  5. Enable link monitoring (periodically test for link availability every second):

    # echo 1000 > /sys/class/net/bond0/bonding/miimon
  6. Use bond0 as network interface (eth0 and wlan0 don't need any further configuration: IP addresses et al are configured on bond0 now).

  • OK. THX. At this moment (because of many reasons) I have two IP addressees assigned to eth0. So at this moment I cand assign two IP addresses to interface bond0 and change appropriate entries in iptables definitions from eth0 to bond0. I am right?
    – mackowiakp
    Apr 17, 2014 at 16:58
  • I can modprobe bonding, but how can I check CONFIG_BONDING option in my kernel? Or how to set it enable?
    – mackowiakp
    Apr 17, 2014 at 16:59
  • Most distributions have the option enabled that let's you read the (running) kernel's config from /proc/config.gz: zgrep CONFIG_BONDING /proc/config.gz. You can assign multiple addresses to network interfaces, have a look at man 8 ip-address (using ip tool from iproute2 is the more recent and more powerful approach of configuring network interfaces than using ifconfig). Apr 17, 2014 at 18:04
  • zgrep CONFIG_BONDING /proc/config.gz command shows CONFIG_BONDING=m . Does it mean "bonding enable"?
    – mackowiakp
    Apr 18, 2014 at 6:07
  • 1
    BTW: No idea if you want to update this answer, but if you do then (a) consider also teaming as an alternative to the bonding driver; (b) NetworkManager can set up both bonding and teaming. (Generalizing a little is OK—we're using this question as the target of duplicates, e.g., if someone needs to set up bonding on his/her laptop).
    – derobert
    Sep 5, 2017 at 20:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .