How to configure 2 subnets on same LAN and communicate between devices

My setup is I have my primary cable modem/router at one end of the house with IP 192.168.0.1/25. Then I have a secondary router at the other end of the house with IP 192.168.0.129/25. The WAN port of the secondary router is connected to a LAN ports on the primary router. Both routers have a variety of devices connected to them via WiFi and ethernet, all of which have no trouble connected to the internet; the issue is getting them to connect to each other. Currently, each device can only "see" others connected to the same router.

My question is, how do I get these devices to behave as if they were on the same LAN? The functionally I am looking for is being able to print/chromecast/fileshare to/from any devices connected to either router.

I suspect I need to set up port forwarding or something on one or both of the routers, but I'm not sure the correct way to configure this.

6

2 Answers

Since you apparently don’t really require the separation into two networks, your goal should be to undo that. It’s great that both routers are connected using Ethernet!

Stuff that relies on broadcast or local multicast like Chromecast cannot work across network boundaries, even without NAT.

You indicate your second router causes connection issues when using the “official” bridged mode. Using the following guide, you won’t have to use it:

  1. Disconnect the second router
  2. Reset it (just be sure)
  3. Change its IP address to 192.168.0.2 (or some other free address in the 192.168.0.0/24 network)
  4. Set up the WiFi network as desired (probably the same as your other router to allow roaming)
  5. Disable DHCP
  6. Connect a LAN port of your second router to a LAN port of the primary router

And that’s it! All other setup on your second router is irrelevant.

You should also change your primary router back to a regular /24 subnet configuration.

You will then have a single network and all services will work as expected. If your second router works fine now it will continue to work perfectly fine.

If you can access the routers gateway/routing table you can add corresponding entries in your routing table.

on this router 192.168.0.1/25 add 192.168.0.129/25

and vice versa.

in linux

ip route add 192.168.0.1/25 via 192.168.0.1 dev eth0

Windows

route ADD destination_network MASK subnet_mask gateway_ip metric_cost

route ADD 192.168.0.1 MASK 255.255.255.128 192.168.0.129
4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like