-   Linux - Wireless Networking (
-   -   Connect to WPA2 protected network with no X (

penyuan 11-27-2011 09:15 PM

Connect to WPA2 protected network with no X

I have a WPA2 Personal protected wireless network setup in my apartment with dhcp (for the sake of this question, let's call it ESSID=mynetwork, passphrase=mypassphrase), and I would like to connect my Lemote Yeeloong netbook running Debian Wheezy to it. The system already has wpasupplicant and wireless-tools installed.

Running "iwconfig" says that wlan0 "Tx-Power=0 dBm". I can confirm my physical wireless on/off switch works because when I switch it off, iwconfig would say my wlan0 is "off".

Running "ifconfig" only shows me the lo and eth0 interfaces, no wlan0.

I tried adding the following to my /etc/network/interfaces:


auto wlan0
iface wlan0 inet dhcp
wpa-ssid mynetwork
wpa-pak mypassphrase

I tried running "ifup wlan0", but it seems to have trouble with dhcp:

Notice that the DHCPDISCOVER lines say its trying to connect to, but my wireless router has an LAN IP of (and clients get 10.0.1.x), might this be the problem??

The above are all specific to my apartment's network. How do I setup my system so that it can also join public networks such as those in the library/cafes, etc.?

Anyway, I can't get my wireless to work, and would appreciate any help you can provide. Thanks!

BTW, I currently don't have X installed, so everything needs to be done in the console.

fukawi1 11-27-2011 11:36 PM

Before trying to configure it to start automatically, get it working first.

You need to use iwconfig to configure how the host should connect to the AP. There are plenty of howto's online.


man iwconfig

penyuan 11-30-2011 01:06 PM

More info
Here are screenshots of the steps I tried.

(1) These are the output from ifconfig and iwconfig initially:

(2) Then I tried the command "ifup wlan0", and this is when DHCP seems to fail:

(3) After trying "ifup wlan0", I looked at the output from ifconfig and iwconfig again:

Also, here is my /etc/network/interfaces file:


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

#auto wlan0
iface wlan0 inet dhcp
        wpa-ssid mynetwork
        wpa-pak mypassphrase

Can anyone help with this? Thanks.

All times are GMT -5. The time now is 06:05 AM.