I'm hoping someone can help me, because this issue has been irritating me for quite some time now. I have two routers, one wireless (Linksys WRT54GS), and the other, a SonicWall Security Appliance TZ170SP. I have computers (wireless/wired) that connect to both of the routers, as well as, a wired network printer that connects to the wireless router. The SonicWall (wired router) is connected to the Internet via a cable modem.

I would like to establish bi-directional communication between the two routers, while maintaining two separate networks, on two separate subnets. I have read many posts regarding similar situations, which all seem to advise connecting the LAN port of one router to the LAN port of the other router (not the WAN port on the second router). When I do this, I lose my internet connection on the wireless router. Most of these scenarios also involve simulating a switched environment on the second router, which would eliminate the possibility of having two separate networks.

Similar scenarios to what I'm trying to accomplish are setup in virtually every enterprise environment. I'm not sure if the fact that I'm using a SOHO (Linksys) router precludes the possibility of accomplishing my goal.

I have setup a website, http://www.interwerks.net/routing that maps out my environment in detail. On this website, you will find screenshots of the various pages of the Management Interfaces that I believe would apply to troubleshooting this issue. I have also included more details about what I am trying to accomplish. The site is resident in a password-protected directory. Please use the following credentials to access this resource.

Username: anon
Password: l3tm31n

Thanks in advance to anyone that attempts to assist me with this. Your help is much appreciated. Regardless of whether or not you can help me resolve this issue, I appreciate the input.


7 Years
Discussion Span
Last Post by RTFMID10T

Can't get to your web site.. WHat you want to do should work fine. Let's define some givens, first:

The SonicWall router has two interfaces - lets call them LAN-1 (L1) and WAN-1 (W1).
The WRT54G routers two interfaces - lets call them LAN-2 (L2) and WAN-2 (W2).
The first LAN subnet will be / 24.
The second LAN subnet will be /24.
(Change these as appropriate, but be consistent)

The SonicWall W interface is connected to the Internet and likely has a DHCP assigned address - we don't really care, so long as that interface has the default gateway.

Manually configure the SonicWall as follows:
Interface L1 should have a static address - let's use, for the netmask, and no gateway.
Create a static route for the LAN-2 address range, forwarding to the WRT54G - ROUTE: (network) (netmask) (gateway)
Configure DHCP server for LAN-1 using, mask, and gateway You'll neeed to configure DNS as appropriate.

Manually configure the WRT54G as follows:
Interface W2 should be physically connected to LAN 1 and assigned a static configuration. Use for the address, for the netmask, and for the gateway.
Interface L2 should be assigned a static address - use, netmask of, and no gateway.
Configure DHCP server for LAN-2 using, mask, and gateway You'll neeed to configure DNS as appropriate.

The addresses for DHCP provide a range of 64 addresses on each LAN segment - adjust as needed for your needs. This is just an example to illustrate the settings for each network.

The LAN layout is:

Users in LAN-1 will use L1 as their gateway. Traffic to LAN-2 will hit the SonicWall and be forwarded back to W2 on the WRT54G and delivered via the L2 interface. Users on LAN-2 will use L2 as their gateway. Traffic to LAN-1 will hit the WRT54G and be delivered via the W2 interface. Traffic to the Internet will be forwarded to L1 and routed to the W1 interface on the SonicWall. You should now be able to connect to either LAN-1 or LAN-2 and ping addresses on the other network, as well as connect to the Internet.



Thanks Glenn. That configuration mirrors my current config with the exception of the subnets. According to SonicWall, the two networks need to be on different subnets and have different netmasks. Again, according to SonicWall, the L1 should have a netmask of and L2 should have a netmask of

What are the implications of using two different netmasks like that? Are there advantages? Disadvantages? Any additional information you could provide would be appreciated.



Additionally, if you encountered an authentication error while attempting to access the website, please try again. Unfortunately, htaccess authentication can be somewhat buggy. It will report an invalid username/password in instances where the correct credentials were supplied. Usually, access is allowed on the second attempt. I'm not sure why it works this way, but nonetheless, persistence is key. I'm sorry for any difficulties you encountered.



It's not about advantage or disadvantage, it's about what will work!

If one network's subnet is and the other is, unless you're using a Class A network (10.x.x.x), your networks will overlap. When that happens, the smaller network will forward packets to the router (gateway) to get off the network, but the recipient on the larger network will not forward to the router - they assume that the destination is in the local network.

Set both netmasks to /24 ( Larger netmasks are rarely used in LANs, and are often used to describe large LANs that consist of many smaller networks.

If you're not comfortable with subnetting, download the netmask calculation spreadsheet from my web site. I hand it out when I teach network fundamentals. http://www.innotechcg.com/downloads/netmask.zip - It not only has a calculation page, but has a "Use your brain" page that illustrates a couple of simple formulas using the Network Magic Number (256) that can help determine mask, # subnets, # hosts, etc.



I have two networks , each working independently.
First one has its modem, router, connected to intenet, has DHCP server, and works in the range of with subnet mask on, has 20 clients, dhcp range is to

Second one has its own modem, router, connected to intenet, has DHCP server, and works in the range of with subnet mask on, has 20 clients, dhcp range is to

Both the routers are connected physically to a network switch (un managed) by LAN CAT 5 wire.
The problem is, I have network printers, installed on the switch (dlink, 8 port unmanaged), with printers having IPs in the range of to I want the users from second network to be able to use network printer installed logically on first network but physically on the switch.

I know I need to configure both routers in that case for static route. I am not sure what the setting should be.

Both networks use DSL-2640U (wifi + modem + router) router.

Any help would be highly appriciated. Thanks


when i ask a question and want to get an asnwer, I like quick to the point. easy answer to get your wireless as access point, turn off dchp on the wireless router WRT54G and plug a port from the Sonicwall to one of the LAN ports on the linksys. this makes the Linksys into just an access point.

To get what you are wanting is just as simple to seperate wireless from wired. Use Linksys for wireless and make the WAN pull dhcp and plug the wan into a port on the Sonicwall granted you only have one internet connection. it will filter through the sonicwall at that point and pull an ip to "get internet" so to speak. there are many variations you can use and with different equipment can make it much more complex network but more secure.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.