Question to: "hostapd: add support for wifi-station and wifi-vlan sections"
Johann Neuhauser
johann at it-neuhauser.de
Fri Nov 6 18:38:19 EST 2020
Hello community,
some time ago i saw the commit "hostapd: add support for wifi-station and wifi-vlan sections" [0] on master and I tried to get this up and running.
The goal was to replace my three SSIDs/BSSs, for example Home, Home_Gast and Home_IoT, with a single SSID, for example Home.
Every "old" SSID is attached to a own vlan and i want to use this new feature to squash them into a single SSID with three different PSKs so that depending on the used PSK the client gets attached to one of my three vlans.
The main goal is to save some airtime for the required beacons, but i never got this configuration running.
Has anybody played with this feature and can provide a working config as example?
Especially /etc/config/{wireless,network}.
I've used the following example configs:
/etc/config/network:
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config interface 'lan3'
option type 'bridge'
option ifname 'eth3'
option proto 'static'
option ipaddr '192.168.3.1'
option netmask '255.255.255.0'
option ip6assign '60'
/etc/config/wireless:
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path 'platform/ahb/18100000.wmac'
option htmode 'HT20'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'psk2+ccmp'
option key 'testtest'
config wifi-vlan 'wifi_vlan100'
option iface 'default_radio0'
option name 'lan'
option vid '100'
option network 'lan3'
config wifi-station 'wifi_station100'
option iface 'default_radio0'
option vid '100'
option key 'testtest100'
With this configs i can connect to "OpenWrt" with PSK "testtest" and "testtest100" but for the last one i did not receive a dhcp lease.
With PSK "testest" my device get attached to "lan" and receives a ip from range 192.168.1.0/24.
How can i assign the "wifi_station" to "lan3" (br-lan3) so that the devices gets a ip from range 192.168.3.0/24?
Thanks in advance.
Greets, Johann
[0] https://github.com/openwrt/openwrt/commit/5aa2ddd0d6b9759c62bbb7bb11b72a7f4269c16b
More information about the openwrt-devel
mailing list