Hi In Centos 6.4 to setup a static wireless connection without X,
: see what AP's are around.
Here is a quick example if you want it static: for dynamic, modify this below.
Code:
vim /etc/sysconfig/network-scripts/ifcfg-wlan0
DEVICE="wlan0"
HWADDR="00:00:00:00:00:00"
#NM_CONTROLLED="no"
ONBOOT=yes
PEERDNS=no
#BOOTPROTO=dhcp
IPADDR=192.168.1.119
MASK=255.255.255.0
GATEWAY=192.168.1.1
TYPE=Wireless
USERCTL=yes
NETWORKING_IPV6=no
ESSID=Awesome
CHANNEL=11
MODE=Managed
RATE=Auto
service network restart
ifconfig wlan0
WPA Supplicant:
Good link for Wpa setup:
http://www.pantz.org/software/wpa_su...2andlinux.html
wpa_passphrase Awesome wpasharedpskey
This gives your pre shared key in a secure hash.
Code:
vim /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="Awesome"
scan_ssid=1
key_mgmt=WPA-PSK
psk=79678787897897878hjjbjkbjg6678678678678678678678678678686786
}
Code:
wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 &
: Add -dd on the end of this to Debug, make sure you check it connects.
Make sure you have your ISP / Wireless DNS setup in /etc/resolv.conf as this is a static setup.
: confirm you are all good and ping out to google.com for example as confirmation.
From CLI WEP only:
iwconfig wlan0 essid "My Network" : join the ssid "My Network" this only works with WEP, and not with WPA.
An easier quick solution, would be Install Centos with X, which would have Network Manager, enable it on your wireless device , click the connection enter your password whcih wpa_supplicant would handle and presto you are connected.