2 Routers & Secure Shared Internet

I want to share an internet connection but have two separate LANs so computers from one LAN can't access shared files on computers on the other LAN, i.e.

/-->LAN1 Modem-->Router1-- \\-->Router2-->LAN2

Both LANs will have static and dynamic IP addresses.

Router1 has the following setup: Router Address: 192.168.1.254 Subnet Mask: 255.255.255.0 DHCP Range: 192.168.1.64 - 253 Default Gateway: 192.168.1.254

Router2 is currently setup like this: Router Address: 172.168.1.1 Subnet Mask: 255.255.255.0 DHCP Range: 172.168.1.100 - 149 Default Gateway: 172.168.1.1

Router1 and Router2 are connected together with a CAT5 cable using a LAN (not WAN) port on each side.

However, I can't access the internet from a computer connected to LAN2. How do I setup Router 2 correctly? If it matters it's a Linksys WRT54GC.

Thanks

Reply to
hufaunder
Loading thread data ...

The non gateway/second router must be converted to be a switch and not a router, by disabling the DHCP server on the second router.

Then the router that is now a switch, will be configured to use an IP, subnet mask, and gateway IP on the gateway router, which the IP should not be a DHCP IP on the gateway router but a static. Then the machines on the gateway router and the now the router converted to be a switch can see each other.

It doesn't make a difference if the two routers are wire, wireless or one is wire and one is wireless.

Reply to
Mr. Arnold

Thanks for the reply. However, my goal is to have two separate networks, i.e. the computers on LAN1 don't see the computers on LAN2 and visa versa. A switch won't do that. I would need at least a bridge, I think.

So with the above scenario I think I need DHCP on both router boxes, router1 will automatically give IP addresses to the computers connected on LAN1 and router2 will automatically give IP addresses to computers connected to LAN2.

Note that on router two I see two DHCP configurations. One is InternetSetup->Internet Connection Type->DHCP/Static/PPPoE/PPTP. The other one is under Network Setup->DHCP Server Settings->DHCP Server enabled/disabled.

The problem is that I have router2 connected to router1 using a LAN port on each side. So router1 tries to assign IP addresses for devices on the switch of router2 and visa versa. So how do I avoid that conflict but still allow automatic assignment of IP addresses both on LAN1 and LAN2?

Thanks

Reply to
hufaunder

By doing this the devices on LAN2 will be double NAT routed.

Devices on LAN2 could see everything on LAN1. Devices on LAN1 would not be able to see anything on LAN2

What are you really trying to do?

The easier solution would be to get a 2nd external IP address from your ISP and set them up through a switch:

Modem | [switch] | | | +---[router1]----LAN1 +------[router2]----LAN2

Each router having it's own external IP address. Not usually all that much more per month.

Otherwise you'd be better served adding a THIRD router and putting it in place of the above [switch] device. Then configure the router1 and router2 devices as routers, not gateways. That way the 3rd router will act as a gateway for both of them.

Doing this way will be easier to configure/maintain when using consumer-grade devices like the linksys. Doing this with more sophisticated office-grade devices would be different, but more expensive.

-Bill Kearney

Reply to
Bill Kearney

It probably matters. You're in luck.

No. Connect Router2 WAN to a Router1 LAN port with a crossover cable. If Router1 has an "Uplink" port you can use a regular cable from that to Router2 WAN but that consumes the adjacent LAN port on Router1. (If the routers have MDI/MDIX ports you can use any cable, but I don't think the Linksys routers do that.)

Next, set Router2 to "router" mode as opposed to "gateway" mode. Set the WAN parameters manually on Router2. address 192.168.1.10 (on Router1's LAN range but out of DHCP range) subnet 255.255.255.0 default gateway 192.168.1.254 (Router1 as seen from its LAN)

You probably need a static route on Router1, destination LAN 172.168.1.0 netmask 255.255.255.0 gateway 192.168.1.10 (Router2 as seen from its WAN port) interface LAN

You mentioned in another post that you *don't* want LAN1 to see computers on LAN2. That's unusual, but you can do this by a firewall rule (maybe "filters" on the menus). Have LAN2 drop anything from 192.168.1.0/24 so that only packets with an external Internet address come through.

Good luck.

Reply to
Pierre Asselin

I usually manage to make a mess of the firewall rules. For DD-WRT, I suggest Firewall Builder:

(38 unreadable slides

Reply to
Jeff Liebermann

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.