≡ Menu

Wireless networking

Comparison of open source wireless drivers

This wikipedia article is a handy list of open source wifi drivers. It covers following oses:

=> Linux
=> FreeBSD
=> OpenBSD
=> NetBSD
=> Solaris and OpenSolaris
=> Darwin, OpenDarwin and Mac OS X etc

Comparison of open source wireless drivers

Linux install and configure DLink DWL g 520 – RT61 Wireless LAN PCI Card

The D-Link AirPlusXtremeG DWL-G520 Wireless PCI card is an enhanced 802.11g high-performance, wireless card for desktop computers. It supports high-speed wireless networking of up to 108Mbps.

This card has open source GPL driver. Card comes with RT61 chipset from ralinktech. You need to compile this driver for Linux. Make sure you have gcc compiler installed.

My setup is as follows:

  • Linksys WRT54G Wireless router/802.11g access point at
  • ADSL Router at
  • My Laptop IP (obtained using WRT54G DHCP server)
  • My Desktop system (Static IP
  • Other devices (Mobile, PDA, XBOX 360 etc)
  • Debian Linux

DLINK DWL g520 PCI Wireless card

Step #1: Verify your driver chipset with lspci command

$ lspci


0000:01:00.0 Network controller: RaLink RT2561/RT61 rev B 802.11

Use update-pciids command to fetch the current version of the pci.ids file from the primary distribution site and installs it.
# update-pciids
$ lspci

Step #2: Find out your kernel version ( I am using kernel v2.6)

# uname -r


Step #3: Download driver

Visit ralinktech site to download RT61 chipset driver.

# cd /opt
# wget http://www.ralinktech.com.tw/data/RT61_Linux_STA_Drv1.1.0.0.tar.gz

Step #4: Untar driver, type the following command

# tar -zxvf RT61_Linux_STA_Drv1.0.4.0.tar.gz
# cd RT61_Linux_STA_Drv1.0.4.0.tar.gz

Step #5: Compile driver source code

# cd Module
# cp Makefile.6 Makefile
# make

It will take some time to compile driver source code.

Step #6: Install driver

You need to copy firmware and configuration file to /etc/Wireless/RT61STA/ directory. First, create a directory:

# mkdir -p /etc/Wireless/RT61STA

Now copy binary firmware files:

# cp rt2561.bin /etc/Wireless/RT61STA/
# cp rt2561s.bin /etc/Wireless/RT61STA/
# cp rt2661.bin /etc/Wireless/RT61STA/

Now copy confiugration file:

# cp rt61sta.dat /etc/Wireless/RT61STA/rt61sta.dat
# dos2unix /etc/Wireless/RT61STA/rt61sta.dat

Now copy actual driver (rt61.ko) to your kernel directory:

# cp rt61.ko /lib/modules/$(uname -r)/kernel/drivers/net/wireless

Step #7: Configure card

Next logical step is to load the device driver. If you have Ethernet card disable to avoid problems:

# ifconfig eth0 down
# modprobe rt61

Once driver is loaded, you can activate interface called ra0. With ifconfig command:

# ifconfig ra0 up

To configure a wireless network interface you need to use iwconfig command. This command is part of wireless-tools package. If wireless-tools is not installed use apt-get or yum to install it:

# apt-get install wireless-tools

Now make sure you know the ssid / essid. If you have turned on encryption, you must use the same encryption type and key on both desktop system and the wireless router. You can obtain necessary settings using iwlist command:

# iwlist ra0 scanning


ra0       Scan completed :
           Cell 01 - Address: 00:12:39:6C:D6:8A
                    Encryption key:on

Step #1: Set SSID/ESSID

You need to set ssid/essid. My SSID is nixcraft. The SSID/ESSID is used to identify cells which are part of the same virtual (wireless) network:

# iwconfig ra0 essid nixcraft

Step #2: Set mode

You need to set the operating mode of the PCI card. Use Managed mode that node connects to a network composed of many Access Points (wireless router).

# iwconfig ra0 mode Managed

Step 3: Setup channel

Set the operating frequency or channel in the device.

# iwconfig ra0 channel 6

Step 4: Setup key

Used to manipulate encryption or scrambling keys and security mode (you can obtain security key by opening your web browser and type your routers IP address into address bar):

# iwconfig ra0 key 47b1122774d1xy55a1194lchjk6

You can now ping to wireless router or browser internet and rest of network (if connected).

Step #8: Configure rt61 driver auto-load at boot time

#1: Configure ra0 interface so that it can activated after reboot. Create a wlan.up and wlan.down helper scripts. Download these scripts and copy to /etc/Wireless directory.

#2: Make sure wireless kernel modules (rt61) to load at boot time. Open config file /etc/modules (this file contains the names of kernel modules that are to be loaded at boot time, one per line.):

# vi /etc/modules

Append rt61 module:


Close and save the file.

#3: Configure ra0 ip address:
Open /etc/network/interfaces file:

# vi /etc/network/interfaces

Make sure ra0 interface look like as follows (static IP configuration):

auto ra0
iface ra0 inet static
name Wireless LAN card
post-up /etc/Wireless/wlan.up
post-down /etc/Wireless/wlan.down

Save the file and reboot the system.

Furhter references

  • Official driver site
  • Please read iwconfig, ifconfig and networking related man pages.
  • Please read driver readme file for more information

Linux: Setup as DNS Client / Name Server IP Address

Many new Linux user finds it difficult to setup / modify new name server address (NS1 / NS2).

Local name resolution is done via /etc/hosts file. If you have small network, use /etc/hosts file. DNS (domain name service is accountable for associating domain names with ip address, for example domain yahoo.com is easy to remember than IP address provides better name resolution. To configure Linux as DNS client you need to edit or modify /etc/resolv.conf file. This file defines which name servers to use. You want to setup Linux to browse net or run network services like www or smtp; then you need to point out to correct ISP DNS servers:

/etc/resolv.conf file

In Linux and Unix like computer operating systems, the /etc/resolv.conf configuration file contains information that allows a computer connected to the Internet to convert alpha-numeric names into the numeric IP addresses that are required for access to external network resources on the Internet. The process of converting domain names to IP addresses is called “resolving.”

The resolv.conf file typically contains the IP addresses of nameservers (DNS name resolvers) that attempt to translate names into addresses for any node available on the network.

Setup DNS Name resolution

Steps to configure Linux as DNS client, first login as a root user (use su command):

Step # 1: Open /etc/resolv.conf file:

# vi /etc/resolv.conf

Step #2: Add your ISP nameserver as follows:

search isp.com

Note Max. three nameserver can be used/defined at a time.

Step # 3:Test setup nslookup or dig command:

$ dig www.nixcraft.com
$ nslookup www.nixcraft.com

See also: