Posted: Sun Mar 26, 2017 23:21 Post subject: VLAN Help with Multiple Routers
Hi there.. I'm fairly new to setup of up a VLANs and trying to learn and setup different VLANs, so I can configure them on Esx and XenServer lab hosts.
Here is my network setup.
Got 2 routers running DD-WRT firmware
I have a main router (A) upstairs connected to cable modem, serving clients mainly via Wifi and computers connected via Ethernet. Second router(B) resides in basement wifi disabled
Two routers are connected: LAN port from Router A connected to WAN port on Router B.
Router B has 2 VLAN's with DHCP enabled.
VLAN2 (Port1) - 10.1.2.x
VLAN3 (Port2) - 10.1.3.x
I've configured the firewall on router B so devices on VLAN 2 & 3 can communicate, internet access and are also able to communicate to devices on Router A (192.168.2.x).
The issue I face is with devices connected on Router A cannot see the devices on VLAN 2 & 3 on Router B
Is this a supported configuration ? if so, can someone pls guide me on how to address it?
Please let me know if you need more info on my network configuration.
Previously, on my Router (A) i would access the router via web portal and then GUI WOL page. Wake up the host from there. I'm hoping to do something similar.
Will take a look at your post on how you did it and see if I can get something working!
prefect thanks. Was Wondering why u did not answer my other question but looks like it did not get posted so sorry I have re posted it
Q2:
port forward, this will done at Router A (main) connected to Internet Modem ?
Q3:
WOL IP, I see you enter 192.168.1.254 ? In my case would it be VLAN where the Esx host resides (10.1.2.254) ?
or the Router IP Range ?
or ESX host IP ?
Q4.
Would I still be able to connect to router A from external Go to Administration - WOL - Manually wake device ?
Q5: Topic outside WOL, My Router B is WRT54G, i read it does not support VLAN tagging. Are you aware ?
Hi eibgrad,
Sorry to come back with more questions.
I thought of switching my configuration on router B a little to see, and let me know if that make sense
Instead of plugging ethernet cable from Router A(Main Router) to Wan port on Router B, I decided to link the 2 routers by connecting to LAN port 4 on Router B.
So I disabled the WAN port on Router B. Changed the router B ip address to point to same subnet (192.168.2.x) as Router A. Also disabled the DHCP.
So configuration on Router B
Wan port disabled
Router IP: 192.168.2.x
LAN 1 - Empty
LAN2 - Assigned to VLAN3
LAN3 - Assigned to VLAN2
LAN 4 - Connect to Router A
If I plug a device into LAN 1, get an IP from Router A and all works fine.
If I plug a device into LAN2/3 and set a manual IP. I can ping devices on all VLANs and ping devices on Router A, but no internet Access
Does this configuration make sense ? How can I get VLAN2/3 access to the internet ?
Here is what I have under Administration - > commands
iptables -I INPUT -i vlan+ -j ACCEPT
iptables -I FORWARD -i vlan+ -o br0 -m state --state NEW -j ACCEPT
iptables -I FORWARD -i vlan+ -o vlan+ -m state --state NEW -j ACCEPT
iptables -I FORWARD -i vlan+ -o ppp0 -m state --state NEW -j ACCEPT
**** guessing the below is no longer need as I have WAN disabled, Right ?*****
WAN_NET="$(nvram get wan_ipaddr)/$(nvram get wan_netmask)"
iptables -I INPUT -s $WAN_NET -m state --state NEW -j ACCEPT
iptables -I FORWARD -s $WAN_NET -m state --state NEW -j ACCEPT
Thanks again for prompt response and great information
eibgrad wrote:
I assume the primary router still has static routes for the local IP networks of vlan2 and vlan3.
Yes I do have static routes.. just to confirm it correct.
Here is one of static routes for VLAN2
HOST IP: 10.1.2.0 (VLAN )
Network Mask: 255.255.255.0
Gateway: 19.168.2.8 (This is Router B IP) or Should be changed to Port 4 LAN IP on Router B ?
eibgrad wrote:
Also, make sure the LAN section on the second router has a gateway IP that points to the primary router.
By LAN, Are you referring to Router IP, has gateway configured to primary router gatway ? Or Are you referring to Port 4 which is connected to Router A has a Gateway configured to Point to gateway on Router A?
eibgrad wrote:
and that the VLANs also have an appropriate gateway IP that point to the second router LAN ip on their respective networks.
Just to understand this correctly.
VLAN2 has gateway set to 10.1.2.1 and DNS of Router A Gateway.
Should GW on VLAN be changed to point to 192.168.2.10 or pointed to ip provided to port 4 on router B ?