Create A Wireless Linux LAN
- Hardware: the Access Point, PCI/PCM cards
- Install the Drivers
- De-Activate the eth0 Interface
- Activate the PCI/PCM Cards
- Compiling for RH7.3
- Use the GUI for RH8
- Belkin F5d6020 ver.2 Wireless PC Card
Under RedHat8 & RedHat9 NEW!
- The LDP
- Wireless Lan Resources for Linux
- the drivers can be had here...
- Atmel 2.1.1 Driver for Belkin card c/o SourceFORGE.net
- WPC11 on RH8.0 by the Oldcrank
- Newer Versions of Linksys Hardware (4)
- See Also:
The instructions here will enable you to start up a wireless LAN using el-cheapo Linksys WAP11 wireless access points, WMP11 PCI cards and WPC11 PCMCIA cards (also Belkin F5d6020A). Be advised, the WMP11 PCI requires a version 2.2 PCI bus on your motherboard. Drivers are available pre-compiled for some 2.4 kernels, but you folks with 2.2 kernels will have to compile from the source. If your kernel is older than 2.2.16, you will have compilation trouble. I upgraded all my systems to RedHat7.1, with its 2.4 kernel. The WAP11 defaults to a network address of 192.168.1.250, so all the hosts on your little home network and those connecting through it have to be in the range 192.168.1.1 to 192.168.1.249. I use static IPs so I just changed all my host IPs manually.
The Staples office supply company recently had a sale on Linksys wireless products. A friend of mine instant-messaged me and we placed our orders at the same time, on-line. A few days later, the equipment arrived via UPS. Neat.
WAP11 Wireless Access Point The Wireless Access Point is simply a hub, similar to an ethernet hub, except remote host connection is made not with CAT5 cables, but radio links. Plug one end of a CAT5 cable into the RJ45 jack of the WAP, and the other end into any normal port (not the "uplink" port) of an existing hub on your network, or into the RJ45 plug of your server's LAN network interface card. For our purposes here, no configuration is required to use the WAP with our Linux LAN.
WMP11 Wireless PCI Card Install the WMP11 PCI card in an empty PCI slot and reboot. Inspect your /var/log/messages file:
# tail -300 /var/log/messages
Look carefully for any signs that the card is interfering with existing card IRQs. If there is a conflict there will usually be a warning, or "IRQ also used by..." message. If that is the case, move the card to a different slot, or otherwise illiminate the conflict.
WPC11 Wireless PC Card Do not bother plugging in the PC card until you have installed the driver and set the SSID as described below.
My OS X Mac is physically beside the server, so I did not need to implement wireless for it, I just left it plugged into the existing CAT5 8-port hub. Here is the network configuration after installing the Linksys equipment:
Micron ISP <-- modem --> P2/266 <-- hub --> MacG5/OSX (office) server / | / | / WAP11 /Access Point (kitchen) +-- HPHub/12 <------+ | | (basement) | | +--> WMP11-DellP3/450 +--> generic P200 WMP11 (livingroom) | : | +--> WPC11-Micron GoBook +--> MacG3/OS9 (YOU ARE HERE!!!)
Software: The Drivers
There are RPM versions of the pcmcia driver for RedHat7.1, 7.2, 7.3, 8.0, 9.0 and Mandrake8.1 at the sites shown above, under "References". Simply choose the appropriate RPM for your distribution/kernel and use the package manager (rpm) to install. As "root":
rpm -ivh kernel-wlan*.rpm
PCI cards like the Linksys WMP11 require the newer kernel 2.4.20-31.9 available from fr.rpmfind.net and drivers from linux-wlan-ng. In fact, installing the kernel and drivers as indicated in their respective "install" or README files immediately resulted in success on my Dell/450 with a WMP11 PCI wireless card.
Now, for using the PCMCIA card, open and edit the configuration options file, /etc/pcmcia/wlan-ng.opts . In that file, locate the lines containing "ssid=linux_wlan" and set the ssid to "linksys" for Linksys WAP11 access points, or to whatever the default is for your access point device.
To set up the PCMCIA card for DHCP, first make sure the DHCP client is installed then edit /etc/sysconfig/network-scripts/ifcfg-wlan0:
DEVICE=wlan0 USERCTL=yes ONBOOT=no BOOTPROTO=dhcp
Restart pcmcia and it should query the DHCP server for an IP:
Next, for PCI or PLX cards ONLY, set the alias for the kernel module in the file /etc/modules.conf by adding this line:
alias wlan0 prism2_pci
NOTE: Never alias for the PCMCIA cards, as it is not neccessary, and also it will cause the system to try to bring up wlan0 before the PCMCIA services, which will not work.
De-Activate the Eth0 Interface
When you launch Netscape or Konqueror, or ping, it will now probably try to use the existing eth0 interface because it appears first in the device lists. So, for the desktop computers that still have their ethernet interface dards installed, we now have to deactivate the eth0 interface and not activate it on booting.
Launch the network configurator:
Click on the "Interfaces" tab and select the eth0 interface in the list. Click the "Deactivate" button. Click the "Edit" button, and deselect "Activate interface at boot time".
On laptops, I leave the interface settings alone. The eth0 interface will fail to start on boot, and yet is available just by swapping PCMCIA cards.
Activate the PCI/PCM Cards
PCMCIA Cards During the rpm installation, changes were made to cardctl scripts that should take over and start the card up on insertion. Also, a "wlan0" interface should have been added. Launch your network configurator with:
Click the "Interfaces" tab, and edit the wlan0 interface. Turn off DHCP (select "none" or "static" for interface protocol) and enter this hosts IP address in the box. Save. To activate the PCMCIA card, simply plug it in.
Type ifconfig and see if a wlan0 interface is "up" (active). If it is, you should be able to ping other hosts on your network.
PCI Cards It is a little more difficult for the PCI card, because it is there when you boot, and there is no cardmgr to activate it like for the PCMCIA. When you power up, the PCI card will probably have a steady power-on LED and a blinking "Link" LED. To activate the PCI card, type:
modprobe prism2_pci wlanctl-ng wlan0 lnxreq_autojoin ssid=linksys authtype=opensystem (the response should be:) message=lnxreq_autojoin ssid=linksys authtype=opensystem resultcode=success
If you get a resultcode=error or something else, then start over. At this time, the "Link" LED will come on solid, as it has established link with the WAP11 access point. If you have other than a Linksys WAP, substitute your access point‚?ā¨∆ň?s ssid in the above command. Now type:
ifconfig wlan0 [this host IP address]
For instance, I typed "ifconfig wlan0 192.168.1.5" to bring up my generic Pentium 200 box. You can add those previous three lines above to your /etc/rc.local file to activate the PCI card on boot. It is NOT necessary to do this for the PCMCIA cards.
Again, ping your server or a known host to confirm WLAN operation. You should be good to go.
Compiling for RedHat7.3:
I Installed RH7.3 with the kernel sources. You do not need the pcmcia-cs package, if you are not doing pcmcia drivers.
Download linux-wlan-ng0.1.14-pre2 from FTP Wlan-ng.
Untar the tarball and cd to the linux-wlan-ng0.1.14-pre2 directory.
su to root
make clean make config (say "n" to pcmcia, plx, and usb driver questions, use all other defaults) make all make install
Then edit your /etc/rc.local and add these lines at the bottom: (you can test them from the root command line to see if they work, first)
modprobe prism2_pci wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable wlanctl-ng wlan0 lnxreq_autojoin ssid=linksys authtype=opensystem ifconfig wlan0 192.168.1.5 netmask 255.255.255.0 broadcast 192.168.1.0 route add default gw 192.168.1.1 wlan0
(substitute your default IP and gateway addresses in the above, naturally)
Use the GUI for RedHat8
Well you actually have to do some typing, this is Linux after all... but the hardware installation is the same as noted above.
The wlan-ng driver is not needed for this distribution.
(Post-Nov 2002: Please see also, http://linux.oldcrank.com/tips/wpc11/ for instructions on using wlan-ng with RH8.0)
Insert the WPC11. If you get the high-beep/low-beep, your card was not recognized. Go to the command line as root:
Look for "manfid: 0x..., 0x..." (take note of these addresses). This will appear after the "Instant Wireless Network PC Card" log entry.
Still as root, check the installed modules:
Make sure the following modules loaded:
orinoco_cs orinoco hermes
Create the file /etc/pcmcia/hermes.conf and put this in it:
device "orinoco_cs" class "network" module "hermes", "orinoco", "orinoco_cs" # LinkSys WPC11 card "Instant Wireless Network PC Card" manfid 0x0156,0x0002 #Substitute your addresses here bind "orinoco_cs"
Restart pcmcia from the command line (as root):
You should hear two high-beeps as the system recognizes your card.
Now we go to the GUI! Foot-Menu>System Settings>Network
(you can run this as a user, but you will have to supply the root password)
Select the Devices tab and click "Add..."
Select Device Type - Wireless connection
Select Wireless Device - Other Wireless Card
Select Ethernet Adapter - Adapter: Lucent Orinoco and Prism II-based PCMCIA Wireless Device: (eth0-7)
Configure Wireless Connection - If you are not using WEP (encryption), just click "Forward". Otherwise, enter your 64 or 128 bit key in the "Key" block, using the following format: xx:xx:xx:xx:xx ...
Configure Network Settings - Select DHCP or Static IP (and add your IP info).
Create Wireless Device - Check settings and click "Apply" if correct. Otherwise, go back and make appropriate changes.
At this point, you will be back at the "Devices" tab and should see your new device listed. Select the device and click "Activate". After a few seconds, you should see your wireless card show an active status.
If you want the card to come up at boot:
- Click "Edit..."
- Click the checkbox labelled "Activate device when computer starts."
- Click "OK."
You will get some errors at boot, but ignore them. The card will eventually initialize and connect :) If you are sensitive to such things just log in as root and issue the command:
mv /etc/rc.d/rc5.d/S24pcmcia /etc/rc.d/rc5.d/S09pcmcia
...so that the PCMCIA startup script runs before the network scripts try to make a network connection.
I chose not to activate at boot on my laptop. At home I connect with a static IP, and when away, I usually connect with DHCP to wireless networks. I created two interfaces, "eth0" for DHCP (get IP from server) and "eth0:1" for fixed IP when at home. I created two hidden scripts in my user home directory to select the interface I wish to use from the command line.
For an away DHCP connection:
\n.dhcp" script: sudo /etc/rc.d/init.d/pcmcia start ifup eth0
For a home connection:
\n.home" script: sudo /etc/rc.d/init.d/pcmcia start ifup eth0:1
I then appended an alias for each script to my .bashrc file:
echo "alias netdhcp="./.dhcp" >> .bashrc echo "alias nethome="./.home" >> .bashrc
Belkin F5d6020 ver.2 Wireless PC Card Under RedHat8 & RedHat9
My Linksys WPC11 gave up the ghost just over a year into its meager life. It did not go out like a light, though. It began refusing to accept initialization from /etc/pcmcia scripts, sometimes requiring several
commands to get it going. At other times it would work well. (I later disassembled the card and found that a tiny surface-mount capacitor near the antenna circuitry had come off the board and was adrift in the antenna compartment of the package; at a younger age, I might have been able to re-solder it.)
Looking around for a new card, I found that a (now defunct) e-com site I programmed for, www.Gadget-Zone.com(now defunct), carried a Belkin F5d6020. Of course, I get wholesale pricing there so I started researching the Belkin card information. The first shot out of the bag at Google gave me a message post (I do not know how long that will be a valid link) which noted that the card used the Atmel AT76C502A chipset, and also listed the driver for that chipset as being available from SourceFORGE.net (<a href="http://atmelwlandriver.sourceforge.net" target="_blank">http://atmelwlandriver.sourceforge.net). I found and downloaded the source tarball for version 2.1.1.
To unpack the tarball which was bzip2ed, I typed:
bzcat atmelwlandriver.2.1.1.tar.bz2 | tar xv
Important! Redhat made a slight but deadly change to the Linux source path that will cause catastrophic failure of pcmcia functionality unless you do the following step: Move into the atmelwlandriver/scripts/ directory and edit the file setup.sh. Find the line defining the path to the pcmcia driver library. In version 2.1.1 it was line 61, and looked like this:
This "pcmcia" in RedHat 9 is a binary, not a directory. Change the line to read:
Now "cd .." up one level to peruse the README file for instructions, which turn out to be the standard (as root):
make config << answer "n" to "Build all?", then answer "y" to only the pcmcia and rfmd questions. make clean make all make install
I issued the command:
To determine the cards identity. Now I entered the card's response information into the /etc/pcmcia/atmel.conf driver configuration file (notice that I combined the card's responses into one line):
card "Belkin 11Mbps-Wireless-Notebook-Network-Adapter" manfid 0x01bf, 0x3302 bind "pcmf502rd"
... and issued the command, "/etc/rc.d/init.d/pcmcia restart" which succeeded. At this point an "ifconfig" command showed that the card was indeed "up" and associated with device eth0, and had obtained an IP address from my DHCP server. I pinged Google.com, and saw that it was good.
And seeing that it was good, and that I was differentiated in the internet universe, I rested.
- LEDs on remotes never stop blinking:
- The SSIDs do not match, your PCI or PCM card is too far from the WAP, the WAP antennas are incorrectly installed or angled, the WAP is too far out of the plane of the coverage area (too high, too low), large metal or organic matter mass between remote and WAP, WEP is enabled on the WAP but not on the remotes, the WAP is defective. Also, if you are using wlan-ng drivers, check your /etc/sysconfig/network-scripts/ifcfg-wlan0 file, and reset it to what I gave you above if it has been overwritten.
- Cannot ping the WAP:
- Bad IP address, IP address/network IP mismatch, bad connection to the hub.
- Solid remote LED, but no ping:
- Bad remote host IP address or IP address/network IP mismatch, mismatched channels (unlikely if you purchased all the equipment from the same place. Channels are assigned to geographic usage areas.)
- Cannot reach through your gateway:
- Do "route" and see if there is either NO "default" route, or two of them. I there is none, do "route add default gw 192.168.11.1" (substitute your router's IP address or host name, if you have an entry for it in /etc/hosts). If there is already a default, and it does not have a correct IP entry under the "Gateway" column, then you must first delete the current default and then add one as above. To delete the current defaults, do "route del default" as many times as there are defaults. On RedHat systems, you can use the netcfg (or later version- neat) utility to do this. On one system I also had to make the entries: "GATEWAY=192.168.1.1" and "GATEWAYDEV=wlan0" in /etc/sysconfig/network.
- None of your PCMCIA cards will work now under RedHat9:
- You may have missed the important step about correcting the install script for the Atmel driver under RedHat 9, above.
Credits: Thanks to my gurus; Loran, for the RH8 screenshots and who got his stuff a day earlier and had some of this already written down, and Robin, who is not quite so patient but really wanted to see the $300 expense justified so she did not have to return it!.