HOWTO configure and setup ubuntu wifi connection

WPA Connection - WPA-PSK or WPA2-PSK
You need either your 64bit or 128 bit HEX Key or the ASCII Equivalent of your HEX Key.


sudo ifconfig [interface] down
sudo dhclient -r [interface]
sudo ifconfig [interface] up
sudo iwconfig [interface] essid “ESSID_IN_QUOTES”
sudo iwconfig [interface] key HEX_KEY <<<-------- If using ASCII Equivalent, this is s:ASCII_KEY (please make note of the prefix s:)
****Additional Comand that may be needed -- sudo iwconfig [interface] key open <<<----See note below
sudo iwconfig [interface] mode Managed
sudo dhclient [interface]


sudo iwconfig wlan0 essid "YOUR-AP" key s:XXXXX mode Managed channel auto


RENEW WiFi CONNECTION:
$ ifconfig wlan0 up
$ iwlist wlan0 scanning
$ iwconfig wlan0 essid AP_NAME
# ifconfig wlan0 down
# iwconfig wlan0 essid THE_NAME_OF_AP enc PASSWORD mode Managed channel auto
# ifconfig wlan0 up
# dhclient wlan0


Connect to an Accesspoint
This covers how to connect to an unencrypted or WEP encrypted accesspoint. For WPA encryption, have a look here. The example interface will be called wlan0.


To set up the interface, start by:


 $ ifconfig wlan0 up


If you want, you could scan for an accesspoint first:


 $ iwlist wlan0 scanning


You will then see the available accesspoints, their ESSID's, the frequency, etc.
To associate with an accesspoint (for example "test"), run:


 $ iwconfig wlan0 essid test


Using WEP encryption


If the accesspoint uses WEP, you set the encryption like so:


$ iwconfig wlan0 key s:"the_ascii_key"


Or you can use a hexadecimal key:


$ iwconfig wlan0 key 00000000000


The bits of encryption is determined by the key length. Note that this command, along with the key, can be seen in "ps aux".


Resources:


  1. http://wiki.linuxquestions.org/wiki/Connect_to_a_wireless_local_area_network
  2. http://www.ubuntugeek.com/how-to-troubleshoot-wireless-network-connection-in-ubuntu.html

No comments:

Post a Comment