From owner-freebsd-wireless@freebsd.org Fri Oct 16 10:50:21 2015 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 402E3A12A21 for ; Fri, 16 Oct 2015 10:50:21 +0000 (UTC) (envelope-from Willem@Offermans.Rompen.nl) Received: from cpsmtpb-ews01.kpnxchange.com (cpsmtpb-ews01.kpnxchange.com [213.75.39.4]) by mx1.freebsd.org (Postfix) with ESMTP id A3CDD1270 for ; Fri, 16 Oct 2015 10:50:16 +0000 (UTC) (envelope-from Willem@Offermans.Rompen.nl) Received: from cpsps-ews11.kpnxchange.com ([10.94.84.178]) by cpsmtpb-ews01.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Fri, 16 Oct 2015 12:47:56 +0200 Received: from CPSMTPM-CMT102.kpnxchange.com ([195.121.3.18]) by cpsps-ews11.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Fri, 16 Oct 2015 12:47:55 +0200 Received: from donald.offrom.nl ([77.164.21.27]) by CPSMTPM-CMT102.kpnxchange.com over TLS secured channel with Microsoft SMTPSVC(7.0.6002.18264); Fri, 16 Oct 2015 12:47:55 +0200 Received: from squid (squid.vpn.offrom.nl [10.168.0.72]) by donald.offrom.nl (8.15.2/8.14.9) with ESMTPS id t9GAlnE8041956 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Fri, 16 Oct 2015 12:47:49 +0200 (CEST) (envelope-from Willem@Offermans.Rompen.nl) Received: from willy by squid with local (Exim 4.80) (envelope-from ) id 1Zn2Y3-0008Iw-Rr for freebsd-wireless@FreeBSD.org; Fri, 16 Oct 2015 12:47:43 +0200 Date: Fri, 16 Oct 2015 12:47:43 +0200 From: Willem Offermans To: freebsd-wireless@FreeBSD.org Subject: multiple ssid with hostap Message-ID: <20151016104743.GA29078@vpn.offrom.nl> Reply-To: Willem@Offermans.Rompen.nl MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on donald.offrom.nl X-OriginalArrivalTime: 16 Oct 2015 10:47:55.0339 (UTC) FILETIME=[1D3379B0:01D10800] X-RcptDomain: FreeBSD.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2015 10:50:21 -0000 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_ variable. hostapd(8) will use the settings from /etc/hostapd-.conf'' I don't think that this is totally correct. /etc/hostapd-.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