Snazim se v Ubuntu (12.04, x86 server, jadro 3.2.0) vytvorit 2 AP na jedne WiFi karte, ale porad mi to nejde. :-(
root@ap:/etc/hostapd# lspci -k | grep -A 3 -i "network"
00:0c.0 Network controller: Atheros Communications Inc. AR922X Wireless Network Adapter (rev 01)
Subsystem: Atheros Communications Inc. Device 2091
Kernel driver in use: ath9k
Kernel modules: ath9k
root@ap:/etc/hostapd#
Pro 1 AP to funguje:
root@ap:/etc/hostapd# cat hostapd.conf
interface=wlan0
driver=nl80211
wpa=2
wpa_key_mgmt=WPA-EAP
wpa_pairwise=CCMP
hw_mode=g
channel=13
ssid=TEST
ieee8021x=1
eap_server=0
own_ip_addr=127.0.0.1
auth_server_addr=127.0.0.1
auth_server_port=1812
auth_server_shared_secret=testing123
eapol_key_index_workaround=1
wme_enabled=1
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40]
root@ap:/etc/hostapd#
root@ap:/etc/hostapd# iwconfig
lo no wireless extensions.
eth1 no wireless extensions.
wlan0 IEEE 802.11bgn Mode:Master Frequency:2.472 GHz Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
eth0 no wireless extensions.
mon.wlan0 IEEE 802.11bgn Mode:Monitor Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
root@ap:/etc/hostapd#
Kdyz ale vytvorim nove wifi rozhrani (to se vytvori v poradku):
root@ap:/etc/hostapd# iw phy phy0 interface add wifi0 type managed
root@ap:/etc/hostapd# iwconfig
wifi0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
lo no wireless extensions.
eth1 no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
eth0 no wireless extensions.
root@ap:/etc/hostapd#
root@ap:/etc/hostapd# cat hostapd2.conf
interface=wifi0
driver=nl80211
wpa=2
wpa_key_mgmt=WPA-EAP
wpa_pairwise=CCMP
hw_mode=g
channel=13
ssid=TEST2
ieee8021x=1
eap_server=0
own_ip_addr=127.0.0.1
auth_server_addr=127.0.0.1
auth_server_port=1812
auth_server_shared_secret=testing123
eapol_key_index_workaround=1
wme_enabled=1
ieee80211n=1
ht_capab=[HT40-][SHORT-GI-40][DSSS_CCK-40]
root@ap:/etc/hostapd#
tak se nepodari spustit hostapd:
root@ap:/etc/hostapd# hostapd -dd hostapd2.conf
Configuration file: hostapd2.conf
nl80211: Add own interface ifindex 13
nl80211: New interface mon.wifi0 created: ifindex=15
nl80211: Add own interface ifindex 15
Could not set interface wifi0 flags: Name not unique on network
nl80211: Remove interface ifindex=15
nl80211 driver initialization failed.
ELOOP: remaining socket: sock=4 eloop_data=0x9ff8908 user_data=0x9ff8ee0 handler=0x807c5e0
ELOOP: remaining socket: sock=6 eloop_data=0x9ffac70 user_data=(nil) handler=0x8086770
root@ap:/etc/hostapd#
ale po padu hostapd zustane wifi0 prepla na mode master:
root@ap:/etc/hostapd# iwconfig
wifi0 IEEE 802.11bgn Mode:Master Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
lo no wireless extensions.
eth1 no wireless extensions.
wlan0 IEEE 802.11bgn Mode:Master Frequency:2.472 GHz Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
eth0 no wireless extensions.
mon.wlan0 IEEE 802.11bgn Mode:Monitor Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
root@ap:/etc/hostapd#
Kdyz se snazim primo pridat master wifi, tak to nejde, ale kdyz tam napisu
__ap (v odakzu je to bod 8 ), tak se prida:
root@ap:~# iw phy phy0 interface add wifi0 type master
You need to run a management daemon, e.g. hostapd,
see http://wireless.kernel.org/en/users/Documentation/hostapd
for more information on how to do that.
root@ap:~# iw phy phy0 interface add wifi1 type __ap
root@ap:~# iwconfig
lo no wireless extensions.
eth1 no wireless extensions.
wlan0 IEEE 802.11bgn Mode:Master Frequency:2.472 GHz Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
eth0 no wireless extensions.
mon.wlan0 IEEE 802.11bgn Mode:Monitor Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
wifi1 IEEE 802.11bgn Mode:Master Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
root@ap:~#
Jak je to mozne? Ale hostapd spadne se stejnou chybou?
Mate nekdo tuseni, kde delam chybu? Jak se daji udelat 2 AP na jedne fyzicke wifi karte?