I try to connect a public password-less wifi network. My /etc/network/interfaces file is

auto wlan0
iface wlan0 inet dhcp
    wireless-essid asd

I did

# ifup wlan0

But i couldn't get ip from dhcp, it says as: No DHCPOFFERS received. I can connect with wpa_supplicant to my wpa2 home network, but i couldn't connect my school's public network.

--Edit-- I can see the network with :

# iwlist scan

--Edit2-- After restart, it connected the network and internet, but after 10 minutes, disconnected from internet but not from the network(I can see the gateway IP).

up vote 1 down vote accepted

I found the answer , I added allow-hotplug wlan0

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
    wireless-essid asd

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.