For those of you who are not familiar how to setup wireless or wifi in linux, i'll show the simple way to do that. The first thing, you need to know your wifi hardware cards, whether PCI or USB, your chipset is support or not. If your chipset is support with linux driver, you're safe, if not get ready to scratch your head. I try to show here specific using Atheros chipset, but it may can apply in other chipset, just change the chipset name. Firstly install all the needed package using assistant-module. Please put non-free in your /etc/apt/source.list
# aptitute install module-assistant madwifi madwifi-tools
# module-assistant a-i madwifi
Done!
unpack
Get your hardware information.
#lspci -nn
01:02.0 Ethernet controller [0200]: Atheros Communications, Inc. AR5212 802.11abg NIC [168c:0013] (rev 01)
From the information above, i know i'm using Atheros chipset, in kernel module they known as ath_pci. Please refer this.
#modprobe ath_pci
# lsmod | grep ath_pci
ath_pci 83008 0
ath_rate_sample 12992 1 ath_pci
wlan 173820 4 wlan_scan_sta,ath_pci,ath_rate_sample
ath_hal 191664 3 ath_pci,ath_rate_sample
Then you need configure your card. The most commonly used command in wireless tools is iwconfig, which you can use to configure most of the wireless parameters, including the SSID and the wireless mode. For the wireless mode, Managed means that there is a wireless access point (WAP) on the network and Ad-hoc signifies that there is none. For example my NIC is named ath0 and my ESSID is yournetwork.
#iwconfig ath0 mode Managed
#iwconfig ath0 essid yournetwork
# iwconfig ath0
ath0 IEEE 802.11g ESSID:"yournetwork"
Mode:Managed Frequency:2.427 GHz Access Point: 00:1C:F0:62:9E:21
Bit Rate:24 Mb/s Tx-Power:14 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
......................
But you need to put all those above setting permanently in your network config setting. For Red Hat/Fedora user, you can put those setting in /etc/sysconfig/network-scripts/ifcfg-ath0. For Debian user you can put those network setting in /etc/network/interfaces. Because i'm using Debian, here my setting
# File /etc/network/interfaces
#The loopback network interface
auto lo
iface lo inet loopback
#My Wifi
iface ath0 inet static
address 192.168.1.1
netmask 255.255.255.0
wireless-essid yournetwork
gateway 192.168.1.1
In this example interface eth0 uses an ESSID of yournetwork. This is the basic step to configure Wifi on your network. I'll show you how to configure WEP and WPA encryption in next the post. Restart your network /etc/init.d/networking restart and now your can start surfing using wifi :)







