How to route two networks?

My main router have a 192.168.10.0 network. with a second router ( wlan connection ), I connect to my main router with the second router and the second router get 192.168.10.155 from my main router. The second router have a 192.168.1.1 network.
Now, I want to access to 192.168.1.1 from my laptop client. Its connected with wlan on the main router with a 192.168.10.8 address. How I have to route it? Or is it not possible to get access to network 192.168.1.0 from networt 192.168.10.0?

There are a few things you need to do:

  • first, your main router must support static routes. If not, this will not work.
  • find the static routes page in the main router and create a route for 192.168.1.0/24 via the IP address of your 2nd router’s wan (this is the same as the address the 2nd router occupies on the first router’s lan)
  • on the 2nd router’s firewall, find the wan zone configuration and disable masquerading.
  • finally, create a forwarding rule in that zone allowing wan > lan. (You can be granular if you want only specific traffic to flow, but this allows both networks to route to each other in a fully open way)
1 Like

Oh, plz wait, there is a mind-mistake, by me ...
I will tell you, from the beginning.

My main router have 192.168.10.0 network ... My second router ( called relay ), have 192.168.1.0 network. My main router is connected as wlan client to the second router ( relay ) and get the address 192.168.1.115 from my second router ( relay ). But now ... the second router is connected to a wlan access point and gateway 192.168.2.0 / gateway 192.168.2.1, too. With my main router, I can get to the Internet over the relay...

192.168.10.0 ----> 192.168.1.155 ( DHCP from the relay ) ----> 192.168.2.1 ( gateway )

Thats works very fine. But I cant access to the 192.168.1.0 network. Cant ping.

When I disable masquerading, I cant get into the internet with my clients anymore.

Or do I have to use a second USB WLAN stick in my relay?

Your second router is a member of 2 networks at the same time. It uses the address 192.168.10.155 to connect to the first network, and the address 192.168.1.1 to connect to the second network.

By default, it most likely considers the first network (192.168.10.0/24) as WAN while the second network (192.168.1.0/24) as LAN. The naming LAN or WAN is not important. What important here is that the router also acts as a firewall and block incoming connection from zone WAN to zone LAN. That's why you cannot connect.

1 Like

I have tried to disable the firewall on the second Router. But when I do that, nothings works.

It would have been useful if you had mentioned that you have 3 cascaded routers at the outset. How about a diagram of your network -- and mark them with the relative LAN subnets as well as the brand/model of each device, and the OS that they are running (i.e. OpenWrt vs something else).

@ psherman
You are correct. I will do a diagram ...