0

I have 1 router (R1) connected to the internet which has LAN IP 192.168.10.1 and Subnet Mask 255.255.255.0

I have another router (R2) which is connected to 1 LAN port of R1 and to the WAN port of R2. This router has LAN IP 192.168.0.1 and Subnet Mask 255.255.255.0 and WAN IP: 192.168.10.200 (static)

My goal is to get the LAN network of R2 to be accessible to R1 LAN (R2 devices can already access R1 but not the other way). The goal here is to be able to be connected to R1 and access a Raspberry Pi connected to R2 localy and expose devices to the Raspberry Pi that are connected to R1. From what I've read online, static routing is what I need.

What am I supposed to enter in Destination IP, Subnet Mask, Gateway in the Static Routing Table of the 3 routers so that I can make this connection possible ?

The reason I am not using and AP or bypassing this device is that my R1 router is my ISP and the R2 is going to be my wireless point (disabling my R1 wifi) and at the same time giving me more control over DHCP reserve list since my ISP router (R1) has a limit of 8 reserved dhcp ip devices (very weird but confirmed by the ISP.

Edit: ISP (R1) - Dasan H660GM R2 - Tp Link Archer C50

10
  • If R2 is connected to R1, then R2 already has a route to all devices connected to R1. Is there a reason you are creating a second subnet on R2?
    – Ramhound
    Commented May 4 at 3:35
  • Indeed R2 can access R1 devices already, but for example my pc connected to R1 can't connect locally to my Pi on R2, that's what I am struggling with Commented May 4 at 3:48
  • And the reason for the other subnet is that R2 has its own DHCP in order to give me access to reserve more, since my R1 is limited to 8 Commented May 4 at 3:56
  • Why is a subnet that exists only within your network limited to 8 hosts? /29 is 6 hosts, and /28 is 14 hosts; an 8-host subnet does not make sense. 255.255.255.0 subnet mask is 256 hosts
    – Ramhound
    Commented May 4 at 4:04
  • Anyway, set the DNS of R2 to R1, and you can configure the DNS of R1 to anything you want. This way a device connected to R2 is connected to R1 through R2. This assumes that R2 can ping R1.
    – Ramhound
    Commented May 4 at 4:09

1 Answer 1

0

What am I supposed to enter in Destination IP, Subnet Mask, Gateway in the Static Routing Table of the 3 routers so that I can make this connection possible ?

"Destination" plus "Subnet mask" is literally the network you want to reach.

"Gateway" is an IP address of the router towards which you want to direct the packets. (Since routers typically have multiple addresses, you need to use the one that's "facing you".)

For example, if R1 wants to reach R2's network 192.168.0.0/24, then the "Destination" is 192.168.0.0 with netmask 255.255.255.0 and the gateway is R2's 'WAN' address 192.168.10.200.

(The gateway can't be R2's 'LAN' address 192.168.0.1 because R1 doesn't know how to reach it yet.)

8
  • That was quite helpful, I'm gonna give it a try. Just a quick question, should I put static routes on both of them or just R2 for example? (Destination - 192.168.10.0 / Subnet mask - 255.255.255.0 / Gateway - 192.168.10.1) Commented May 4 at 7:09
  • R2 doesn't need a static route to R1's network because it is already directly connected to that network (it has an IP address from there, after all), which automatically gives it a 'direct' route to 192.168.10.0/24. Only R1 needs a manual route to R2's network because otherwise it knows nothing about it. (Optionally, PCs on R1 can also have a route to R2's network, bypassing R1 for performance.) Commented May 4 at 7:14
  • Just 2 more questions, should I turn off the firewall and upnp/NAT on R2? And on R1 what should be the value for the "Metric" field and in the "Interface" field, WAN0 or LAN? Commented May 4 at 12:49
  • I tried you sudgestion just now and I get 2 type of errors! PC connected to R1 trying to conect to an R2 device by usin the 192.168.10.x I get ERR_CONNECTION_REFUSED and if I try to access the R2 router page using the R1 IP 192.168.1.x I get ERR_CONNECTION_RESET Commented May 4 at 13:21
  • You should turn off the firewall on R2 or at the very least configure it to allow connections inbound. By default R2 is set up to assume that the 'WAN' interface is in fact a WAN connection so it'll block everything for security. I would also turn off NAT on R2, since it's no longer necessary once routing is in place. The metric is irrelevant as long as there's only one route for the network, and the interface should be whichever leads to the gateway (for R1 that would be "LAN" since that's where R2 is connected). Commented May 4 at 14:22

You must log in to answer this question.

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