OpenWrt Forum Archive

Topic: Routing two subnets between 2 routers (cable or wifi) didn't work.

The content of this topic has been archived on 15 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I try to setup two routers using the configuration as described in http://wiki.openwrt.org/doc/recipes/rou … ng.routing

It won't work. I can ping clients in subnet (192.168.1.0)  from router2 (192.168.2.0), but connecions to a printer port 9100 won't work.

While pinging a client in subnet2 from subnet1 I got a     Reply from 192.168.1.1: Destination port unreachable message?

I tried the configuration via wan port and via wifi wan port, but did'nt work.
Internet access is ok. 
Must be a trick? As I remeber that this was pretty easy using DD-WRT or M0n0Wall to connect two routers via a cable using two subnets.

THX

f41sixxs

Hello,
My problem: I followed instructions in wiki http://wiki.openwrt.org/doc/recipes/rou … ng.routing

The only difference, that I do not connect 2 routers with cable, but wifi.
I configured my TP-Link 1043 ND as client (Openwrt).
Current config:

provider --(cable)-- modem --(UTP cable)-- Asus WL 520 gC (original firmware) --(UTP cable)-- clients  (THIS IS SUBNET "A" 192.168.1.0/24)
                                                                     .
                                                                  (wifi)  . . . some clients
                                                                     .
                                                                Tp-Link 1043 ND (OpenWrt) as wifi client
                                                                     |
                                                               (UTP cable)
                                                                     |
                          printer - (USB cable) - D-Link 524 UP (original firmware) --(UTP cable) -- client (THIS IS SUBNET "B" 192.168.2.0/24)
                                                                     .
                                                                   (wifi)
                                                                     .
                                                                   other clients

Everything is OK.
Two subnet seeing each other, everybody can print via D-Link 524 UP in subnet B.

BUT
subnet B cannot go out to internet.
The reason is that  Asus WL 520 gC does not masquerade subnet B.
If I configure subnet "A" to 192.168.1.0/23 - so netmask is 255.255.254.0 (this includes subnet B as well - which is WRONG config I know),
subnet B can go out to internet, but subnet A cannot reach subnet B due to misconfiguration.

How can I tell Asus WL 520 gC to masquerade subnet B?
I can flash Asus WL 520 gC to DD-Wrt if it needed due to the fact this router has only 2MB flash.
Thanks,
Mark

It is very likely you forgot (or forgot to apply changes) to add fixed routing or client subnet's AP is not 192.168.1.30 smile .

From wiki:
After fixing the WAN address, a static route must be added to the Access Point with the following information:
    IP address: 192.168.2.1 (IP address of our LAN interface)
    Destination LAN NET (required in DD-WRT): 192.168.2.0 (our LAN interface subnet)
    Netmask: 255.255.255.0 (Netmask of our LAN interface)
    Gateway: 192.168.1.30 (IP address of our WAN interface)

(Last edited by vmark on 14 Sep 2012, 07:31)

vmark wrote:

It is very likely you forgot (or forgot to apply changes) to add fixed routing or client subnet's AP is not 192.168.1.30 smile .

From wiki:
After fixing the WAN address, a static route must be added to the Access Point with the following information:
    IP address: 192.168.2.1 (IP address of our LAN interface)
    Destination LAN NET (required in DD-WRT): 192.168.2.0 (our LAN interface subnet)
    Netmask: 255.255.255.0 (Netmask of our LAN interface)
    Gateway: 192.168.1.30 (IP address of our WAN interface)

Thanks
That really helped my AP hosts be able to access the client net's hosts.

The discussion might have continued from here.