Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

There was an offer I could not resist and now I have ended up with both cable and DSL on my home network. I am using the cable network exclusively because it is a lot faster.

My general idea was to use the DSL as a backup for the cable which sometimes fails. I work from home and need the security of always having a fast Internet connection. And I don't feel like paying for Business products with fast response times.

Now, seeing my DSL modem on all the time with nothing to do I wonder if you can come up with any ideas for putting it to good use?

  • Is there any way I could configure my WLAN router to have both cable and DSL plugged in? The backup would be automatic --> If one connection fails, the other one would take over immediately.
  • My main PC has two Ethernet ports. I have tried plugging both cable and DSL routers at the same time, but it disturbs my Internet connection. Is there any way of using DSL as an automatic backup?

I am unwilling to switch the DSL modem off because I used to have bad experiences after returning from vacation and finding that my DSL did not work anymore after switching it on again.

share|improve this question
    
Just curious, what was the ultimate reason that the DSL did not work anymore after having the modem off during your vacation? –  fideli Sep 28 '11 at 22:46
    
I do not know the ultimate reason. As for the symptoms: It took long for the modem to display the Internet LED again, sometimes several hours. Technical support usually recommended a reset and reconfiguration (DSL user name and password). If I just left it on I did not have to go through this. It was one of the reasons I switched to cable. –  user 99572 is fine Sep 28 '11 at 22:54
2  
+1 for the excellent username. –  Doc Sep 28 '11 at 23:19
    
If it were me and its not, I would use the DSL strictly for bittorrent, or a Roku box....roku.com/?gclid=CIbzjvSMwasCFREj7AodVm54sg –  Moab Sep 28 '11 at 23:31
    
What are your NIC's manufacturer? There are somethings that you can do with Intel network adapters called Link Agreggation (same as Doc's best-estist way). wordpress.vaas.me/?p=25 I know this works well in an internet network, but not sure how it would handle two external addresses from different providers. –  kobaltz Sep 28 '11 at 23:44
show 4 more comments

4 Answers

up vote 10 down vote accepted

The best"-est" way

When your cable ISP fails you, switch your router off of cable and over to your DSL service.. Use your meaty human hands, a Rube Goldberg Machine, a sufficiently parented child, a hammer, etc.. And just switch services manually...

Most devices can be hacked to perform this function. Such as this whimpering child

The 'easy'ish way

Step 1) Install pfsense on a crappy old computer with 3 nics (1 for your LAN, 2 for your ISPs)

Step 2) Setup Multi-WAN support as per this guide.

Step 3) Resume your regular activities.

Or you can take a more hands on approach, as per below...

The neckbearded way

The following is shamelessly plagarized acquired from Linux.com.

Today, it's hard to imagine an organization operating without taking advantage of the vast resources and opportunities that the Internet provides. The Internet's role has become so significant that no organization can afford to have its Net connection going down for too long. Consequently, most organizations have some form of a secondary or backup connection ready (such as a leased line) in case their primary Net connection fails. However, the process of switching over from the primary to the backup connection, if done manually by the system administrator, can take some time, depending upon how ready the backup setup is and on the availability of the administrator at the right moment. The process can even become a costly affair if the organization must buy dedicated routers for the purpose of automatic switchover. But there is an easy and cost-effective alternative -- setting up a Linux failover router.

In this article we will look at setting up an existing Linux machine as a failover router to provide quick and automatic switchover from a dead Internet connection (the primary connection) to one that is operational (the secondary connection).

To begin, you'll need a PC with any recent GNU/Linux distro installed. You'll also need three network cards to put into this Linux box. Two of the three network cards, say eth0 and eth1, will connect to the Internet routers/gateways of your primary ISP (say ISP1) and secondary ISP (say ISP2). The third network card, say eth2, will connect to your internal LAN.

Setting up the network

Begin by setting up your network based on the configuration information available to you. You can make the configurations from the X Window GUI using the Network utility. To do so, open the Network utility from Main Menu > System Settings > Network. This will open up a network configuration window displaying a list of all the network cards installed on your system. Double-click on the network card you wish to configure, select the Statically Set IP Addresses option, and assign the IP address along with the subnet mask. There is also a Default Gateway Address field; tou can leave it blank for the time being, as it can be specified later on from the command line.

Assign the IP addresses provided to you by your ISPs to the two network cards, eth0 and eth1. In our setup, we assigned eth0=61.16.130.100 and eth1=200.15.110.101 (which are public IP addresses), along with the subnet mask 255.255.255.224.

Assign a private IP address based on your internal LAN subnet to your third card. We assigned eth2=10.0.0.1, where 10.0.0.0/24 was the address range for our internal LAN setup. Save your changes and exit.

Now turn on IP packet forwarding on the Linux box by changing the value of net.ipv4.ip_forward to 1 in the /etc/sysctl.conf file and executing the command:

# sysctl -p

Next, you need to configure iptables by adding certain rules, so that your internal LAN can route packets to the Internet. For this, issue the following commands as root:

# iptables  -t  nat  -A  POSTROUTING  -o  eth0  -j  MASQUERADE

# iptables  -t  nat  -A  POSTROUTING  -o  eth1  -j  MASQUERADE

# iptables  -A  FORWARD  -s  10.0.0.0/24  -j  ACCEPT

# iptables  -A  FORWARD  -d  10.0.0.0/24  -j  ACCEPT

# iptables  -A  FORWARD  -s  !  10.0.0.0/24  -j DROP

The above commands turn on masquerading in the NAT table by appending a POSTROUTING rule (-A POSTROUTING) for all outgoing packets on the two Ethernet interfaces, eth0 and eth1. The next two lines accept forwarding of all packets to and from the 10.0.0.0/24 network. The last line drops the packets that do not come from the 10.0.0.0/24 network.

To make the iptables rules permanent, save them as follows:

# iptables-save > /etc/sysconfig/iptables

Now you must restart your network, as well as iptables:

# /etc/init.d/network  restart

# /etc/init.d/iptables  restart

To see if your new iptables rules have gone into effect, type iptables --L.

Enabling failover routing

After you have configured your network, the next step is to enable failover routing on your Linux box, so that if the first route dies the router will automatically switch over to the next route. To do so, you'll need to add the default gateway routes provided to you by your ISPs for both your network cards:

# route add default gw 61.16.130.97 dev eth0

# route add default gw 200.15.110.90 dev eth1

Here, 61.16.130.97 is the gateway address given by ISP1 and 200.15.110.90 is the gateway address given by ISP2. Replace them with the addresses available to you. These routes will disappear every time you reboot the system. In order to make these routes permanent add the above two commands in the /etc/rc.d/rc.local file, which is run at boot time.

Also make sure that all the computers on your internal LAN (10.0.0.0/24) have their default gateway address set as the IP address of the eth3 Ethernet interface (i.e. 10.0.0.1) of your failover router.

Finally, modify the /proc/sys/net/ipv4/route/gc_timeout file. This file contains a numerical value that denotes the time in seconds after which the kernel declares a route to be inactive and automatically switches to the other route if available. Open the file in any text editor and change its default value of 300 to some smaller value, say 10 or 15. Save the changes and exit.

Now your Linux machine is ready to serve as a failover router, automatically and quickly switching to the secondary route every time the primary route fails.

share|improve this answer
    
The easy way and the easy'ish way look fairly reasonable. I will look into them. Thanks. –  user 99572 is fine Sep 28 '11 at 23:17
1  
So it says. I'm unconvinced, but I've never tried it personally. In my ISP experiences, the DHCP delegated connection info persists until you've unpowered your modem for a fair while. So you could just take your existing configuration that you've presumably taken from DHCP and then enter that exact same info as static connection stuff. Though if you have a long power outage, you may wanna repeat the interface setup. Cheers friend. –  Doc Sep 28 '11 at 23:17
    
Very entertaining! –  InChargeOfIT Apr 4 '12 at 16:58
add comment

You could get a DSL router with a load-balancing option (Draytek do some for example). I'm not sure what connection your cable has but the ADSL router would expect an ethernet cable to go into some sort of cable-router.

I suspect if you don't want to pay for better services you may not want to pay for a better router either (that might sound offensive but its not meant to be!) so it might not help you - probably cost around £150 for the router. There may be cheaper models that do the same thing, but I have no experience of those

share|improve this answer
    
I want to pay for better services but I also figured that a better service will be down some time so instead of risking downtime I hedged my bets with a different technology. And I do pay more than before, just not that much more. –  user 99572 is fine Sep 28 '11 at 22:57
add comment

I would like to wrap this up. So unless somebody out there has some additional insight that is worth sharing, consider this question closed. I have all the info I need.

As for my original question, which may be perceived as good or poor by Super User standards, about creative uses for my set up, there appear to be none, except for the possibility of using one of the connections for a specific task. Since I am not a heavy downloader or uploader, this does not apply to me. So bummer here.

As for the idea of using DSL as a back-up solution you have provided me with valuable intel that I did not have before. Of the solutions provided the DD-WRT option seems most appealing to me because it is likely to work with my existing hardware.

is fine

PS: I know my user name does not conform to protocol, but I am not really creative at this sort of thing.

share|improve this answer
    
3 things: 1) If you have found the answer you need, mark it answered. However, people may continue to post for others who are interested. 2) Don't put a comment as an answer. 3) I think your user name is just fine, so don't worry about it. Welcome to SU, and enjoy! –  fideli Sep 29 '11 at 13:51
    
@user - I don't mind your answer ;) –  Doc Sep 29 '11 at 14:14
add comment

If you have a compatible router available you can follow this guide:

http://www.dd-wrt.com/wiki/index.php/Dual_WAN_with_failover

It'll be much cheaper in the medium long tern than running a whole other computer chewing up power just to do wan fail over. If you don't have a compatible router then I'd buy one to do the job.

share|improve this answer
    
sounds like the most cost-effective way, will look into it. –  user 99572 is fine Sep 29 '11 at 8:25
    
The WRT54GL's work well and are not expensive. If you want 802.11n and gigabit ethernet, there are routers that support that with ddwrt as well. –  Matt H Sep 29 '11 at 9:14
    
I believe you can operate ddwrt on an x86 box. Don't you have an old PC laying around? –  Doc Sep 29 '11 at 14:15
    
@doc - an old pc might chew up 200W of continuous power vs 10W. Even a new router will pay for itself in a matter of months in power saved. –  Matt H Dec 26 '11 at 3:04
    
@Matt H: I pay about 0.07 $/KW-hr. Cheapest wrt costs $40 and runs @ 6W, so you have a sound point that it consumes far far less power. $40 in power would run a 200W machine (which an idling P4 should run closer to 150W) for 40/0.014 hrs, which is 119 days. So I suppose you're right. After about 3.5 months it costs less to run the wrt. I like the desktop approach cause I like the hefty storage (for squid proxy) & packet inspection options. Now if you start factoring in interest charges on the $40 (assuming you can't pay your visa bill in full), the analysis gets more interesting. –  Doc Jan 4 '12 at 23:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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