HomePage » Linux » LinuxWireless


Wireless network on Linux (with WPA encryption)

Platform: CentOS 5.2
Kernel: 2.6.27.6

Tools you will need
iwconfig: http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
WPA_supplicant: http://hostap.epitest.fi/wpa_supplicant/

Scan usable ssid
I got 20 ssid. Here is the one I'd like to connect to -
> iwlist eth1 scanning
 Cell 01 - Address: 00:1E:8C:59:EE:21
					ESSID:"apop.wifi"
					Protocol:IEEE 802.11bg
					Mode:Master
					Frequency:2.412 GHz (Channel 1)
					Encryption key:on
					Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
							  11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
							  48 Mb/s; 54 Mb/s
					Quality=96/100  Signal level=-29 dBm  
					IE: WPA Version 1
						Group Cipher : TKIP 
						Pairwise Ciphers (1) : TKIP 
						Authentication Suites (1) : PSK  
					Extra: Last beacon: 43ms ago


Setup wireless interface
eth1 = my interface name
essid apop.wiki = my ssid
key open s:xxxx [1] = use open key, ascii password xxxx, key index 1
mode Managed = there are Managed and Ad-hoc
freq 2.412G = what iwlist shows
channel 1 = what iwlist shows
rate 54M = my speed
ap <mac> = my wireless router's id
iwconfig eth1 essid apop.wifi key open s:xxxxx [1] mode Managed freq 2.412G channel 1 rate 54M ap 00:1E:8C:59:EE:21


Activate WPA supplicant
Install WPA_Supplicant if not already.
tar zxvf wpa_supplicant-0.5.10.tar.gz
cd wpa_supplicant-0.5.10
mv configdef .config
edit .config (I enabled ssl on /usr/local)
make && make install


Create a config file
wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

ap_scan=1
fast_reauth=1
eapol_version=1

network={
        ssid="apop.wifi"
        bssid=00:1E:8C:59:EE:21
        mode=0 # managed
        frequency=2412
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        psk="xxx"
        priority=2 # 2 > default = 0
}


Start wpa_supplicant
wpa_supplicant -Dwext -ieth1 -c /etc/wpa_supplicant/wpa_supplicant.conf


Assign IP to interface
This you should know already...

There are 6 comments on this page. [Display comments]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki