Posted: Tue Apr 12, 2016 18:40 Post subject: Wifi AP with Lan ports used as a switch
Hello, so I'm trying to achieve this setup with DD-WRT and I was hoping I could get help from you guys. I've googled around but didn't find something like this.
I have a router (not DD-WRT) with 192.168.2.1 Ip, Dhcp server and internet connection.
I need a Wifi AP with 192.168.7.1 Ip. I obtained this by plugging a cable from the first router to the DD-WRT router (Wan port) and assigning the 192.168.7.1 Ip to the DD-WRT router.
What I need too, though, is for the 4 Lan ports to act as a normal switch. That is, I need to have another cable connect the 2 routers (Lan ports) and have the 4 Lan ports on the DD-WRT router act as a simple switch, so that any device connected to the 3 remaining ports will get a 192.168.2.xxx address from the main router.
So, is this possible? I have no idea how to proceed.
I'm not sure, but I believe that what you propose can be found under setup / vlans.
I'm a bit too busy right now to dig into this any further, but I hope this helps move you in the right direction.
--Dan Meyer
You mean under Setup/Networking? That's where I find Vlans. I think it has to do with bridging.
ath0 and eth0 are on the same bridge, so I guess they need to be on separate bridges. I wonder though, how can I tell the router to use the wan coupled with ath0 and use eth0 as a simple switch?
I have tried making eth0 not bridged and assigning it an IP address in the 192.168.2.xxx range, but it doesn't work.
Make you a regular WAP (wireless access point ) from links previously given
then create a guest network and you can set it to whatever network range you want
Do NOT use DHCPD for multiple DHCP servers!
This info is on page I linked to -
For a WAP you set these in 'Additional DNSMasq Options' on Services page.
e.g. ¬
interface=br1
dhcp-option=br1,3,192.168.226.215
dhcp-range=br1,192.168.226.193,192.168.226.222,255.255.255.224,24h
Then you must set firewall rules in Administration/Commands (Save as 'Save Firewall' )
e.g. ¬ (These will work for a basic setup that should give your br1 network access to internet )
iptables -I FORWARD -i br1 -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -m state --state NEW -j DROP
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to `nvram get lan_ipaddr`
There are some others on page I linked to but use only those rules listed for a WAP.
Make you a regular WAP (wireless access point ) from links previously given
then create a guest network and you can set it to whatever network range you want
Do NOT use DHCPD for multiple DHCP servers!
This info is on page I linked to -
For a WAP you set these in 'Additional DNSMasq Options' on Services page.
e.g. ¬
interface=br1
dhcp-option=br1,3,192.168.226.215
dhcp-range=br1,192.168.226.193,192.168.226.222,255.255.255.224,24h
Then you must set firewall rules in Administration/Commands (Save as 'Save Firewall' )
e.g. ¬ (These will work for a basic setup that should give your br1 network access to internet )
iptables -I FORWARD -i br1 -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -m state --state NEW -j DROP
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to `nvram get lan_ipaddr`
There are some others on page I linked to but use only those rules listed for a WAP.