0

Here is my network setup:

[modem] -> [Router A] (IP: 192.168.1.1) -> [Router B] (IP: 192.168.0.1)

Both routers have a subnet mask of 255.255.255.0.

My problem is that while devices connected to Router B are able to communicate with all devices connected to Router A, the opposite is not true.

How can I also have devices connected to Router A communicate with devices connected to Router B?

NOTE: Router A is connected into Router B's "Internet" socket.

2 Answers 2

1

It's normal behaviour for common residential routers to have NAT enabled on the "internet socket". This means that RouterB clients are NATed when crossing to "RouterA" side. This means that RouterA doesn't see the client's address, it sees the RouterB address for all the RouterB's clients. And this is why RouterA's clients can't connect to RouterB's clients: RouterA clients can't distinguish between one RouterB's client and another one.

You have 2 options here:

1) routed network (aka layer3 addressing): disable NAT on RouterB's "internet socket".

2) switched network (aka layer2 addressing): place both routers on the same network (using different addresses) and connect the routers using lan sockets instead of the internet one.

Other details will probably need to be fixed in both cases. Examples:

a) static routes in the routed network: you might have to add a static route on RouterA, in order to tell that the 192.168.0.0/24 network is at RouterB's IP address.

b) DHCP servers in the switched network: there can be one only (or can be two but you must make those two aware of the other one, and decide which one is the master and which one is the slave; usually this can't be done on consumer routers). So you must disable one of the DHCP servers on one of the routers's lan side.

In order to have a working setup, you must decide what kind of network you need (routed or switched?) and usually security plays a major role in this decision. In a routed network you can ask the router to deny some activities in order to protect some of the clients from others. In a switched network the router have less control on client-to-client communications because they are in the same collision domain... they communicate directly without using the router as a middle-man.

We can't help you more than this without having more details about your network equipment and your needs.

EDIT: If you can manage to place OpenWrt on your router, you'll be able to fully configure your device and make complex network configurations. Otherwise your chances are limited by the vendor software. BTW, it looks like your TP-LINK is supported by OpenWrt.

2
  • My Router B (a TP-Link AC900) does not support disabling NAT. Does that mean that I cannot maintains the two different subnets? I have a lot of IoT devices and one big network quickly becomes very congested.
    – Tarek
    Commented Aug 27, 2019 at 21:00
  • You can, but you need to be able to configure the network properly. Consumer products have limited configuration options because they are produced to do one job only (connect home to the internet). And you are using it in a different way. Hold on, I update the answer...
    – Anichang
    Commented Aug 28, 2019 at 8:23
1

The usual solution is to make Router B act as just a transparent switch/bridge instead of a NAT gateway router.

Some routers let you disable their NAT gateway feature, and will automatically make their WAN (Internet) port become the same as their LAN ports.

Other routers don't let you disable their NAT gateway feature, so you just have to work around it like this:

  1. Connect an Ethernet cable from one of Router A's LAN ports to one of Router B's LAN ports.
  2. Disable the DHCP Server service on Router B (if there's no way to completely disable it, see about setting the DHCP lease pool size to zero length).
  3. Give Router B a static IP address on Router A's private subnet, so that you can still get to Router B's web admin interface if you need to later (like for changing its wireless network name or security settings.

If you set things up this way, clients on the Wireless LAN or wired Ethernet LAN ports of router B will get their DHCP leases directly from Router A. Your whole home network will be one bit IP subnet, and everyone will be able to talk to everyone else.

4
  • My Router B (a TP-Link AC900) does not support disabling NAT. Does that mean that I cannot maintains the two different subnets? I have a lot of IoT devices and one big network quickly becomes very congested.
    – Tarek
    Commented Aug 27, 2019 at 21:00
  • One big network shouldn't become congested, unless your IoT devices are crap and transmit an excessive number of broadcasts or multicasts. If Router B has not way to disable NAT, that means you can't make it into a simple IP-forwarding router, which means you don't have a way to keep the subnets separate while maintaining the ability for Router A's private subnet to reach Router B's private subnet.
    – Spiff
    Commented Aug 27, 2019 at 21:15
  • Thanks Spiff. Router B does support IP forwarding however, calls it Virtual Servers and it's under the NAT Forwarding tab.
    – Tarek
    Commented Aug 28, 2019 at 0:02
  • @Tarek Virtual Servers and Port Forwarding is a different thing. I'm talking about setting your router to be a simple IP router between two subnets, so it's more than just a transparent bridge/switch, but without doing NAT.
    – Spiff
    Commented Aug 28, 2019 at 0:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .