Posted: Sun Jan 08, 2023 7:38 Post subject: Please assist, Station Bridge Interface AutoJoin SSID script
Hello, I am seeking assistance with my current project. I have 2 EA6350 v2 routers flashed with Firmware: DD-WRT v3.0-r51043 std (12/19/22). The Primary Router belongs to an OPEN HotSpot to which I have access. The 2 routers flashed with DD-WRT function as follows:
1 = WL0/1 = AP / DNS Forwarder
2 = WL0 = Disabled WL1 = Station Bridge (Network details are entered accordingly)
Both (Secondary) Routers are connected by a cat6 cable.
After tons of research and Trial & Error, I have finally gotten the project off the ground, and operational. However whenever the StationBridge reboots or its connection is interrupted, The AP is no longer able to forward DHCP requests; and clients fail to receive an IP Lease.
This is resolved by going into the Status > Wireless Tab (in Station Bridge Router), selecting Site Survey and pressing the Join Button next to the appropriate SSID.
I am requesting guidance on creating a script that can be entered into nvram startup, Automating the process.
Joined: 18 Mar 2014 Posts: 12881 Location: Netherlands
Posted: Sun Jan 08, 2023 8:33 Post subject: Re: Please assist, Station Bridge Interface AutoJoin SSID sc
slavix66 wrote:
Hello, I am seeking assistance with my current project. I have 2 EA6350 v2 routers flashed with Firmware: DD-WRT v3.0-r51043 std (12/19/22). The Primary Router belongs to an OPEN HotSpot to which I have access. The 2 routers flashed with DD-WRT function as follows:
1 = WL0/1 = AP / DNS Forwarder
2 = WL0 = Disabled WL1 = Station Bridge (Network details are entered accordingly)
Both (Secondary) Routers are connected by a cat6 cable.
After tons of research and Trial & Error, I have finally gotten the project off the ground, and operational. However whenever the StationBridge reboots or its connection is interrupted, The AP is no longer able to forward DHCP requests; and clients fail to receive an IP Lease.
This is resolved by going into the Status > Wireless Tab (in Station Bridge Router), selecting Site Survey and pressing the Join Button next to the appropriate SSID.
I am requesting guidance on creating a script that can be entered into nvram startup, Automating the process.
I will move your question to the appropriate forum.
See the forum guidelines with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
I assume your station bridge is connected to the public hotspot.
Using station bridge to connect to a public hotspot would not be my first choice as there is no firewall and your network is exposed.
I would use station mode (without the bridge) where the router is on its own subnet and you have your own firewall, DHCP and DNS server etc.
Also because bridging modes are a hack which should be avoided if possible because they cause problems like you discovered, the only good bridging modes are WDS and mesh.
The secondary router can then be setup as a Wireless Access Point (WAP):
Quote:
A secondary router connected wired LAN<>LAN on the same subnet as the primary router.
On Basic Setup page:
• On Basic Setup page:
o WAN disabled
o DHCP server Disabled (=off and NOT set as Forwarder!)
o Local IP address in subnet of primary router but outside DHCP scope, make sure the used IP address is unique on your network you cannot have duplicates.
You can run udhcpc to give the WAP a static lease but because you can it doesn't mean you should
o Gateway and Local DNS pointing to primary router
• Keep DNSMasq enabled (both on Basic Setup page and Services page)
• On Setup > Advanced Routing, keep Operating mode in the default Gateway (the wiki says Router mode but do not do that, either it does not matter (this case) or break things)
• On Security > Firewall keep the SPI Firewall enabled, although you do not want a firewall it will be automatically disabled as there is no WAN so no need to change this setting form default.
• Connect LAN <> LAN (do not use the WAN port unless you really need that extra port, for most routers traffic still must use the CPU so performance is lacklustre and there are some routers where the WAN port is not added to the br0 so the WAN port could be non-functional on some routers).
Note: for Broadcom routers for best throughput enable CTF on Basic Setup Page
You have to add the following rule to the firewall in order to get internet access from clients attached to the VAP/Bridge.
In the web-interface of the router (the WAP): Administration > Commands save Firewall:
#Always necessary (alternatively set static route on main router and NAT traffic from VAP/Bridge out via WAN):
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to $(nvram get lan_ipaddr)
Thank you, I appreciate your input, and your patience. Ive got my reasons for this setup, we can discuss further in private if needed. But overall the current config of both secondary routers works exactly as is needed for this application. All except for joining the network automatically. Even with the variables plugged in manually, The join button needs to be pressed while in site survey.
If the hotspot you are connecting to requires a captive portal or human intervention, you will not get autoAP to work. If it does not require any human intervention, then station bridge mode should automatically connect on it's own without any use of join. More details required.... _________________ "The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost
"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio
This is where your response goes, not in my inbox. This is where my place in this discussion ends.
slavix66 wrote:
Thank you Dale, im not sure of the terminology, but ill assume yes it requires captive portal. All clients must click and watch an advertisement before recieving access to the internet. Any information needed to steer me in the right direction I will gladly provide. Thank you.
_________________ "The woods are lovely, dark and deep,
But I have promises to keep,
And miles to go before I sleep,
And miles to go before I sleep." - Robert Frost
"I am one of the noticeable ones - notice me" - Dale Frances McKenzie Bozzio