how to set up subnetwork at home?

8,762

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.

Share:
8,762

Related videos on Youtube

Vincent Duprez
Author by

Vincent Duprez

I'm freelance Web developper always trying out new techniques and technologies. Im teaching myself c++ at the moment to develop more targeted and niched web applications and services. Love to teach people how to create something. SOreadytohelp

Updated on September 18, 2022

Comments

  • Vincent Duprez
    Vincent Duprez over 1 year

    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?

    • Paulo Gonçalves
      Paulo Gonçalves over 8 years
      Your networks look good, but you don't show your routing tables. For it to work you must configure the routing on you 0.1 and 1.1 routers.
    • root
      root over 8 years
      Yes, this addressing schema works. If you're able to get to a router, but not beyond it, you must implement a routing protocol (possibly static routes for this home setup).
    • acejavelin
      acejavelin over 8 years
      What are you using for routers, commercial/enterprise grade where you can actually manipulate routing tables, or SOHO/home type routers like D-Link/Asus/Netgear/TP-link? The answer could very a lot based on the equipment, but in general to do what your trying to do will require manual manipulation of routing tables