Purpose: WiFi capability is getting common these days and slowly and steadily it is becoming a necessity to have a working WiFi computer. For many people it is rather intimidating when it comes to configuring wireless network in Linux systems. In this post we will learn how to configure a wireless network using graphical tools so that even the beginners can configure a Wireless network in a snap.

Assumptions

As usual we are going to make some basic assumptions before we start configuring wireless network. Here we are assuming that your Linux kernel has already support for your WiFi card which can be either a USB 2.0 Wireless adapter, a PCMCIA wireless card or a built-in WiFi chip which is usually attached to the mini PCI express chip. Getting a Linux kernel to have drivers for your wireless card deserves an entire new blog post and may be I will cover it later.

Also I am using Debian Lenny (5.0) with GNOME and using 2.6.29-1-486 kernel.

Tip

Here is a tip which will save you a lot of time and you will be able to get more out of this blog post. I highly recommend that you use the latest stock kernel from your distro so that there is a greater possibility of having driver support for your Wireless card. If your wireless card is at least a year old then you can pretty much assume that the latest kernel will have a support for it. For example, at the time of this post, I am using the 2.6.29-1-486 Debian stock kernel. The advantages of using a stock kernel is that it comes with almost all the options enabled inside the kernel which greatly increases the chances that almost all the hardware will work with it. Nuf said.

Step 1: Connect your wireless card

Note: This step is only applicable for people who are using an external wireless card like USB or PCMCIA. For those of you who have in-built card they don’t require this step. Simply booting your computer to the Linux environment is enough.

Simply connect your wireless card and boot your system to the GNOME environment.


Step 2: Install wireless utilities

Now install the following utilities which will help you to configure your wireless network.

# apt-get install network-manager-gnome wireless-tools

Now to make sure whether your kernel supports your wireless card or not give the following command:

# iwconfig

Output:

lo        no wireless extensions.
eth0      no wireless extensions.
wmaster0  no wireless extensions.
wlan0     IEEE 802.11bg  ESSID:""
Mode:Managed  Frequency:2.462 GHz  Access Point: 00:22:55:44:AF:70
Bit Rate=54 Mb/s   Tx-Power=27 dBm
Retry min limit:7   RTS thr:off   Fragment thr=2352 B
Power Management:off
Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
Tx excessive retries:0  Invalid misc:0   Missed beacon:0

If you get a similar output as above, especially a wireless interface like “wlan0″ then that’s a great news because we know that your kernel does support your card. Also there are other ways to determine that, like for example, giving the command dmesg and checking for relevant entry for your wireless card.

Another method to see to observe the small LED (light) on your wireless card. If you can see a steady or a blinking light that means that the device is active meaning that the drivers are loaded.

Step 3: Configure your wireless card

Go to “System->Administration->Network” like this:

Wireless network menu

Wireless network menu

and now select the wireless entry (usually at the top) and hit the Properties button as shown below:

Wireless Configuration

Wireless Configuration

Now by default the Enable Roaming Mode checkbox will be enabled.  Un-check that that box and fill in the following fields for your wireless network:

  • ESSID: Name of your wireless network
  • Password type: Type of network you have
  • Network password: – Actual WEP Key

Enter wireless parameters

Enter wireless parameters

Now press OK button and wait for the dialog box to configure the interface. it might take up to 1 minute for it to do that. Now it it done just hit Close button to exit the dialog box.

Step 4: Restart your system

Usually this step is not required but just to be sure I restart my system to make sure that the new changes will take effect properly. Now to be sure I would also disconnect my wired ethernet cable to make sure that i am able to connect to the internet with my wireless card.

Now upon restart the system try visiting a website or ping to a website. Mostly likely you will be able to access the internet.

Step 5: Verify the configuration (optional)

To make sure if your wireless network did get an IP address from your router give the following command:

# iwconfig

Output:

lo        no wireless extensions.
eth0      no wireless extensions.
wmaster0  no wireless extensions.
wlan0     IEEE 802.11bg  ESSID:"test"
Mode:Managed  Frequency:2.462 GHz  Access Point: 00:22:55:44:AF:70
Bit Rate=54 Mb/s   Tx-Power=27 dBm
Retry min limit:7   RTS thr:off   Fragment thr=2352 B
Encryption key:ABCD-1111-598C-F245-D1C7-AA33-B2 Security mode:open
Power Management:off
Link Quality=100/100  Signal level:-6 dBm
Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
Tx excessive retries:0  Invalid misc:0   Missed beacon:0

As you can see above our wireless interface did get the correct parameters. To further confirm if our wireless card (interface) did get a valid DHCP (or static) IP address give the following command:

# ifconfig wlan0

Output:

wlan0     Link encap:Ethernet  HWaddr 00:1e:2a:d1:b1:e8
inet addr:192.168.0.100 Bcast:192.168.0.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:90027 errors:0 dropped:0 overruns:0 frame:0
TX packets:77382 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6256836 (5.9 MiB)  TX bytes:34276389 (32.6 M)

That’s it. A valid IP address (in blue color) above means that you are all ready to surf the web using your brand new shinny wireless card.

In case if you don’t see an IP address in the above output try giving the following command:

# dhclient wlan0

That’s it.

Happy Wireless-ing!

Be Sociable, Share!