Networking – how to set up subnetwork at home

networkingroutersubnetwireless-router

I'm trying to achieve something that, I believed would have been very simple to set up, but I'm struggling at making this work.

Basically, I have a ISP router with an internet connection, from there, there is another router linked to the first one, this link is quite long and goes from one house to another house (long story short: 5km between 2 houses, linked with 5Ghz 100mbps antennas)

Once at the other house, there is the main router and 3 sub routers at 3 different points of the property. linked (wired) to the main router.

I do get internet on all routers, but I don't have access to other computers on the other networks,. I tried setting the main router (0.1) subnet mask to 255.255.0.0 but this does't help. I think I misunderstood the subnet mask or misunderstood where (what router) this subnet mask should reside..

I made a simple plan to make this clearer..

lan schema

Is this supposed to work? I'd like to keep different ip addresses 0.1, 1.1, 2.1, … to easily identify what router is linked to the ip address. and not having one main DHCP router.

Any idea how this is supposed to work?

Best Answer

First you must give static IP's to the WAN side of your routers. Then in the ISP router you must define routes to the other networks.

route add -net 192.168.0.0/24 gw <static WAN IP of router 192.168.0.1>
route add -net 192.168.2.0/24 gw <static WAN IP of router 192.168.2.1>
route add -net 192.168.3.0/24 gw <static WAN IP of router 192.168.3.1>
route add -net 192.168.4.0/24 gw <static WAN IP of router 192.168.4.1>

And in your router 192.168.0.1:

route add -net 192.168.2.0/24 gw <static WAN IP of router 192.168.2.1>
route add -net 192.168.3.0/24 gw <static WAN IP of router 192.168.3.1>
route add -net 192.168.4.0/24 gw <static WAN IP of router 192.168.4.1>

The commands are for linux, you should use the route command for your devices.

Related Question