How to connect 2 home routers to connect 2 separate networks?

Nero666

Reputable
May 22, 2014
14
0
4,510
I don't know if it's a silly question, but I'm not very good at networking. So please help me out.

I have a Netgear WNDR4500, and I configured my PCs and virtual machines setting the WNDR4500 (192.168.1.1) as their default gateway. Recently I bought a Netgear R6300, and I'm thinking to put this router (192.168.2.1) as the default gateway of some PCs and VMs. So, I'll be having two different networks, right?

Both routers have 1 WAN port and 4 LAN ports, and I have my broadband connection in the WAN port of the first one. Now I want these two networks to be connected so that the PCs in one network can communicate with the PCs in the other network. So, how do I connect the two routers to make this happen?
 
Solution
You basically can't do what you want to do with a consumer "router". These devices can only take a single vlan and translate the ip to a single WAN ip address.

So you could just connect the second router wan port to the first router lan port and let it get a wan address on the 192.168.1.x network. The machines behind this second router could initiate contact to machine in the 192.168.1.x network but because all the machines in the second network appear to come from a single IP address none of the machine in the 192.168.1.x network can cause intial session for the same reason you can't get to a machine from the internet without port mapping.

To really have 2 networks you need real routers. You could I suppose load dd-wrt on both...
If you configure the 2nd router to be an access point only (the IP address should be set to 192.168.1.2 - the primary router should be 192.168.1.1). There will only be 1 default gateway for the entire network - and only 1 DHCP server. You should reserve the IP address for the 2nd router in the primary router so that it doesn't use that ip address anywhere else. You run a cable from the LAN port in one router to the LAN port in the 2nd router.

This will allow you to connect to either router, and see the entire network.
 


I think you didn't quite get my point. Creating 2 separate (but connected) networks is the whole idea.
 


Internet connection to the 2nd network is the least of my headache. May be the 2nd network will have no Internet access, or something I'll try to figure out later. Right now my concern is to connect the two router so that I can have two separate but connected networks, and the machines in one network can communicate with the machines in the other network.
 
If your networks are separate, the computers won't be able to communicate with each other. By going from the LAN port on router #1 and going to the WAN port on router #2, you are isolating anything connected on the 2nd router from the first router.

This setup is what is known as a DMZ (demilitarized zone) to separate off network configurations (for example - a test lab) and not have any effect on the other LAN.
 
You should use a switch and use vlans to segment the network, this will allow you to split the network but still have the computers to be able to communicate with each other. If you are trying to do labs and learn networking download GNS3 it is very powerful, you can run servers, routers, switching anything you need to learn.
 
You basically can't do what you want to do with a consumer "router". These devices can only take a single vlan and translate the ip to a single WAN ip address.

So you could just connect the second router wan port to the first router lan port and let it get a wan address on the 192.168.1.x network. The machines behind this second router could initiate contact to machine in the 192.168.1.x network but because all the machines in the second network appear to come from a single IP address none of the machine in the 192.168.1.x network can cause intial session for the same reason you can't get to a machine from the internet without port mapping.

To really have 2 networks you need real routers. You could I suppose load dd-wrt on both your routers. You would still plug them in the same way and assign the addresses the same way. The change would be that the second router would not nat the IP. You first router would have a static route indicating that the 192.168.2.0/24 network was behind the second routers 192.168.1.x ip address. You would also have to change the settings in the first router to also nat the 192.168.2.x ip addresses as well as the 192.168.1.x addresses if you want internet access.

DD-wrt is pretty easy to get the firmware flashed if you closely follow the instructions. Configuration tends to be another story. It is has some gui but most the advanced stuff requires you to learn how to edit the underling configuration files since this is based on a unix router. If you dig long enough there are documents that show you how to do pretty much anything but like any free software it is not organized all that well.
 
Solution

I guessed something like this 🙁


If I get u correct, you are suggesting Cascading, right?


So, with these consumer routers, and not flashing the firmware, the best I can get is, two cascading networks? Can you mention names of some real routers? I just want to dig a bit how they really works. Thanks.
 
The better known commercial routers like cisco or juniper are your best bet. As suggested in the previous post GNS3 is a good simulator or you can try packet tracer which is somewhat more limited but a little easier to get started with. If it is just for learning the simulators are more than good enough.

The thing you will find is what you want to do is actually trivially easy on a commercial router/switch.