2

I have a LAN in the following configuration:

  • 192.168.1.1: Modem
  • 192.168.1.2: Router
  • 192.168.1.3 and on: Computers

Router 192.168.1.2 acts as the gateway of the following subnet:

  • 192.168.0.1: Router
  • 192.168.0.2 and on: Computers

Is there a way to allow computers in the 192.168.1.* network to access computers in the 192.168.0.* network (including being able initiate a connection, not just respond to requests) without merging the subnet into the main network?

  • 1
    Are there 2 routers in play? If one router has its computers connected to the LAN port, and the WAN port of that router is connected to the other network, then the answer is no, unless you set that router in bridge mode which disables the router and turns it into a hub, making both lans joined together with the same ip addresses. So that would merge them and thus is a no. – LPChip Mar 18 '18 at 20:27
  • 1
    Thanks for providing a definition for "being visible". People use that word to mean 3 or 4 different things at once. – grawity Mar 18 '18 at 21:42
  • What is your meaning of router. router has a very specific meaning in networking, but ISPs provide a box that they call a router (yes it has a router in it, but most customers know nothing about it). So is it the thing from your ISP? also is it the same router on 192.168.1.2 and 192.168.0.1? – ctrl-alt-delor Mar 18 '18 at 22:53
5

Yes, as long as the routers offer the necessary configuration options. (Surprisingly many devices calling themselves "routers" don't let you add any routes!)

When your devices on the outer subnet send packets to another network, they first go through their "default gateway", and it's that router's task to route them to the correct next router.

  1. Assuming that 192.168.1.1 is your first subnet's default gateway, it needs a static route towards the 2nd subnet:

    • To network: 192.168.0.0/24 (aka 192.168.0.0 mask 255.255.255.0)
    • Via gateway/nexthop: 192.168.1.2
  2. If the 192.168.1.2 router has a firewall, it must be configured to allow connections from 192.168.1.0/24 (or even disabled outright).

  3. If the 192.168.1.2 router has NAT enabled, it should be disabled... but it'll probably work either way, as long as the firewall in step 2 allows.

  • What you're saying make sense and I have configured a static route towards 192.168.0.0/24 through 192.168.1.2. If I ping on my Android device for example, it says "Redirect Host(New nexthop: 192.168.1.2)". However, no connection can be established. Does this indicate a router-side problem? – T. C. Mar 20 '18 at 15:50
  • The ICMP redirect message is expected in your layout; you can ignore it. (The fact that your router sends it indicates that the static route should be correct.) If the packets don't go through (or if the replies don't go through), it's likely a problem with the 2nd (inner) router. – grawity Mar 20 '18 at 16:00
1

On the second router, it will need an address assigned from the primary subnet, like 192.168.1.254 and plugged in on the shared network. Traffic will need to be allowed on the both firewalls. Then on both routers you will need to setup a route to each network. All traffic going to 192.168.2.0 needs to be sent to 192.168.1.254. You will need to be careful with DHCP when the two routers are plugged in as both could hand out DHCP requests to the devices.

If your router(s) do not have the ability to do static routes, you will need to replace with a better router or on each computer you will need to manually add a route statements.

From a command prompt you can do the following command.

 route ADD destination_network MASK subnet_mask  gateway_ip metric_cost

 route ADD 192.168.2.0 MASK 255.255.255.0 192.168.2.254

Then on the other side you would need a similar command

 route ADD 192.168.1.0 MASK 255.255.255.0 192.168.2.1
0

Sure, you can configure a VLAN encompassing two separate subnets. But it will probably require you to invest in some hardware. I've only ever done it on a switched network with a core layer-3 switch. It's not a simple answer, though.

Also, your could try to establish a point-to-point link between your existing routers.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.