home network with two routers but with one subnet
When we moved to our new home, we had just one router. However, the wifi was very weak at places that were far from the router. So I added a second router that was another wifi spot with a different SSID. It was good, because we had strong wifi connection everywhere. Today I had the idea to set up NFS (network file system) and thus I could access all the movies on my main machine. However, I ran into a problem. As it turned out, I had two subnets at home: each router had its own subnet, and I didn’t manage to link two computers with NFS in different subnets. I made some study and actually you can create one subnet with two routers and the two routers can have the same SSID. Below I present the two approaches.
From now on, I will use the following terms. The router that receives internet in its WAN port is the “primary router”. The other router that is connected to it via a network cable is the “secondary router”.
(1) Old way: two routers, two subnets, two different SSIDs
This method was also good, the secondary router shared Internet (wired and wireless). However, it created a different subnet.
The IP address of my primary router was 192.168.0.1 . A network cable connected it to the secondary router, and this cable went into the WAN port of the secondary router. The default IP of the secondary router was 192.168.1.1 . The secondary router also had DHCP, and all machines connected to the secondary router had Internet. Machines connected to the primary router received an IP address of the form 192.168.0.* , while the secondary router distributed addresses of the form 192.168.1.* . It resulted in two different subnets. Both routers had DHCP enabled. Wifi was enabled on the secondary router too and it had a different SSID. Thus at home we had two different wifi networks with two different SSIDs.
It worked well until I wanted to have NFS…
(2) New way: two routers, one subnet, one SSID
I found the solution here. A big thanks to Scott Hanselman because following his blog post I could set up my home network correctly.
Here I just want to sum up the steps for future references.
The primary router is OK. Its IP is 192.168.0.1 and it has DHCP enabled. In the DHCP settings make sure that the distributed IP addresses start with at least 192.168.0.3 . Why? Because we will want to set the IP of the secondary router to be 192.168.0.2 . In my router the starting IP address was 192.168.0.10, so I left it like that. Wifi is configured.
As the secondary router will also have wifi, set different channels in the routers. The channels should be far from one another. For instance channels 6 and 11 are good. So in the primary router set the channel to be 11.
Now switch off the primary router. We want to modify the IP of the secondary router but if the primary is running (and they are connected), then you can’t modify the secondary. So, the primary is switched off. Log in to the web interface of the secondary (in my case its IP was 192.168.1.1) and modify its IP address to be 192.168.0.2 . Save it and visit the new address, 192.168.0.2 . In the secondary router disable the DHCP server. It has nothing to do with IP addresses; the primary router will distribute the IPs in our whole network. Enable the wifi and set the same as in the primary router: same SSID, same authentication method, same encryption, same password, etc. However, set the channel to be 6 for instance (it should be different from the primary router’s channel). Save everything.
The network cable comes out of a LAN port in the primary router and goes in to a LAN port of the secondary router. Warning! This time we use the LAN port on the secondary router, while in the previous method it was the WAN port! Switch on both routers, and the network should work with the secondary router too.