multiple ssid with hostap
Willem Offermans
Willem at Offermans.Rompen.nl
Fri Oct 16 10:50:21 UTC 2015
Dear FreeBSD friends,
To enable multiple SSIDs by hostapd, I needed to do the following:
1) add to rc.conf:
wlans_ath0="wlan0 wlan1 ..."
create_args_wlan0="wlanmode hostap"
create_args_wlan1="wlanmode hostap"
...
ifconfig_wlan0="inet 192.168.x.y netmask 255.255.255.0 ssid Wifi0 mode 11ng channel 1"
ifconfig_wlan1="inet 192.168.a.b netmask 255.255.255.0 ssid Wifi1 mode 11ng channel 7"
...
2) create the following files:
/etc/hostapd-wlan0.conf
/etc/hostapd-wlan1.conf
look for documentation to setup above configuration files, for
example:
http://w1.fi/cgit/hostap/plain/hostapd/hostapd.conf
man hostapd.conf
3) change /etc/rc.d/hostapd by adding:
conf_file="/etc/${name}-wlan0.conf /etc/${name}-wlan1.conf"
Do this BEFORE the following line in /etc/rc.d/hostapd
command_args="-P ${pidfile} -B ${conf_file}" in the file
First of all, this procedure is not well documented.
``man hostapd'' does not explain the possibility of multiple config files.
Can this be changed?
Secondly, I don't like the hack in /etc/rc.d/hostapd. Can we change
/etc/rc.d/hostapd in a way that /etc/hostapd-wlan0.conf and
/etc/hostapd-wlan1.conf are searched for and automagically added in
${conf_file}"?
Out of ``man rc.conf'':
`` On the other hand, if you want to configure your wireless interface with
hostapd(8), you need to add ``HOSTAP'' to the ifconfig_<interface> variable.
hostapd(8) will use the settings from /etc/hostapd-<interface>.conf''
I don't think that this is totally correct. /etc/hostapd-<interface>.conf
will not be used without a change to /etc/rc.d/hostapd.
--
Met vriendelijke groeten,
With kind regards,
Mit freundlichen Gruessen,
De jrus wah,
Will
*************************************
W.K. Offermans
More information about the freebsd-wireless
mailing list