Question:
I keep getting the wrong default gateway when connecting to the internet?
Karl
2015-02-11 04:12:19 UTC
So, the situation is that there are two routers in the office that we use for the internet. Router A is the main one while Router B was configured to extend the wi-fi signal to the other side of the office.

Router A has an IP of 192.168.1.1 and a starting IP address of 192.168.1.100 with 50 maximum number of users (so up to 149)

Router B has an IP of 192.168.1.10 and the starting IP of 192.168.1.150 and 50 max users once again.

The thing is, whenever I try to connect to the wireless internet, the default gateway is always set to 192.168.1.10, Router B's IP.

Also, even if I connect to Router A, the IP is sometimes above .149 and even vice versa. How do I set it so that if I connect to Router B or if the IP is above .149 the default gateway is the IP of router B?

I didn't make the settings for these routers. I don't have that much experience with networking but I do know the basics so don't hesitate with jargons and complicated IT solutions.

I can manually set the IPs which is what I usually do but I would really like to be using DHCP so that I wouldn't have to manually set IP addresses whenever a new laptop comes along.
Six answers:
BigE
2015-02-11 05:23:01 UTC
So someone who doesn't understand IP set them up.



You can't have 2 dhcp servers on the same segment, it doesn't work right. I can't tell if both routers have a separate connection or router B is plugged into router A. Both are possible, even with different IP ranges and given that someone doesn't understand how the setup should be done.



The way I would do it (if there is one internet connection), run router A with the whole DHCP scope. Run router B as an AP or Access Point. You can advertise the same SSID on both routers, your WIFI should choose the strongest one and you should be able to roam seemlessly. You'll have one network, and no need to have 2 different DHCP pools.



Update:

So read up how to setup the linksys as an AP. If you google your model and "access point" there are either tutorials OR some routers have that mode on their configuration. Essentially, you turn off dhcp and the firewall on router B but you also connect it from LAN to LAN, (switch ports) not LAN to WAN (like a router). The WAN port of router B is unused (the internet side).



This makes the AP essentially a switch with wireless. It will therefore use the DHCP from router A and work perfectly fine. Now you have 1 big network wth 1 firewall and 1 DHCP server and scope, all on router A. Don't worry about loading, your A router's firewall was already handling all the traffic from A and B before and DHCP is really a low cpu function.



If you wanted to separate out the wireless, you can have 2 SSIDS (network names) and your users can choose which to connect to. It will give them IPs from the DHCP pool but who cares what range those are in since it is a single pool. Or you can just have 1 SSID and people can roam between the locations seemlessly and the WIFI protocol will pick which one to talk to. (it should choose the strongest signal, but this is client dependent. I've seen some wireless stacks connect and always try to use the first connected AP.) I sometimes deploy at first with different SSIDs so I know which wireless I am talking to and then redeploy the AP with the same SSID later.
Percy C
2015-02-11 21:19:22 UTC
Hi

In order to get the right gateway, you need to setup your 2nd router

At the 2nd router do the following

The IP address is already set , I suppose that the wifi SSID and password is also set,

Now you need to setup the DHCP to disabled

DHCP addresses will be handled by the 1st router

And you need to feed the 2nd router by a LAN port , DO NOT use the WAN port



You can search in Google LAN to LAN router in order to extend a network

Now all the equipment belong to the same network same gateway
2015-02-11 07:18:29 UTC
Means Your Network is Wrong and both Routers are using the same Default Gateway.



A router gets the First IP Address of the network it creates... which becomes the Default Gateway to other networks...



So if you was to run Both Routers on the same network number of 192.168.1.0 they will both be 192.168.1.1 which will cause a conflict at the start. And this is what your experiencing...



IP LAN Work like this:



Network: 192.168.0.0

First IP: 192.168.0.1

Last IP: 192.168.0.254

Broadcast: 192.168.0.255



So if you set the Router B to same network.. It gets the same Details.



DHCP range is IRRELEVANT... it just a Range of IP's your Servers dishes out... it can be all or some... or one... Irrelevant... any IP Address with a correct IP not conflicting will work regardless of DHCP or its range.



Don't use the same Network Numbers...

You Bridge networks of different numbers TOGETHER... they don't have to share the same Network Number.



You Don't Set the IP of a Router (LAN)... it sets itself or get one from a Different DHCP Server if you disable its own.



A router is a LAN... a LAN is a Router... Routers create LANs which are very important to know as you Can't have two of the same LANS on the same Network...
Richard
2015-02-11 11:53:11 UTC
You cannot have the more than one DHCP service running on a network segment. When a computer sends out a request for its addresses to be set up then both routers' DHCP services will reply with addresses from their own ranges. However, there is no guarantee as to the order the various parts of the replies from the two DHCP services will arrive at the client computer. It might get the gateway address from one DHCP service and its IP address from the other service. This sounds as though this is your problem.



Try disabling the DHCP service on one router, and using the full 192.168.1.100 to 192.168.1.199 as the DHCP address range on the other router. Only that one router will provide connection to an external network.



If the two routers are connected to two different ISP connections, and you want to split the computers to use the two connections, then you will have to set up a separate single DHCP service running on a separate computer that can handle allocating addresses for two separate routers. The DHCP service in both routers will have to be disabled. I have used a computer based DHCP service in place of the service from a router; but I do not know of any DHCP programs that handle more than one router.



An alternative is to allocate static addresses to each computer. With static addresses, each computer will always connect through the same router. You should still be able to network between computers that are using different routers for their Internet access.



Remember the rule - "Only one DHCP service on a network segment".



I hope this helps.
Bostonian In MO
2015-02-11 08:12:11 UTC
Basically it means that whoever set up your wireless network is clueless. To extend the WiFi range using SOHO class routers requires that one be set up as the gateway device (Router A) running DHCP and the other is set up as a wireless repeater (Router B).



Router B is not physically connected to the network at all but is placed where it can get a reasonably useful signal from Router A. You assign a static IP address outside of the DHCP range on the inside interface on Router B. This is used ONLY for management and configuration purposes. You set the same SSID on both routers and set the repeater option for Router B. You set Router A's IP address as the default gateway for Router B. You do NOT enable DHCP on Router B.



RTFM for vendor-specific instructions on how to set it up..
Adrian
2015-02-11 09:35:30 UTC
You cannot have two routers connected as "routers" with the same subnet. The routing tables will get corrupted, it will not work properly.

Your network is not configured properly in general.

Also, default gateway, in 99% of the cases, is the router you are connected to, nothing else. Only the router you connect to can forward packets to the next segment. Thus it has to be your gateway...


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...