CentOS wifi howto setup

Hi,

So here are the instructions for getting the wifi rolling:
——————————————
yum -y install wireless-tools wpa_supplicant dbus
——————————————
ifconfig wlan0 up
iwlist wlan0 scan

record the channel number
ifconfig wlan0 down
——————————————
create /etc/sysconfig/network-scripts/ifcfg-wlan0 with the contents below and the instructions mentioned below:

DEVICE=wlan0
HWADDR=<your-mac-address>
TYPE=Wireless
UUID=<an-optional-uuid> #generate one with uuidgen
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=dhcp
PEERDNS=yes
USERCTL=yes
NETWORKING_IPV6=no
ESSID=<your-ssid> # you should either know this or take it from the iwlist wlan0 scan
CHANNEL=<ssid-channel> #the channel you got from when you ran iwlist wlan0 scan
MODE=Managed
RATE=Auto
——————————————
chkconfig NetworkManager off
——————————————
edit /etc/sysconfig/wpa_supplicant and add the wlan name: INTERFACES=”-iwlan0″
——————————————
load the encrypted passphrase in the supplicant
wpa_passphrase <ssid> <passphrase> >> /etc/wpa_supplicant/wpa_supplicant.conf
——————————————
chkconfig messagebus on
chkconfig wpa_supplicant on
——————————————
If the wireless is the only active option, edit /etc/sysconfig/network-scripts – the configs for ifcfg-eth0 and 1 and set onboot to no, so that the route goes over wifi.
——————————————
reboot

Everything should be good to go.

Leave a Reply