Using two routers on network

SAguy

Honorary Master
Joined
Nov 4, 2013
Messages
10,615
I've got WiFi adsl router, but when my adsl line is down I lose all connectivity.
If I buy another router which is a 3G/4G router, how would I connect everything together?

I don't need automatic failover to 3G, but don't want to worry about reconfiguring the universe every time I do need to plug in the 3G router.

Or would I be better off leaving the two completely separate and just manually connecting the devices to the 3G router when needed?
 
Joined
Sep 1, 2016
Messages
2,196
Or would I be better off leaving the two completely separate and just manually connecting the devices to the 3G router when needed?

That is what I do.. at least it works reliably every time. I don't rely on routers switching "automagically" as they often fail to do so.
 

Chevron

Serial breaker of phones
Joined
Oct 2, 2007
Messages
25,900
Or would I be better off leaving the two completely separate and just manually connecting the devices to the 3G router when needed?

Easiest way is to just change the gateway address/IP on your adsl router when you setup the 3G router.

Then it's just 1 setting to change.
 

Dirty Harry101

Active Member
Joined
Sep 23, 2016
Messages
80
If I understand correctly you will have a separate router to the ADSL? If you buy a 3G/4G router, why not get one that has ADSL as well, then you plug in your 3G/4G when ADSL is down OR have them both setup the same but one of them switched off until the primary fails.

If I'm misunderstanding please say.
 

Neo_X

Expert Member
Joined
Mar 23, 2005
Messages
1,798
the problem comes in on the DHCP address allocations.
IF you do it statically, you can have both gateways on the network ( 192.168.0.1 and 192.168.0.2 for example), then configure your computers to use both gateways (windows has this feature)

otherwise, keep router powered on, and configured to give out IP's but dont connect it to your network. Thus when ADSL fails, you can disconnect the ADSL router and connect the 3g router. Will probably require you to restart the end devices to renew their leases.
 

RoganDawes

Expert Member
Joined
Apr 18, 2007
Messages
1,259
I'd suggest keeping the 3G router configured, but powered off until it is needed. This way, you don't accidentally connect to the 3G router when it is not necessary, and kill your data allocation.

When it is needed, power it on, and connect to its SSID from your various devices. Wired devices would obviously also have to be switched from one to the other, which is a bit of a headache, but see the first para!
 

OCP

Executive Member
Joined
Jan 23, 2014
Messages
5,306
I'd suggest keeping the 3G router configured, but powered off until it is needed. This way, you don't accidentally connect to the 3G router when it is not necessary, and kill your data allocation.

When it is needed, power it on, and connect to its SSID from your various devices. Wired devices would obviously also have to be switched from one to the other, which is a bit of a headache, but see the first para!

This is solid advice if you want to keep it simple.

A proper more redundant way would be to put a proper firewall (eg. pfSense) with 3 NICs as the default gateway that can manage both WAN routers (each on own NIC) and connect LAN to 3rd NIC.
Then you can fail-over/load balance/etc as you require.

nb. You would need a separate WAP connected to the LAN switch.

Happy do diagram it for you if you need more info.
 

syntax

Executive Member
Joined
May 16, 2008
Messages
8,656
I dont think it would be too hard to write a quick program that does gateway tracking and fails over to another gateway.
Have both routers on the same subnet, each with a static assignment on their inside interface
Im actually surprised no app exists now.
I could give this a bash if you interested?
 

RoganDawes

Expert Member
Joined
Apr 18, 2007
Messages
1,259
I dont think it would be too hard to write a quick program that does gateway tracking and fails over to another gateway.
Have both routers on the same subnet, each with a static assignment on their inside interface
Im actually surprised no app exists now.
I could give this a bash if you interested?

It's not quite as simple as that, unfortunately.

If you have two routers on the same subnet, both will be handing out dhcp addresses, each with themselves as the default gateway.

So one will have dhcp disabled. The problem then becomes convincing each workstation to update their idea of the default gateway when necessary. Unfortunately, that comes down to rewriting a dhcp server, which is not a trivial task. And also would require another server permanently available on your network.

The correct approach is to have a single gateway on the network that can decide where its next hop is, whether that is Adsl, fiber or 3G. Then there is no need to update the clients at all.

The tp-link above looks like it might be suitable.
 

syntax

Executive Member
Joined
May 16, 2008
Messages
8,656
It's not quite as simple as that, unfortunately.

If you have two routers on the same subnet, both will be handing out dhcp addresses, each with themselves as the default gateway.

So one will have dhcp disabled. The problem then becomes convincing each workstation to update their idea of the default gateway when necessary. Unfortunately, that comes down to rewriting a dhcp server, which is not a trivial task. And also would require another server permanently available on your network.

The correct approach is to have a single gateway on the network that can decide where its next hop is, whether that is Adsl, fiber or 3G. Then there is no need to update the clients at all.

The tp-link above looks like it might be suitable.

Both assign DHCP addresses, one can assign from 192.168.0.3 - 20 and the other form 192.168.0.21-40 for example
router 1 is .1 router 2 is .2

write something that runs a ping to gateway 1, should this fail, add a static route with a lower metric than the one installed from router 1
when the ping returns (you could even build in a hold timer) then delete the static route.

Sure, its not pretty, but it will work and could probably be made to be fairly easy to use.
 

RoganDawes

Expert Member
Joined
Apr 18, 2007
Messages
1,259
Both assign DHCP addresses, one can assign from 192.168.0.3 - 20 and the other form 192.168.0.21-40 for example
router 1 is .1 router 2 is .2

write something that runs a ping to gateway 1, should this fail, add a static route with a lower metric than the one installed from router 1
when the ping returns (you could even build in a hold timer) then delete the static route.

Sure, its not pretty, but it will work and could probably be made to be fairly easy to use.

Having two active dhcp servers on a single network is a recipe for trouble.

Clients will randomly get an answer from one or the other, and have different gateways.

Even assuming that you only care about a single client having alternate routing, or are happy to run this program on each one, your theory of pinging each gateway to determine which route to use is fallacious. Each gateway (.1 or .2) will always be reachable - this indicates nothing about reachability of the broader internet from each gateway.

Unless you start crafting your packets manually, and setting the source routing option to tell the PC which gateway you want to send the packet via, and that is a whole other ball o' wax!
 

syntax

Executive Member
Joined
May 16, 2008
Messages
8,656
Having two active dhcp servers on a single network is a recipe for trouble.

Clients will randomly get an answer from one or the other, and have different gateways.

Even assuming that you only care about a single client having alternate routing, or are happy to run this program on each one, your theory of pinging each gateway to determine which route to use is fallacious. Each gateway (.1 or .2) will always be reachable - this indicates nothing about reachability of the broader internet from each gateway.

Unless you start crafting your packets manually, and setting the source routing option to tell the PC which gateway you want to send the packet via, and that is a whole other ball o' wax!

run a single dhcp, it doesnt really matter. the gateway doesnt really matter either as it will be controlled by the programme installing a route itself.
I was assuming a slightly more complex IP SLA, so route a destination through one gateway and ping that.
route 8.8.4.4 through one gateway, 8.8.8.8 through another, ping that for reachability.
If it goes down, the gateway is dead and add a static with a better metric.

It actually shouldnt be hard to do this at all, it could cause some problems with roaming to other networks, but that could also be mitigated with a bit of tweaking (im wondering if you could detect SSID and save settings to enable only when on certain wireless networks).
In any case, I would probably just buy a device with dsl and 3g built in, they are not particularly expensive. The programme is more out of interest
 
Last edited:
Top