Set up Wireless Access Point via STA

Hello,

Currently I have two routers, connected via wireless (STA).

I want to turn off the DHCP service for the secondary OpenWrt router and accept DHCP for the primary router. Just like a wireless switch.

Wireless Access Point documentation is for wired connections, so does not apply.

In older versions of OpenWrt, I could bridge wireless devices and LANs together. But not in OpenWrt 23.05, it lets me add in wireless settings, but that has no effect.

br-lan

STA

Network

/etc/config/network

...

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.2.1'
        option netmask '255.255.255.0'

...

config interface 'wwan'
        option proto 'none'

config interface 'lan6'
        option proto 'dhcpv6'
        option device 'br-lan'
        option reqaddress 'try'
        option reqprefix 'no'

/etc/config/wireless

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/18000000.wifi+1'
        option channel 'auto'
        option band '5g'
        option htmode 'HE160'
        option country 'CN'
        option cell_density '0'

config wifi-iface 'wifinet1'
        option device 'radio1'
        option mode 'sta'
        option network 'wwan lan lan6'
        option ssid '...'
        option encryption 'sae'
        option key '...'

Since the bridge configuration failed, I did not modify lan. But you can find that lan6 did not receive the DHCPv6 configuration.

What am I missing? Do I need to install kmod-br-netfilter? I'm currently using the default 23.05 firmware.

To change a WiFi connection from DHCP Client to DHCP Server:

  • Change your Network config for the SSID from None to Static
    • number it in the range of the upstream network it will be connected to
  • Edit your SSID config as below

This is incorrect, only pick 1 interface (i.e. WWAN).

Please clarify if I misunderstood your desire for configuring the primary router, or if you're referring to the secondary instead.

As I recall, this was only possible on old Broadcom-based devices (as this confused me when i first started using OpenWrt). It sounds like you want relay mode.

1 Like

Oh yes, I want to implement wireless relay on the secondary router. But on the secondary router, the device is connected to the router via a wire.

I have an example for a non-DSA switch, where I created another VLAN (leaving the orginal LAN config intact):

This was for a ISP-provided TV box to be configured in a location without coax or Ethernet. The box was then connected via Ethernet on a media_lan port - and the STA to [5GHz] media_wifi:

config interface 'media_lan'
	option ifname 'eth0.3'
	option proto 'none'

config interface 'media_br'
	option proto 'relay'
	list network 'media_lan'
	list network 'media_wifi'
1 Like

I seem to have it figured out now, I need to add the WAN to the STA network list and then add the WAN in br-lan.

The price is that my WAN port is occupied.

This still presented a problem that I hadn't encountered before: the secondary router itself wouldn't request an IP address, which meant I couldn't manage it except reset it.

This doesn't sound right. Did you remove the WAN port for the WAN interface config?

Yea, you may need to set up a relay, as discussed.

1 Like

Okay, so my lack of success is because I didn't delete the default WAN interface?

I don't know how to set up relay.

relayd is marked obsolete: https://openwrt.org/docs/guide-user/network/wifi/relay_configuration

It currently looks like it's because I was using an OpenWrt 21.02 variant previously, still using swconfig. So it configured successfully.

Currently, only relayd can be used, but relayd can only be a static address.

I really want a "fully automated" solution, why is it so difficult...

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.