Please assist, Station Bridge Interface AutoJoin SSID script

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
slavix66
DD-WRT Novice


Joined: 08 Jan 2023
Posts: 2

PostPosted: Sun Jan 08, 2023 7:38    Post subject: Please assist, Station Bridge Interface AutoJoin SSID script Reply with quote
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.
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12873
Location: Netherlands

PostPosted: Sun Jan 08, 2023 8:33    Post subject: Re: Please assist, Station Bridge Interface AutoJoin SSID sc Reply with quote
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 Wink
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)

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
slavix66
DD-WRT Novice


Joined: 08 Jan 2023
Posts: 2

PostPosted: Sun Jan 08, 2023 8:52    Post subject: Reply with quote
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.
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1927

PostPosted: Sun Jan 08, 2023 22:06    Post subject: Reply with quote
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

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
dale_gribble39
DD-WRT Guru


Joined: 11 Jun 2022
Posts: 1927

PostPosted: Tue Jan 10, 2023 3:15    Post subject: Reply with quote
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

<fact>code knows no gender</fact>

This is me, knowing I've ruffled your feathers, and not giving a ****
Some people are still hard-headed.

--------------------------------------
Mac Pro (Mid 2012) - Two 2.4GHz 6-Core Intel Xeon E5645 processors 64GB 1333MHz DDR3 ECC SDRAM OpenSUSE Leap 15.5
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware 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