Setting up DHCP in Two Linksys Routers

Status
Not open for further replies.

lavans4u

Contributor
I have two linksys WRT54G which is connected to switch

48480068.jpg


I want to enable DHCP in two routers for internet and file sharing.

Right now i am manually configuring the static IP in the connected PC\laptop.

How to configure the DHCP server such that it assigns the IP addresses in the following format!

86106817.jpg


My Current Setup

2ndg.jpg
 
simple.. change the router IP to 192.168.1.1 so that automatically becomes the gateway for your PC. and just type in the static DNS if you dont want the router to fetch one from the ISP everytime.
 
Which device is using the IP 192.168.1.1?

If that is your DSL Router or something, disable the DHCP servers on both your Linksys routers and enable the DHCP server on your DSL Router alone.
 
two active dhcp server on same physical network can cause undesired results.

There are some and that needs to be answered before properly giving a solution.

* why are you employing two routers. Are they both connected to different internet modems ?

*There is no point in using two routers if you don't need two IP ranges to be used similtaneously, orelse one should be a load balancing router if load is too much for a single one, but IFAIK WRT54G doesn't support load balancing.

*You can use two dhcp, provided, their scope doesn't co-inside(will run into problem at some point of time) and you are assigning dhcp reservation using MAC addresses.

* You can use the second router as a dhcp forwarder if needed badly which merely forwards the scope of the first router.

* And you don't need to provide ISP's DNS as you primary dns as your router has built-in dns server and there are inbuilt dns forwarders which will foreward external dns requests for public fqdn/url to the isp's dns which is obtained via their dhcp lease.

* Selling off both G router for a better N router will give you lot more performance. You can even go in for gigabit routers, if you are routing between LANS and need gigabit speed.
 
simple.. change the router IP to 192.168.1.1 so that automatically becomes the gateway for your PC. and just type in the static DNS if you dont want the router to fetch one from the ISP everytime.

Which device is using the IP 192.168.1.1?

If that is your DSL Router or something, disable the DHCP servers on both your Linksys routers and enable the DHCP server on your DSL Router alone.

ooops .. sorry .. i didnt properly see your diagram above.. you have 192.168.1.1 on your switch..
<
  • I am using a Leased line internet connection which is directly connected to the switch.
  • 192.168.1.1 is the ISP firepro router IP

two active dhcp server on same physical network can cause undesired results.

There are some and that needs to be answered before properly giving a solution.

* why are you employing two routers. Are they both connected to different internet modems ?

*There is no point in using two routers if you don't need two IP ranges to be used similtaneously, orelse one should be a load balancing router if load is too much for a single one, but IFAIK WRT54G doesn't support load balancing.

*You can use two dhcp, provided, their scope doesn't co-inside(will run into problem at some point of time) and you are assigning dhcp reservation using MAC addresses.

* You can use the second router as a dhcp forwarder if needed badly which merely forwards the scope of the first router.

* And you don't need to provide ISP's DNS as you primary dns as your router has built-in dns server and there are inbuilt dns forwarders which will foreward external dns requests for public fqdn/url to the isp's dns which is obtained via their dhcp lease.

* Selling off both G router for a better N router will give you lot more performance. You can even go in for gigabit routers, if you are routing between LANS and need gigabit speed.

  • Its a two floor network.This is the reason I am using two routers!
 
To have the DHCP servers of these routers issue a default gateway address of 192.168.1.1 when their IPs are 192.168.1.4 and 192.168.1.5 is not a capability that exists in the stock firmware. You'll need a third-party firmware like DD-WRT. Looking at the screenshot, your WRT54G is a v7 or a v7.2, right? If it's a v7, there's no DD-WRT support for it. If it's 7.2, it's possible. The DHCP forwarding feature is also not available in the stock firmware.

If you can get DD-WRT running on them, you can set both routers with different DHCP ranges. For example, the first router with a range of 192.168.1.100-149 and the second with 192.168.1.200-249 and configure both routers to give out 192.168.1.1 as the default gateway. Or you could just configure both as DHCP forwarders.

A simpler option if you don't want to take the trouble of flashing custom firmwares is to just disable the DHCP servers on both routers and let the ISP's router handle everything.
 
^ If the main connection is connected to the WAN port of one of the routers, set a static IP which matches with current setup for the wan, change internal IP range to 10.x.x.x or something, disable the DHCP server on the other router won't it work?

#Edrill

Or just simply enable the DHCP server on the ISP router and disable DHCP server on the other two routers as Edrill said. The ISP router does have the DHCP server function right?
 
#lavans4u : What #Edrill said is correct.

However this should work in theory.

If your ISP switch is this one http://www.fireprowi...reless-lan.html then it has already DHCP server capability.

If that is the case then enable DHCP server on switch with start IP as 192.168.1.200 and static DNS servers as in your screenshot.

Now on your both routers disable DHCP and configure clients to get IP from DHCP.

Since none of the routers provide DHCP request should be broadcast and switch's DHCP server should respond.

Give it a try and let us know how it goes. Also mention some more info about your switch like model number etc

EDIT: Also check if official firmware update available for your routers. Newer firmware may have "DHCP Relay" functionality.
 
#varkey: Since his diagram shows both the routers and the switch on the same subnet, it's unlikely that the switch is connected to the WAN ports of the routers. If he were to connect it to the WAN port, there'd be two separate networks and sharing files wouldn't be easily accomplished, which is something he has mentioned he wants in the first post.

#kekerode: Unfortunately, the latest official firmware for the WRT54G v7/7.2 doesn't have the DHCP Relay feature. Considering the fact that this model has been EOL for a while now, it's unlikely that it ever will get it in an official firmware.
 
#Edrill : What I was suggesting was to connect the main cable from the ISP Router to the WAN port of one of the router instead of the switch. So that he can maintain a different but same subnet in his local network.

Anyway all this is not needed if the DHCP server on the ISP router can be enabled.
 
So I decided ti replace the two routers with a powerfull single router

please suggest some models below 6k!!

It should be able to manage the two floors!!!
 
even my DLink Wireless N 150 and Belkin N 300 router is able to easily able to manage 2 floors.. most of the N band routers from reputed companies like DLink, Linksys, Cisco etc etc. (Linksys brand of cisco) in the market can easily manage 2 floors. Its more about the proper and strategic placement of the router in a central place in the house like near the stairway.. this way the range of the router, covers the entire radius around it covering the whole house.. if you put your router in one corner of your home, half of the range will be wasted outside the house perimeter and infact start giving wireless network ranges to neighbours..

you dont need to spend 6K for a router to be able to manage 2 floors.. my DLink router has been placed near the stairway on the 1st floor, this way it covers the entire ground floor, first floor, second floor terrace and also the third floor terrace.
 
Status
Not open for further replies.