PDA

View Full Version : Using 2 routers on one lan



hueybot3000
16-03-2011, 12:59 PM
So I have the following...

Linksys WRT54ZGL running tomato v1.27 and a Dlink modem/router combo.

What I want to do is run the dlink only as a modem and the linksys for everything else. How would I go about doing this? I've had a play and researched a bit but its way over my head.

Cheers

hueybot3000
16-03-2011, 07:02 PM
Anyone?

gcarmich
16-03-2011, 07:30 PM
Why not just buy a cheap network switch. Will cause you a lot less configuration issues and will be easier to diagnose issues in the future.

Sorry, correction. I suspect the WRT54ZGL is wireless. Make sure they are both using different DHCP address ranges, set the WAN port on the WRT to use a DHCP address, plug the Dlink into the WAN port and off you go.

There are other ways to do this but I suspect thats probably going to be the easiest for you. Just be aware you may run into double NAT issues.

hueybot3000
16-03-2011, 07:35 PM
Because I want the linksys cos its decent, and it has wireless. the dlink is only needed as a modem, I dont have a modem on its own, only built in to the router

fred_fish
16-03-2011, 08:44 PM
Set up the Dlink in half-bridge mode. (i.e it does the authentication and terminates the ppp connection but passes all traffic to the Linksys for routing). Not sure if that's what Dlink call it, but should be fairly obvious.
Turn off the DHCP server on the Dlink (not strictly necessary but it is superfluous).
Set a static ip on the Linksys WAN port with the Dlink address as the gateway.
Set it up to handle firewalling and LAN IP assignment as required.
Bob is your mothers brother.

linw
17-03-2011, 10:03 AM
I found this a good while ago. Unfortunately, the web site is dead, hence this long post.

Hope it is helpful.

HQH's Resources Logo
Location: Editorials > How To Connect & Use Linksys & D-Link Routers Together

mywebpages.comcast.net/hqh/html/tworouters.htm

Author: HQH
Released: March 12, 2004
Updated: N/A


Cascading Routers
At first, my home network had only one router to begin with. It was the Linksys EtherFast Cable/DSL Router BEFSR41 (version 1). But then my home network decided to grow and needed to include an additional router, except that this router was a wireless router. I had to welcome D-Link AirPlus Xtreme G High-Speed 2.4GHz (802.11g) Wireless 108Mbps Router (revision C1). I mainly use D-Link DI-624 wireless router as an access point rather than being the main router. So, I had to somehow connect it to my existing network so that I don't have two different networks with two routers directing them. So how will it be done?

We will be cascading the routers and do some configuration changes so that it is possible to have two routers working together and form one network instead of two separate network entities. In order to do this, we need to have at least two routers. If there are more than two routers in your home network, the second and onwards will follow the same procedures while the 1st and main router will have its own procedures. To make a quick note, you can basically cascade any brand name routers, so this guide is not limited to just Linksys and D-Link routers. So let's begin.

Step 1: Primary Vs. Secondary Routers
Between the two or more routers that you have, the primary router should be the router that you want to be the first in line of defense. This router will be doing the most grunt work, e.g. firewall, filtering, port forwarding, etc... The primary router will basically be the main router controlling all your Internet accessing rules and your entire home network. Usually, the primary router is the router that is the best of the two (or more). But being the best doesn't always mean the fastest at handling all the network load.

My example of this are my two routers that I own: Linksys BEFSR41 and D-Link DI-624. D-Link DI-624 is what I would consider the best, as it has more features than the Linksys BEFSR41. But being the best has its consequences. The D-Link DI-624 is a wireless router. My home network is consisted of wireless and wired computers (5 total). I can't have the DI-624 handle the wireless and the wired portion of the network and do all the network filtering at the same time. That will slow down my network as the load is too much on the router. This was evident as I tried to do away with the Linksys BEFSR41 but found that the network speed wasn't up to its fast standards when D-Link DI-624 was the only router.

Secondary routers don't need much explaining to them. It's the router that won't be the primary one. Intuitive isn't it? The secondary router can be a wireless router or another wired router extending your network.

So either you pick a router based on either your own personal views or based on performance vs. quality. I chose the performance vs. quality path, and I wanted performance (network speed) rather than quality (network features).

Before you begin, do not connect your routers together already, as some settings may conflict and render your routers unaccessible. Keep them apart for now and connect to them seperately to configure them.

Step 2: Primary Router Setup
Your primary router should be the only one (ideally) handling the following: firewall rules, filtering, port forwarding, logging, and DHCP. Like I said, the primary router is going to do a lot of the grunt work. There isn't much setup involved, but one important thing is to have the primary router to be the one issuing DHCP. It's best to have DHCP enabled on the primary router for simplistic management. If your secondary router was your main router, transfer any configurations that can be used and compatible on the primary router (e.g. ISP configurations, port forwarding, filters, etc...).

One final step: Pick a single block of IP address range for your internal network (especially if each routers used different IP blocks) to use. For example, BEFSR41 uses 192.168.1.xxx, D-624 uses 192.168.0.xxx. They need to be on the same first through third octets (192 is the first, 168 is the second, third is the one with either a 1 or 0 in my example). So I had to either pick a 0 or a 1. I opted to go with a 1, so I used 192.168.1.xxx range. This is important for simplifying your file sharing and making computers' resources accessible to others on your internal network to be easily managed. So with that IP block range, you need to modify your primary router's LAN IP address (the IP that you use to connect to the router on your internal network). Usually, the primary router's IP would be the number 1 on the network, so it'll be 192.168.1.1, which is what I'll set mine to.

If you don't pick a common IP block, you're only asking for trouble if you later on want to share files and resources. So use a common IP block range to simplify things and save yourself some headache. That's all for configuring your primary router.

Step 3: Secondary Router Setup
Your secondary router should have most of its primary router functions disabled (e.g. DHCP, ISP configurations, port forwarding, etc...). Filtering on the other hand, if you have a wireless router like me, and use MAC filtering for the wireless portion to block unwanted eavesdroppers, leave it on. But make sure that you add the primary router's LAN MAC address (found somewhere on your primary router's configuration screen). This is to make sure that the primary router can communicate fully with your secondary router without being blocked partially. If you have a wired router, filtering should be disabled and should be handled on your primary router. Now to the important parts.

At your WAN configuration screen (the part where you would set it to ISP settings to allow the router to pull an IP address), set your WAN setting to "static IP address" and enter in the following settings:

IP Address: 127.0.0.1
Subnet Mask: 255.0.0.0
ISP Gateway Address: 127.0.0.2
Primary DNS Address: 127.0.0.3
Secondary DNS Address (usually optional): 127.0.0.4

If you guessed it, configuring the WAN settings above is so that you can make the WAN as useless as possible, as it basically has no use in your crusade to cascading routers. The router will think that its main communication will be through the WAN port, so you must render it as useless as you can. With the above settings, it will render it useless and safely make the WAN request less acknowledgments of an Internet connection (which technically your secondary router shouldn't be directly connected to, its your primary router that is suppose to).

Now, for your LAN configuration screen, you need to give your secondary router's LAN IP address to connect to (the IP that you use to connect to the router on your internal network). Continuing on with my example, my secondary router's IP address would be 192.168.1.2, an increment up from my primary router's IP address (192.168.1.1). 192.168.1.2 will now be the address to connect to your secondary router.

Now for the physical setting. Run a CAT5 (or whatever cable you're using) from a LAN port from your secondary router over to the primary router's LAN port. Do not use your secondary router's WAN port. There are other ways of running the cable from secondary to primary router: secondary's uplink port to primary's LAN port; secondary's LAN port to primary's uplink port. They all work the same if secondary LAN port to primary LAN port won't work (e.g. router doesn't have ability to autodetect cable's usage).

Your secondary router has basically transformed from a router to a switch (or access point). For more than two routers, repeat the same steps above, except to give your router's IP address one IP address increment higher from the secondary router (e.g. 192.168.1.3).

Step 4: You're Done
That's all to it. You're finished. Enjoy your cascaded routers. You are one step further for network domination.

--------------------------------------------------------------------

hueybot3000
17-03-2011, 10:24 AM
Thanks for the info guys, will have a crack at it sometime today and let you know how I go