Configuring additional interfaces

Steffen Dettmer steffen.dettmer
Thu Sep 19 06:15:08 PDT 2013


Hi,

short:
Mulitple SSID on multiple bssid work, except that I have to configure
my IP addresses again after starting hostapd (they get lost because
hostapd re-creates the interfaces) and I do not know how to do it
correctly. Manual configuration works fine, but of course it should be
done safely by an application and I cannot use ifup for various
reasons.

How configure IP addresses of the added interfaces?

Any help appreciated!


detailed:
I have an embedded Linux device using hostapd. It comes with a
detailed commented configuration file, is fast and powerful. Following
tutorials, setting up an access point using Debian mechanisms
(/etc/network/interfaces, ifup...) worked, so hardware and drivers
should be fine.

Now I like to add multiple bssids. Their values are specified by a
derivation scheme (hash of some data like SSID+MAC).

A tutorial suggested:

iw phy phy0 interface add myAcc type __ap
ifconfig myAcc hw ether 02:0e:8e:43:33:ff
ifconfig myAcc 10.27.9.1/24 up

for each interface. All commands succeed (I found no documentation
about type "__ap", but it is accepted by iw).

When starting hostapd, the IP addresses of the interfaces get lost.

Using debug log shows that hostapd deletes and re-creates the
interfaces, which explains why IP addresses are lost. Also
isc-dhcp-server seems to have difficulties and a restart might be
needed.

I noticed that interfaces are created and even HW addresses are set
when specifying "bss=mydevX", so it is not needed to execute "ifconfig
wlan0 hw ether <MAC addr>" as in the example hostapd.conf, is this
correct?

Shall I configure interfaces (IP addresses) after starting hostapd?
How do I synchronize not to configure too early?
Does hostapd calls some scripts to configure the interfaces or how is
it inteded to work?
Or is there simply some "ip=1.2.3.4/24" option that I miss?

I googled around a lot but surprisingly found no answer to my basic
question, so I hope you will find some time to give me a few hints,
that would be very appreciated!

Best regards,

Steffen


I'm using hostapd v1.0 (from Debian 7).
2 x Atheros Communications Inc. AR9300 Wireless LAN adaptor (rev 01).

Following config:

# Generated automatically, do not edit!
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

driver=nl80211
hw_mode=g
channel=6
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40]
channel=9

interface=wlan0

bss=myAcc
bssid=02:fe:8e:43:33:ff
ssid=sky1
wpa=0

bss=myAcc2
bssid=02:fe:8e:43:33:fe
ssid=sky2
wpa=0

# ...myAcc10...


Kernel:
3.2.0-4-686-pae #1 SMP Debian 3.2.46-1 i686 GNU/Linux

Atheros driver from backports:
[82776.259367] Loading modules backported from Linux version v3.10-0-g8bb495e
[82776.259387] Backport generated by backports.git v3.10-2-0-ga29c78e
[82776.298033] cfg80211: Calling CRDA to update world regulatory domain
[82776.388435] ath9k 0000:01:00.0: setting latency timer to 64
[82776.501737] ath: EEPROM regdomain: 0x6a
[82776.501744] ath: EEPROM indicates we should expect a direct regpair map
[82776.501752] ath: Country alpha2 being used: 00
[82776.501756] ath: Regpair used: 0x6a
[82776.504802] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[82776.508458] Registered led device: ath9k-phy0
[82776.508475] ieee80211 phy0: Atheros AR9300 Rev:3 mem=0xf86c0000, irq=16
[82776.508547] ath9k 0000:07:00.0: setting latency timer to 64
[82776.622318] ath: EEPROM regdomain: 0x6a
[82776.622325] ath: EEPROM indicates we should expect a direct regpair map
[82776.622333] ath: Country alpha2 being used: 00
[82776.622337] ath: Regpair used: 0x6a
[82776.626129] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[82776.629888] Registered led device: ath9k-phy1
[82776.629905] ieee80211 phy1: Atheros AR9300 Rev:3 mem=0xf8ac0000, irq=18



More information about the Hostap mailing list