Routing between 2 subnet on the same router

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking
Author Message
megavolts
DD-WRT Novice


Joined: 02 May 2019
Posts: 1

PostPosted: Thu May 02, 2019 7:13    Post subject: Routing between 2 subnet on the same router Reply with quote
Hi all,

I set up my router with 2 wireless subnets on my router following https://wiki.dd-wrt.com/wiki/index.php/Multiple_WLANs:
* 192.168.1.0/24 for my data server, laptop, subnet connected to LAN and WAN.
* 192.168.2.0/24 for a bunch of sensors platform using RaspberryPi or similar

I want to have my second subnet 192.168.2.0 connected to LAN and the first WLAN subnet 192.168.1.0, in order to access directly to the sensor (for example at 192.168.2.142) from my laptop (192.168.1.13).

I tried to bridge the interface without success (often I ended up to lose the separate subnet, or have the subnet gaining access to internet.

I tried to create a route in between the two subnets with:
* Destination LAN NET: 192.168.2.0
* Subnet Mask: 255:255:255:0
* Gateway: 192.168.1.1
Without success. When Pinging I got the following error "Redirect Host(New nexthop: 192.168.2.141)"

Here is a schematic:
Code:
SUBNET2---------------SUBNET1---------(NAT)---Internet (WAN)
(192.168.2.0/24)   (192.168.1.0/24)
           |                     |
   Sensor                Laptop
(192.168.2.141/24) (192.168.1.13/24)


I supposed it was as easy as:
* tell Laptop that SUBNET1 is his default gateway (normally done through dhcp)
* tell Sensor that SUBNET2 is his default gateway (normally done through dhcp)
* tell SUBNET1 that "WAN"-router is his default gateway.
* tell SUBNET1 that requests to 192.168.2./24 will be routed through SUBNET2 (static route)
* tell SUBNET2 that SUBNET1 is his default gateway (via routing)

I am open to any suggestion to make this works, and if this is a stupid idea, just let me know.

Router: Linksys WRT1900AC
Firmware Version: v3.0-r39572 std (04/19/19)

[edit 05/02/19: add Router+Firmware]


Last edited by megavolts on Thu May 02, 2019 15:19; edited 1 time in total
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 5762
Location: Netherlands

PostPosted: Thu May 02, 2019 7:52    Post subject: Reply with quote
The VAP is not isolated from the main network unless you tick Net isolation on the GUI or put in firewall rules yourself

So if you just tick Disable on Net isolation and delete any firewall rules you added yourself you should be fine and the VAP and main network are connected.

Routing has nothing to do with these kind of setups, you have to use firewall rules to isolate or connect

I use the modern method to setup a VAP see my notes

BTW: ALWAYS state your router model and firmware build number and build date

_________________
Routers:Netgear R7800, Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard server setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
Wireguard client setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324624
Wireguard Advanced setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324787
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum