I have used hostapd to set up a wireless access point (WAP). My problem is that now and then after a reboot the WAP show up & I can connect, but there is no internet connection on the client PC. On the server side it seems that the static IP for wlan0 is not there.
If I issue a:
"sudo ifconfig wlan0 10.0.0.1/24" the problem is sorted out.
My /etc/network/interfaces file looks like this:
Code:
auto wlan0
iface wlan0 inet static
wireless-power off
address 10.0.0.1
netmask 255.255.255.0
network 10.0.0.0
gateway 10.0.0.1
wpa-essid WAP
This is hostapd.conf:
Code:
interface=wlan0
ssid=mnet6
channel=9
driver=nl80211
ieee80211n=1
hw_mode=g
device_name=AR7010+AR9287
manufacturer=Atheros
wpa=2
wpa_passphrase=SomeNicePassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
# Other settings
beacon_int=100
auth_algs=1
wmm_enabled=1
#TL-WN822N Ver 2.0 Atheros
ht_capab=[HT20][HT40][SHORT-GI-20][SHORT-GI-40][RX-STBC1][TX-STBC][DSSS_CCK-40]
#TL-WN722N Atheros
#ht_capab=[HT20][HT40][SHORT-GI-20][SHORT-GI-40][RX-STBC1][DSSS_CCK-40]
#RT5370
#ht_capab=[HT20][HT40][SHORT-GI-20][SHORT-GI-40][GF][SMPS-STATIC][RX-STBC1]
I use dnsmaq as the DHCP server.
/etc/dnsmasq.conf
Code:
no-resolv
no-poll
cache-size=4096
server=8.8.8.8
server=8.8.4.4
interface=wlan0
dhcp-range=10.0.0.100,10.0.0.200,255.255.255.0,12h
I know I could probably do a band-aid fix by adding "
ifconfig wlan0 10.0.0.1/24" to /etc/rc.local but I would appreciate it if someone has an idea of what the correct way would be of fixing this.
Regards,
Stefan