Set up routing to forward requests to a subnet to a certain router

Joseph

Here is how my home network is set up:

enter image description here

There is an ISP-provided gateway which does DHCP for 192.168.29.0/24. I connected two routers to this gateway as clients, (R1 and R2, with respective IPs 192.168.29.2, 192.168.29.3).

The routers do DHCP under 192.168.0.0/24 and 192.168.1.0/24.

As a client on, say, R2, (192.168.1.3), I would like to reach a client on R1 (the printer, 192.168.0.2). I set up a static route in R2 to let it forward 192.168.0.x requests to 192.168.29.2, which is R1:

enter image description here

However, it appears that R1 doesn't accept the request. I'm guessing it looks like a request from WAN to R1, (which it sort of is), and I have no idea what setting to even look for to let it accept this. And, accept what? What would I be trying to accept -- "packets from outside to inside"? I'm not sure how to even describe this.

Running a traceroute to a R1 client shows that it's hitting R1. Nothing happens then, it's a time-out.

joseph@MBA : ~
[130] % traceroute 192.168.0.5 
traceroute to 192.168.0.5 (192.168.0.5), 64 hops max, 52 byte packets
 1  r2 (192.168.1.1)  4.888 ms  4.537 ms  3.970 ms
 2  192.168.29.2 (192.168.29.2)  5.185 ms  5.291 ms  7.068 ms

Where do I go from here?

Tero Kilkanen

The easiest option for you would be to have all your devices in 192.168.29.0/24 subnet. Don't use the WAN port on either R1 or R2, and connect all cables to the LAN ports.

You need to also disable DHCP server on R1 and R2 so that only the GW will provision IP addresses via DHCP.

This way you don't need to consider routing at all.


Original answer:

I assume that you don't have NAT enabled in R1 or R2, which must be the case.

In order for routing to work between two clients in different networks, both ends must have proper routing table entries set:

R2 must have the entry:

Route network 192.168.0.0/24 via 192.168.29.2

R1 must have the entry

Route network 192.168.1.0/24 via 192.168.29.3

You need to have these entries both ways, because IP packets are forwarded in a stateless fashion- Each router looks only at the IP packet destination address and consults the routing entry for that address.

So, if the other router does not have to proper entries, it will forward the reply packets to wrong router, in this case the GW, which is the default route assigned in the router.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to access PC on subnet router in this set up?

Set up routing to access external router on the WAN interface

How to set up routing in ReactJS?

django channel set up routing

Set up a proxy with python requests

React - How to forward requests to routes that are not listed in the Router to a NotFound (404) component?

How to forward specific http requests on a specific port from router?

Subnet masks and routing protocols

Routing requests to update part of child component using React router

How to set up dynamic on the fly angular routing?

How to set up a routing table in omnet++

Setup Ubuntu Router with a subnet

What IP range can I use setting up a new interface on my router for a subnet?

Routing a particular subnet into a VPN tunnel

Set up router for subpages in Vue.js

How to set up a linux server as a router

Set up a router with DHCP in a non DHCP network

Setting up router when modem doesn't have bridge mode, so that DHCP and Port Forward Happen on Router

Set up DNS to forward mail to one domain and other traffic to another

How to set up if statements so that loop goes forward and then in reverse? Processing

Zend Framework Routing Forward

Setting router subnet mask to 255.255.255.255

How do I set up basic routing for .NET WEBAPI?

How to set up Web API Routing for a Proxy Controller?

Can't set up routing to a named outlet in Angular

How to set up application-specific routing table on Windows?

How to set up custom routing for wildcard subdomains in Nancyfx

How to set up my routing that "pathMatch" and childRoutingModule work?

Verizon FiOS gateway routing issue - How to set up VPN?

TOP Ranking

HotTag

Archive