Wifi AP with Lan ports used as a switch

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
Cooperdale
DD-WRT Novice


Joined: 12 Apr 2016
Posts: 4

PostPosted: Tue Apr 12, 2016 18:40    Post subject: Wifi AP with Lan ports used as a switch Reply with quote
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.

Thanks in advance for any help.
Sponsor
n0kfb
DD-WRT Novice


Joined: 25 Feb 2010
Posts: 25
Location: Somewhere in the known universe.

PostPosted: Tue Apr 12, 2016 18:51    Post subject: Reply with quote
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
Cooperdale
DD-WRT Novice


Joined: 12 Apr 2016
Posts: 4

PostPosted: Tue Apr 12, 2016 19:06    Post subject: Reply with quote
n0kfb wrote:
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.
d00zah
DD-WRT User


Joined: 06 Jun 2006
Posts: 211

PostPosted: Tue Apr 12, 2016 20:12    Post subject: Reply with quote
This should accomplish what you want:

http://www.dd-wrt.com/wiki/index.php/Wireless_access_point

"LAN Uplink Through WAN Port" detailed ~2/3 in...

_________________
NetGear XR500 - FW Version: DD-WRT v3.0-r55819 std (04/17/24)
Linux 6.1.86 #130 SMP Wed Apr 17 05:48:30 +07 2024 armv7l
Updated from: DD-WRT v3.0-55779 std (04/12/24) via GUI (FF), NO reset
Gateway: SmartDNS, DDNS (FreeDNS), IPv4 DHCP, Static leases, SFE Disabled, QoS Disabled
AP: 2.4GHz NG-Mixed 40MHz, 5GHz AC/N-Mixed 80MHz, WPA2 w/ AES, MAC filtering, Isolated Guest VAP on wlan1, Vanilla FW
Services: USB Storage, NAS, Samba
Storage: Samsung Portable SSD T7 Shield USB 3.2 2TB, /jffs, /opt, /data (ext4)
Cooperdale
DD-WRT Novice


Joined: 12 Apr 2016
Posts: 4

PostPosted: Wed Apr 13, 2016 19:21    Post subject: Reply with quote
d00zah wrote:
This should accomplish what you want:

http://www.dd-wrt.com/wiki/index.php/Wireless_access_point

"LAN Uplink Through WAN Port" detailed ~2/3 in...


Thanks, it's not exactly what I meant but works just fine for my needs. Thanks a lot.
mrjcd
DD-WRT Guru


Joined: 31 Jan 2015
Posts: 6290
Location: Texas

PostPosted: Wed Apr 13, 2016 21:20    Post subject: Reply with quote
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

see --> http://www.dd-wrt.com/wiki/index.php/Multiple_WLANs

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.
Cooperdale
DD-WRT Novice


Joined: 12 Apr 2016
Posts: 4

PostPosted: Thu Apr 14, 2016 7:31    Post subject: Reply with quote
mrjcd wrote:
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

see --> http://www.dd-wrt.com/wiki/index.php/Multiple_WLANs

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.


Great solution, works fine. Thanks.
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6868
Location: Romerike, Norway

PostPosted: Tue Apr 26, 2016 21:38    Post subject: Reply with quote
If you router is a Broadcom: http://www.vspecialist.co.uk/creating-vlans-in-dd-wrt-part-1/
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions 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 can attach files in this forum
You can download files in this forum