Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Two Routers, One network: Changing gateways between them?

Go to solution Solved by Archer42,
52 minutes ago, TheLewisS1 said:

Router A is primary and will be the DHCP server. IP: 192.168.0.1

Router B is secondary and will have DHCP turned off. IP: 192.168.2.1

 

On my machine, I change the gateway from 192.168.0.1 to 192.168.2.1.

I now use the internet connection of Router B.

They need to be in the same subnet, so you either need a mask which includes both, like 192.168.0.0/22, or you need to make them 192.168.0.1 and 192.168.0.2, if you are using 192.168.0.0/24.

Other than that it will work fine. You can even set 2 gateways with different metric if you want very simple failover.

Hello

 

If I had two routers: A and B, both connected to the main LAN and their own internet connection, could I change which router I was using to connect to the internet?

I was thinking:

 

Router A is primary and will be the DHCP server. IP: 192.168.0.1

Router B is secondary and will have DHCP turned off. IP: 192.168.2.1

 

On my machine, I change the gateway from 192.168.0.1 to 192.168.2.1.

I now use the internet connection of Router B.


Would this work?

If I need to clarify, please let me know.

Thanks!

UTC/GMT (Except during BST)

Link to post
Share on other sites

On LAN? I believe you'd have to switch out the ethernet cable from your PC, to whichever router you want to connect to. I don't think you can bypass one router to access to the other...

Or at least, I sure wasn't able to access Router 1 in the chain if I was connected to Router 2 when I last did this.

On wifi though, if they use different SSID, it is possible.

CPU: AMD Ryzen 3600 / GPU: Radeon HD7970 GHz 3GB(upgrade pending) / RAM: Corsair Vengeance LPX 2x8GB DDR4-3200
MOBO: MSI B450m Gaming Plus / NVME: Corsair MP510 240GB / Case: TT Core v21 / PSU: Seasonic 750W / OS: Win 10 Pro

Link to post
Share on other sites
Just now, TetraSky said:

On LAN? I believe you'd have to switch out the ethernet cable from your PC, to whichever router you want to connect to. I don't think you can bypass one router to access to the other...

Or at least, I sure wasn't able to access Router 1 in the chain if I was connected to Router 2 when I last did this.

On wifi though, if they use different SSID, it is possible.

 

They're both on their own cable on the same switch, see my diagram.

It might involve switching the IP of the PC, but I don't think so if i'm only changing the gateway

image.png.01e7932bc910b3b81c29075bdc9fcb12.png

UTC/GMT (Except during BST)

Link to post
Share on other sites
52 minutes ago, TheLewisS1 said:

Hello

 

If I had two routers: A and B, both connected to the main LAN and their own internet connection, could I change which router I was using to connect to the internet?

I was thinking:

 

Router A is primary and will be the DHCP server. IP: 192.168.0.1

Router B is secondary and will have DHCP turned off. IP: 192.168.2.1

 

On my machine, I change the gateway from 192.168.0.1 to 192.168.2.1.

I now use the internet connection of Router B.


Would this work?

If I need to clarify, please let me know.

Thanks!

With only one NIC, I do not believe that is possible. With two it's a piece of cake

So rise up, all ye lost ones, as one, we'll claw the clouds

Link to post
Share on other sites
52 minutes ago, TheLewisS1 said:

Router A is primary and will be the DHCP server. IP: 192.168.0.1

Router B is secondary and will have DHCP turned off. IP: 192.168.2.1

 

On my machine, I change the gateway from 192.168.0.1 to 192.168.2.1.

I now use the internet connection of Router B.

They need to be in the same subnet, so you either need a mask which includes both, like 192.168.0.0/22, or you need to make them 192.168.0.1 and 192.168.0.2, if you are using 192.168.0.0/24.

Other than that it will work fine. You can even set 2 gateways with different metric if you want very simple failover.

Link to post
Share on other sites
1 minute ago, Archer42 said:

They need to be in the same subnet, so you either need a mask which includes both, like 192.168.0.0/22, or you need to make them 192.168.0.1 and 192.168.0.2, if you are using 192.168.0.0/24.

Other than that it will work fine. You can even set 2 gateways with different metric if you want very simple failover.

Okay. That would work too.

Thanks!

 

If anyone has any extra thoughts or comments please comment them!

UTC/GMT (Except during BST)

Link to post
Share on other sites
1 hour ago, LewisSpring said:

Hello

 

If I had two routers: A and B, both connected to the main LAN and their own internet connection, could I change which router I was using to connect to the internet?

I was thinking:

 

Router A is primary and will be the DHCP server. IP: 192.168.0.1

Router B is secondary and will have DHCP turned off. IP: 192.168.2.1

 

On my machine, I change the gateway from 192.168.0.1 to 192.168.2.1.

I now use the internet connection of Router B.


Would this work?

If I need to clarify, please let me know.

Thanks!

You can use both internet connections in LoadBalancing/Failover scenarios if you connect them to pfSense in bridge mode.  I have been doing that for years.

Windows really suck in advanced networking.

 

https://www.pfsense.org/

Link to post
Share on other sites
1 minute ago, Biomecanoid said:

You can use both internet connections in LoadBalancing/Failover scenarios if you connect them to pfSense in bridge mode.  I have been doing that for years

 

https://www.pfsense.org/

My ASUS router can do that between USB Modem and WAN. (My main internet connection is via 4G) 

But I don't think I can specify on demand which gateway my PC uses - and also I don't know if I can use the B router in bridge mode or with a modem.

 

I don't really have the hardware availiable to make a pfsense box either.

UTC/GMT (Except during BST)

Link to post
Share on other sites

Thing is, there are many ways to automate it.

One router with multiple wan ports can be used (any mikrotik router, for example) to handle both connections and failover.

One of the routers can be used to do failover too ( daisy chain them, sort of).

3-rd router can be used to handle it (in place of a switch on the picture).

 

However sometimes the simplest solution is the best one. Switching default gateway in windows is easy, and gives user full control in terms of which connection is used. Been doing it exactly like this myself for this reason.

 

One thing to be aware of - you need to either set both routers as dns servers (assuming both do dns forwarding) or set a dns server accessible through both connections, like 8.8.8.8 or 9.9.9.9. Otherwise you will have to change dns along with gateway too.

Link to post
Share on other sites
5 minutes ago, Archer42 said:

Thing is, there are many ways to automate it.

One router with multiple wan ports can be used (any mikrotik router, for example) to handle both connections and failover.

One of the routers can be used to do failover too ( daisy chain them, sort of).

3-rd router can be used to handle it (in place of a switch on the picture).

 

However sometimes the simplest solution is the best one. Switching default gateway in windows is easy, and gives user full control in terms of which connection is used. Been doing it exactly like this myself for this reason.

I won't want to switch to the B router often. I'll only have it because it was just as cheap as having a phone line on it's own.

I can't seem to use Youtube-DL on my 4G internet, so i'd switch to the B router for that reason, for example.

Or if the 4G connection dies - I'd switch the DHCP gateway to the B router.

 

It's a fine price to pay though, barely 10 mbps on DSL? vs 80mbps on 4G

UTC/GMT (Except during BST)

Link to post
Share on other sites
21 minutes ago, Archer42 said:

Thing is, there are many ways to automate it.

One router with multiple wan ports can be used (any mikrotik router, for example) to handle both connections and failover.

Mikrotik routers are excellent ( I have a lot of them) especially the wi-fi, I have done long range wireless links with them,  but in load balancing though they don't do that good of a job but failover works fine.

 

Quote

One of the routers can be used to do failover too ( daisy chain them, sort of).

3-rd router can be used to handle it (in place of a switch on the picture).

 

However sometimes the simplest solution is the best one. Switching default gateway in windows is easy, and gives user full control in terms of which connection is used. Been doing it exactly like this myself for this reason.

 

But you loose bandwidth as you don't utilize both internet connections at once so you don't really get your money's worth.

 

Also this should be done automatically as you can not go around your house and change GW on all the devices, phone, android media player on tv, voip phone, PC etc. etc etc

 

You can have FULL and complete control over your connections with a firewall that is why they exist, that is their function.

 

Link to post
Share on other sites

I can change the gateway from the router via DHCP. It's not pretty, as DHCP leases and all that jazz, but for an emergency situation where the 4G is down - It does not matter much.

I don't get much via DSL? as i said earlier, and it was about £2 more than the phone line alone.

Thank you for your points - they're good, but they don't apply in my situation.

UTC/GMT (Except during BST)

Link to post
Share on other sites
12 minutes ago, LewisSpring said:

I won't want to switch to the B router often. I'll only have it because it was just as cheap as having a phone line on it's own.

I can't seem to use Youtube-DL on my 4G internet, so i'd switch to the B router for that reason, for example.

Or if the 4G connection dies - I'd switch the DHCP gateway to the B router.

 

It's a fine price to pay though, barely 10 mbps on DSL? vs 80mbps on 4G

You don't have an old PC to use as a router ? any old pc will work . you just need 3 network interfaces

Link to post
Share on other sites
1 minute ago, Biomecanoid said:

You don't have an old PC to use as a router ? any old pc will work . you just need 3 network interfaces

I don't have one that has three network interfaces unless I used USB network adapters. I'm happy with my current setup. I don't particularly want the energy costs, and the effort and learning to set it up and maintain it. There's other people in the house, and I want it to be reliable.

It does sound like something I'd be interested in - but it's not something I want to put the effort into right now.

UTC/GMT (Except during BST)

Link to post
Share on other sites
27 minutes ago, Archer42 said:

One thing to be aware of - you need to either set both routers as dns servers (assuming both do dns forwarding) or set a dns server accessible through both connections, like 8.8.8.8 or 9.9.9.9. Otherwise you will have to change dns along with gateway too.

I run a Pi-Hole so that'd be a non-problem - otherwise i'd use 1.1.1.1

UTC/GMT (Except during BST)

Link to post
Share on other sites
9 minutes ago, LewisSpring said:

I don't have one that has three network interfaces unless I used USB network adapters. I'm happy with my current setup. I don't particularly want the energy costs, and the effort and learning to set it up and maintain it. There's other people in the house, and I want it to be reliable.

It does sound like something I'd be interested in - but it's not something I want to put the effort into right now.

Well if there are non IT savvy persons in the house that can not change they GW on demand when ever they feel like, more of a reason to automate the process because in case something goes wrong they would need help.

.

pfSense is FreeBSD is stable, needs no maintenance and can replace your Pi-Hole functionality, its a set and forget device. If you worry about electricity there are 10-20watt devices you can use

Link to post
Share on other sites
1 minute ago, Biomecanoid said:

Well if there are non IT savvy persons in the house that can not change they GW on demand when ever they feel like, more of a reason to automate the process because in case something goes wrong they would need help.

.

pfSense is FreeBSD is stable and needs no maintenance its a set and forget device. If you worry about electricity there are 10-20watt devices you can use

Yes. But this is a very rare event - the likely-hood of the 4G connection failing is very low. I haven't had it happen in quite a while - and rebooting the modem and router fixed it.

If I end up being able to use router B in bridge mode or with a modem - I'll just set my ASUS router to fall back to the DSL?.

 

Thanks

UTC/GMT (Except during BST)

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×