Can I make computers in this subnet visible to computers in the main network without merging them?

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?

T. C.

Posted 2018-03-18T20:15:26.573

Reputation: 392

1Are 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 – 2018-03-18T20:27:11.830

1Thanks for providing a definition for "being visible". People use that word to mean 3 or 4 different things at once. – user1686 – 2018-03-18T21:42:23.347

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 – 2018-03-18T22:53:10.060

Answers

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.

user1686

Posted 2018-03-18T20:15:26.573

Reputation: 283 655

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. – 2018-03-20T15:50:20.400

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. – user1686 – 2018-03-20T16:00:12.827

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

sonicbabbler

Posted 2018-03-18T20:15:26.573

Reputation: 121

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.

voices

Posted 2018-03-18T20:15:26.573

Reputation: 2 053