Multiple backup WAN connections.


kameleon

Network Guru
Member
I was browsing and ran across these two pages:
http://www.dd-wrt.com/wiki/index.php/Dual_WAN
and
http://www.dd-wrt.com/wiki/index.php/Dual-WAN_for_simple_round-robin_load_equalization
This seems very interesting. Although I would much rather use tomato than that dd-wrt crap. It does seem possible to do this in tomato though being that it is mostly just scripts.

Anyways, I got to thinking though. Since I use my WRT54GS as a main WDS node I have 4 open lan ports. If you can turn port 4 into a spare WAN port couldn't you technically turn the other 3 into WAN ports also? So say you had 2 totally different internet connections at home. Also maybe you have a neighbor or 2 with different connections also. Say your neighbors were totally awesome (as mine are) and would allow you to use their connection also. So right there you have 4 connections (for argument sake say they are Cable, DSL, satellite, and EVDO cell service via a computer). Does it seem possible that one could "technically" bond all these connections to one router and have either an uber connection to the internet or have backups to backups. I would love to try that one day. Any ideas or thoughts on the subject?

EDIT: On a side note. If one were to have multiple internet connections from multiple vendors how would you access the stuff behind the router? Like say I had a dsl and a cable connection. Say cable was my main internet connection and I connect remotely via ssh to do stuff on my pc there. But what if it went down and I was relying on the dsl. Would I have to know the IP of it or would something like a secondary dynamicdns deal come into play. And if so how would multiple WAN ports affect that?

I have a few spare wrt54g's that I can play with on this and see what it does. I think it would be a better/cheaper option for some of these small businesses that operate on a tight budget but want redundant internet connections.
 
Wow. Is this just too deep for someone? I just thought it would be very interesting to have multiple internet connections that can be either bonded together or have ultra backups. And yes I know that the wrt54g/gs was not designed for such a task and there are "better" ways to do this. But I have 3 wrt54g's and 1 wrt54gs that I want to play with. Anyone with me?
 
its possible. in fact, i remember reading some threads that other tomato users have done somthing similar, though i'm not sure about anything beyond that (= it should be possible to "bond" the connections in a way, but you'll probably need to do it by pipelining your downloads and uploads(assuming server support), through the individual connections to get this done. Alternatively, you could try the load balancing tutorial, though it won't boost your non-pipelined downloads, as they'll still be dependent on whichever connection they're attached to

Also, i believe the dynamic dns scripts won't work well in such a configuration, so you probably have to do it manually.

In a multiple WAN port configuration, its possible to specify different routes to each WAN connection, so its simpler to support multiple dynamic dnses.

I believe it should be easier to bypass using the WAN port as a whole and setup your own routes, and connect the internet connections to the standard lan ports(its possible to place the wan port of the wrts on the same bridging interface as well).

tts abt what i know (= hopefully someone can fill in the gaps here
 
I just think that none of us have really thought about it in this way let alone tried it. In theory the multiple wan ports should work, load balancing across all paths would be much more difficult and that script would have to be changed to take into account all paths. A couple issues regarding just this piece that you might not have thought about is the equipemnt that your data is going through, most firewalls either in or out of your control will not allow one way traffic. That is to say that if part of a session is sent one way and part is send another, most commercial firewalls will not allow that traffic to pass. Also you would need a way for your load balancing router to monitor the links, so if a link goes down but the interface stays up it doesnt continue to send traffic out the bad link (loosing data packets in the process).

I think you would be better off running 1 or more of those wrt's in router mode and creating seperate paths out, i am not sure if in router mode they will accept more then 1 default route but its worth a try. I would guess no as they are not set up to load balance by default but you wont know until you try. Could also get really crafty if you wanted to dig into it and do some form of policy routing (would need to build a routing script for this as its not a feature of the router). Policy routing would give you the ability to send certain data one way and other data over a different path. Having multiple routers you have the ability to play lots of ways and are only limited my the default features of the router and how much you really want to learn about writing the scripts to change the default behavior.
 
Thank you for the thoughts. I know I could do all this easier with a pc based router (as in a full pc not just a "appliance"). But it is the thrill of getting something that cost so little to be able to do things multi-thousand dollar routers do.

My main thing is not really the "uber connection". More so a backup connection. As cool as my neighbors are I still would not want to saturate their connection. The main thing I do is remote connect to my home network and do all my surfing and such there. My main internet connection is Comcrap. My neighbors have AT&T dsl and Hughesnet satellite (either side of me). So for ultimate redundancy I could have my main connection as just that... my main connection. And when (yes when... not if) comcrap goes down I can fall over to the AT&T dsl connection. Then if that were to fail I could always fall over to the Hughesnet, although this is a last resort. I do have a script running on my home server that checks my ip every so often. If it detects it has changed it will send a text message to my phone with the current one. So that script could come into play with the fallover also. When comcrap fails it will/could fall over to the dsl and will notify me of the new ip.

Sound doable huh?
 
definately doable, since most pc based router run linux too (= its simply a matter of putting it onto the box, and tt most wrt firmwares were configured to handle a single wan port.

I can see that a problem would be for the router to decide when the main connection goes down, and switch to the backup, and for it to update the dynamic dns accordingly, though you could always fall back on the text message if somehow the dyndns doesn't work.

Ways to get this done:
1. continually ping, or wget a server such as google and swap if u get timeouts, and swap back when its back up.
2. maintain multiple dynamic dnses for each connection, and manually swap to the other if u fail to get through, possibly with a modification to the load balancing script
 
I like the idea. I just have never dealt much with this in depth of stuff. So when I attempt this I would like any assistance available. I am about to bring up my second internet connection in the next day or so. It will be a wireless connection to a neighbor via one of my spare WRT54g's and then I will put that on the newly added second wan port on my main WRT54GS. We will start there and see how that goes.
 
Watching this thread with interest - I do currently have 2 ISP connections but both are dynamic IPs, backup strategy is to physically move WAN patch cable from DSL modem to cable modem. Reverse swap needs router reboot (or login in to GUI to release/renew) as cable lease is 7 days, DSL in half bridge is 60 seconds.

But maybe it breaks Tomato simplicity philosophy and we should just switch to dd-wrt for this?
 
But maybe it breaks Tomato simplicity philosophy and we should just switch to dd-wrt for this?

Nah I like Tomato better...besides we're talking about a few scripts, not a major firmware re-write. As long as we don't go putting IPKG in the firmware everything is square.
 
Nah I like Tomato better...besides we're talking about a few scripts, not a major firmware re-write. As long as we don't go putting IPKG in the firmware everything is square.

Got to find something to fill that 4+Meg of jffs nvram I now have in my wrt54gs v1.1!
 
Well a year later and I need this more now than ever. I do alot of remote connecting to my home to do work and such. I also have a need to always be online for various things like my media pc getting updates and such for programs. Comcast in my area is getting ridiculous on the outages. So I need to look into doing the backup connection more heavily now.

I am currently running roadkill's vpn mod but am looking at going with viktek's mod for a few other options I like. (if they were merged that would rock ;) ) What I have is my unlimited comcrap account and a cellular connection that has to be on a PC to work. What I am thinking is to take a small pc (or my laptop) and do the Dual WAN mod with failover and have it email me when it changes connections with the new IP of the current connection.

Is there an easier way that anyone knows of than the one mentioned in the link from dd-wrt on the first post? I am not wanting to get fancy now with drawing out of both connections, just a simple failover will work fine for me.
 
nopes, i haven't touched this issue since ages ago actually.

basically it should still be similar

1. separate the 2nd WAN link into another VLAN
2. either write some script to change WAN links when the a ping(to test for connectivity) starts failing or;
3. write some load-balancing script

PS: you might need to setup dnsmasq to manage the second WAN link as well, either using DHCP or otherwise (not sure if u need another dnsmasq process) beats me (= i'm guessing.

don't ask me for howtos though (= since i've not physically worked this out before
 
dnsmasq is not used for WAN side dhcp, busybox udhcpc is used.

I still have a dual WAN mod working with manual switchover as per this thread

http://www.linksysinfo.org/forums/showthread.php?t=54665

I also had the email messages working (my own compiled 100kB msmtp) at one time, but my attempts at concurrent use of both WANs did not work, and I didn't find a good reliable method of internet down detection. (my ISPs clearly drop ping packets when they are busy!).

Maybe I'll try victek's mod sometime (havent finished reading the sourcecode changes yet...) - the later udhcpc may fix my concurrent WAN problem?, and busybox 1.10+ can be compiled with a send_mail which works on my adsl modem.

The dd-wrt scripts do seem to have moved on in the meantime.
 
I would love to get this working soon. Comcrap did an "upgrade" between 12am-8am local time this morning and somehow I was never knocked off... not till about 8:30am. lol And I am not the only one that was knocked off. I just love how it's "craptastic!" I must say though this is the first issue I have had in months. I love my 8mx1m :)
 

Back
Top