0

I have 1 modem and 3 routers connected to that modem via Cat5s.

Each router gets an IP (192.168.0/24) from the modem, has its own SSID, and is a DHCP server for that SSID. I would like to configure the routers so that devices on each SSID can communicate with devices on others. At the very least I would like to be able to access each router's management interface without switching the wifi network on my laptop/phone every time.

Current router IPs are:
Router 1: 192.168.1.1
Router 2: 192.168.2.1
Router 3: 192.168.3.1

I tried static routes like below (this was my attempt to configure Router 1 to connect to Router 2):
Network Destination: 192.168.2.0
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1

The pings show "destination unreachable" and nothing else worked.

Hopefully someone has an idea on how to configure this.
Thank you very much

4
  • Why did you enter that particular gateway for that network? It doesn't seem to match what you described a paragraph earlier. Commented May 21 at 3:47
  • I thought that would allow communication between routers 1 and 2 and my plan was to add 2 static routes like this to each router. Sounds like that's a useless idea?
    – YBB
    Commented May 21 at 3:56
  • Right, but if the destination is a network that belongs to Router 2, why are you specifying Router 1 as the gateway for that? (I'm assuming you're adding this on one of the routers themselves, not on a host – were you adding this specific route on Router 1?) Commented May 21 at 4:06
  • I tried what I thought might be helpful and it didn't work. That's why I reached out to this community.
    – YBB
    Commented May 21 at 4:13

1 Answer 1

1

The 'gateway' field of routes has to specify the next hop to forward the packets to. Specifying the current router is not needed (it already has the packet after all) and doesn't provide the necessary information to the route.

(Specifying the current router actually has the specific meaning of indicating that the network would be reachable without going through any further router. That is, you'd use that kind of route if there were multiple IP networks overlapping on the same Ethernet. Since the devices aren't actually there, "Host unreachable" will be the result.)

So if you want to reach the network which is behind Router 2, then the "gateway" or "next hop" for that route would indeed be Router 2 – not Router 1 itself.

Additionally, the "gateway" needs to be an address that Router 1 already knows how to directly reach. In other words, it has to be an adjacent address – in your case, it means Router 2 has to be specified by its 192.168.0.x address (as that's the network the two routers share), and not by its 192.168.2.1 address (as that's currently unknown at the time of adding the route).

So in general, the routes you'd need to add – on all three routers and maybe also on the modem (if anything else besides the routers is connected to it) – would be:

Destination Gateway Note
192.168.1.0/24
(R1's network)
192.168.0.11
(Router 1)
(not needed on Router 1 itself, it already has a route for its own network)
192.168.2.0/24 192.168.0.22 (not needed on Router 2)
192.168.3.0/24 192.168.0.33 (not needed on Router 3)

Don't forget to allow the incoming packets through each router's firewall, otherwise even if the packets get there, the router might just block everything by default.

Normally you need to add both R1→R2 and R2→R1 routes for communications to work (one way is not enough). If the routers do NAT, things might start working after just the R1→R2 route, but it's always recommended to rely on routing and not on NAT.

You must log in to answer this question.

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