Multiple gateways one ip range

Author
Discussion

davidd

Original Poster:

6,527 posts

291 months

Wednesday 22nd May
quotequote all
Hello,

We have a fixed broadband connection from BT, current giving us about 40mb down.

It is on the 192.168.1.x range with the gateway being 192.168.1.254

DHCP is also handled by the BT router, range from 63 to 240

There is a main wireless network and some proper cat 6 and a bit of powerline.

In order to get better bandwidth I've just bought an EE 5g router which is also giving me 230mb down ( a clear improvement).,

It is also on the 192.168.1.x range with the gateway being 192.168.1.1

It is currently running a separate wireless lan, dhcp from 2 to 62

My question is, can I plug it into the existing cat6 network? Will they coexist? Addresses issued by ee will get a gateway of .1 and by BT will get .254

Thanks

D

biggiles

1,836 posts

232 months

Wednesday 22nd May
quotequote all
So a user device will have pot-luck whether it gets DHCP info from either router, and what connection gateway it uses?

That might lead to all sorts of consequences. Suggest either getting a router with proper failover, or unplug the broadband router.

edeath

336 posts

198 months

Wednesday 22nd May
quotequote all
While it might work well to split the internet bandwidth across your ethernet devices you will struggle with getting devices to talk internally across the 2 routers, if you can at all, and it will be random which router they get an address from and therefore random which other devices they can talk too.

Your best bet is to look into routers that have dual internet ports and load balancing - something from Draytek would work. That way you have one internal network with 2 internet connections.

xeny

4,673 posts

85 months

Wednesday 22nd May
quotequote all
edeath said:
While it might work well to split the internet bandwidth across your ethernet devices you will struggle with getting devices to talk internally across the 2 routers, if you can at all, and it will be random which router they get an address from and therefore random which other devices they can talk too.
To be awkward, I think this bit should work fine. An IP is an IP, regardless of how it gets on the device.

edeath

336 posts

198 months

Wednesday 22nd May
quotequote all
DW not awkward. I was thinking devices using consumer routers doing their own thing and multiple gateway with unique DNS servers would struggle to communicate even if routing isnt needed on the same subnet.

But maybe I'm overcomplicating it and happy to learn.

dapprman

2,462 posts

274 months

Wednesday 22nd May
quotequote all
Do you have to use DHCP for all your machines? I would strongly recommend just one DHCP server (192.168.1.254), and anything that is to use the faster bandwidth, use a static IP address with the gateway defined as 192.168.1.1. This way you are not going to get the risk of an IP refresh occurring while connected to the outside world with the result of your phone/PC/tablet switching DHCP servers and return IP traffic becoming lost.

EddieSteadyGo

13,160 posts

210 months

Wednesday 22nd May
quotequote all
Why don't you set up one of the routers to work on a different subnet e.g. 192.168.2.x with the other gateway as 192.168.1.y?

Edited by EddieSteadyGo on Wednesday 22 May 23:23

RemarkLima

2,569 posts

219 months

Wednesday 22nd May
quotequote all
What you need to do is get a router which can support two WAN connections.

A DrayTek is the usual go to for SOHO use, but plenty of others will support load balancing.

Then you have your DSL connection as per normal, and a ethernet WAN to the 5G router. Disable WiFi on the 5G router and have the main network on the Draytek only.

All LAN traffic will route to the draytek, which can then load balance between the two connections and you'll be able to get the combined speed of both connections.

I use this setup and works a treat.

Murph7355

38,917 posts

263 months

Wednesday 22nd May
quotequote all
Other than giving yourself headaches on your network, what are you aiming to achieve?

If you want some devices using one ISP connection and some the other, create separate LANs.

To run two ISP connections properly on the same LAN, get yourself a multi-WAN router, which will give you plenty of options on using your two connections.

e.g. https://www.broadbandbuyer.com/store/broadband-rou...


TriumphStag3.0V8

4,113 posts

88 months

Thursday 23rd May
quotequote all
It will work.

Whichever router hands out the DHCP address to the device will use itself as the default gateway. the device will then use that gateway to go out to the internet. Assuming that neither has something like wireless isolation set, as both routers are giving out IP addresses in the same range but different parts of the range the devices will talk to each other happily.

The devices on the wireless network for the 5G router will obviously use that one, anything using the BT SSID will use that and anything hard wired * should * use whatever they are plugged into - although there is a bit of pot luck in this.

The question is: why? what are you trying to achieve?

xeny

4,673 posts

85 months

Thursday 23rd May
quotequote all
EddieSteadyGo said:
Why don't you set up one of the routers to work on a different subnet e.g. 192.168.2.x with the other gateway as 192.168.1.y?

Edited by EddieSteadyGo on Wednesday 22 May 23:23
I'd consider doing this if I had some devices that "needed" faster connectivity, but I didn't want the proletariat to waste a metered resource. This arrangement with DHCP reservation should achieve that, but still allow all devices internal connectivity to say a NAS or a printer.

eeLee

856 posts

87 months

Thursday 23rd May
quotequote all
do it properly, consider something like pfsense with 2 NICs as your gateway and router/load-balancer.

or replace your router with a dual mode one supporting 4/5G and go that way.

or just switch to the faster connection.

megaphone

10,939 posts

258 months

Thursday 23rd May
quotequote all
As above, why? If the EE 5G works well then just use that, give it a few weeks to check the reliability. Turn off the BT router and cancel, save yourself some money.

davidd

Original Poster:

6,527 posts

291 months

Thursday 23rd May
quotequote all
Thanks for all the replies, which more or less confirm my thoughts.

As for why, I just wondered what would happen.

The 5g router is to give me some protection from my family who all seem to need a lot of bandwidth, so it will probably stay disconnected from the lan and I'll use wifi to connect to it. I've also noticed that the speeds are very variable so I need to play with positioning.

I would put a load balancing router in but that would involve a couple of fairly long cable runs which I'm not sure I can be bothered to do. Thanks for the recommendations though I will take a look (and then probably spend the bank holiday with the floors up!). Or I might just stick them all on the same network turn dhcp off on the ee router and use static ips for anything I want to connect to it.

Hopefully BT will manage to put Fibre in at some point then I can have some proper speeds.

Thanks again

D

ffc

680 posts

166 months

Thursday 23rd May
quotequote all
edeath said:
DW not awkward. I was thinking devices using consumer routers doing their own thing and multiple gateway with unique DNS servers would struggle to communicate even if routing isnt needed on the same subnet.

But maybe I'm overcomplicating it and happy to learn.
Host will find each other by using the ARP protocol to ask for the MAC address of the destination device. If they are on the same subnet and physically connected the receiving device will answer with its own MAC address and the routers won't get involved. If the destination IP address is not in the local subnet the transmitting host will make an ARP request for its configured gateway address and forward packets to that for onward transmission.

Having two routers on the same subnet is a fairly common occurrence outside a domestic environment.

If you load wireshark onto your PC and have a few devices on your network you can capture ARP activity and see how the process works.

TonyRPH

13,144 posts

175 months

Thursday 23rd May
quotequote all
Two DHCP servers on the same network is not going to work, unless they are aware of each other (e.g. load balancing).

You will end up with duplicate IP addresses, and then your troubles really start...

What you could do is setup two default routes each with a metric, and assign the lowest metric to the route of choice.

Whether or not the DHCP server in your router supports this I have no idea.

But on Linux it would be something like this:

sudo ip route add default via 192.168.1.1 dev ethX metric 100
sudo ip route add default via 192.168.1.254 dev ethX metric 200

EDIT: Ideally you would put a layer 3 switch or Linux box in front of the two routers, and then let the switch / Linux box handle DHCP duties.


davidd

Original Poster:

6,527 posts

291 months

Thursday 23rd May
quotequote all
TonyRPH said:
Two DHCP servers on the same network is not going to work, unless they are aware of each other (e.g. load balancing).

You will end up with duplicate IP addresses, and then your troubles really start...
Why would we have duplicate ip addresses? I thought I all I would need to do is give them different ranges.

TonyRPH

13,144 posts

175 months

Thursday 23rd May
quotequote all
davidd said:
Why would we have duplicate ip addresses? I thought I all I would need to do is give them different ranges.
My mistake - with different ranges there should be no risk of duplicate addresses.

As you were!

eeLee

856 posts

87 months

Thursday 23rd May
quotequote all
if you have two DHCPs in ARP range - that is on the same Ethernet - your addressing will be interesting, especially if you run two different subnets.

The DHCP server that responds fastest will allocate the IP address and the request will be fulfilled.

If you have two Internet connections, it would be simplest to load the traffic onto the best one for its purpose; it sounds like the 5g route is faster but the copper route will have lower latency.

ffc

680 posts

166 months

Thursday 23rd May
quotequote all
edeath said:
DW not awkward. I was thinking devices using consumer routers doing their own thing and multiple gateway with unique DNS servers would struggle to communicate even if routing isnt needed on the same subnet.

But maybe I'm overcomplicating it and happy to learn.
Hosts will find each other by using the Address Resolution Protocol (ARP) to ask for the MAC address of the destination device. If they are on the same subnet and physically connected the receiving device will answer with its own MAC address and the routers won't get involved. If the destination IP address is not in the local subnet the transmitting host will make an ARP request for its configured gateway address and forward packets to that for onward transmission.

Having two routers on the same subnet is a fairly common occurrence outside a domestic environment.

If you load wireshark onto your PC and have a few devices on your network you can capture ARP activity and see how the process works.