Network with 2 Gateways

cemjack

Honorable
Jul 7, 2013
3
0
10,510
I have 2 internet connections on same network, each with their own gateway 10.0.0.1 and 10.0.0.5.

I can manually enter the gateway on most devices thereby using that specific internet connection.

However, some devices do not allow me to enter the gateway and therefore that device defaults to 10.0.0.1 which is the router handling DHCP.

Can anyone help me with setup?

On 10.0.0.1 - I'm currently using Unifi USG with switch and AP (all unifi) - Handles DHCP
On 10.0.0.5 - using Asus RT-AC68

Ideally, I would have two SSID, one for each gateway; that way I can connect to which ever network I need.

Thanks.
 
Solution
You would only run a single DHCP server and disable it on both routers.

The gateway is purely a data field it does not have to be the same IP as the DHCP server itself. The DHCP server can send anything it wants in the field...obviously it would have to be some actual value that was some form of gateway ip to function.

This is a very common setup in a large enterprise install. They will have 1 DHCP server, generally the domain server in a microsoft install, for all the location. It does not even have to be in the same country and it will work.

Exactly how you set the mac to the gateway depends on the server but pretty much you just put in entries that say when you see mac give it this ip, mask,gateway, option parms etc etc...
Your problem is the devices that will not let you manually set ip/gateway. There is little you can do with a stupid device that is dependent on dhcp.

If you wanted to get really ambitious you could use a PC as your dhcp server. You can set the dhcp information return to the end device to be based on mac address. This is commonly use for IP phones where they need some of the optional parameters set in the dhcp that most other device will not use. It might be possible to do this with third party firmware for routers since they are linux based but I have never done it.

Even setting different SSID will not solve your issue it will still get the ip from the main router because you have connected the 2 routers. The wireless is just like a switch but it is wireless.

There is no easy solution for this on a stupid device. As you have found on most device you can manually set this. On a PC you can do even more by using the route command to actually use both connection by routing some destination ip to the secondary connection.
 

cemjack

Honorable
Jul 7, 2013
3
0
10,510


bill001g - thanks for the help. I do not think I have the knowledge to setup pc as dhcp server??

I'll do a search for dhcp server. I may be able to use the mac server app. However, two questions

1 - then I will have two dhcp servers, will that cause problem?

2 - how do i make sure the mac address for dumb device uses gateway #2 and not the default gateway #1?

Thank again.
 
You would only run a single DHCP server and disable it on both routers.

The gateway is purely a data field it does not have to be the same IP as the DHCP server itself. The DHCP server can send anything it wants in the field...obviously it would have to be some actual value that was some form of gateway ip to function.

This is a very common setup in a large enterprise install. They will have 1 DHCP server, generally the domain server in a microsoft install, for all the location. It does not even have to be in the same country and it will work.

Exactly how you set the mac to the gateway depends on the server but pretty much you just put in entries that say when you see mac give it this ip, mask,gateway, option parms etc etc. It it a simple table entry on most systems.
 
Solution