Building a Wireless Network with Linux
Wireless networking has been around for a while, but until recently, it was out of reach for Linux users with modest means. Fortunately, a number of manufacturers are beginning to see new venues in marketing inexpensive wireless hardware. One manufacturer, Webgear, Inc., recently introduced a Linux-compatible wireless networking kit.
In this article, I will show how to create an inexpensive wireless network and a wireless networking bridge using Webgear's Aviator 2.4 wireless networking kit, IP masquerading, software routing, a surplus laptop and Linux.
Webgear's Aviator 2.4 wireless kit consists of two Type II PCMCIA cards and two ISA PCMCIA card slots. The kit uses 2.4GHz radio technology to offer 2MBps networking using IEEE 802.11 specifications (frequency-hopping, spread-spectrum networking). The cards appear as Ethernet devices, such as eth0 or eth1, when installed and configured. The original intent of the kit is to offer the ability to create a high-speed wireless link between two desktop PCs, two laptops, or a laptop and desktop PC.
Although the kit is advertised as supporting Linux, it comes with software drivers for only Microsoft operating systems. You'll have to download the Linux device driver, a loadable kernel module named ray_cs.o, from the Web. Even though you can get a stable version through Webgear's support link at www.webgear.com/support/software_top.html, the best place to download the latest version is from the author's web site (see Resources).
Thanks to the generosity of the author, Corey Thomas, you can use the Aviator 2.4 (or more expensive Aviator Pro or Raytheon Raylink series) wireless system with Linux. I downloaded the latest driver, ray_cs version 1.68, onto one of my laptops, then followed his directions on building and installing the driver:
cp ray_cs-1.68.tgz /usr/src/linux/pcmcia-cs-3.1.5 tar xvzf ray_cs-1.68.tgz make config make all make install
These steps should then be repeated on another computer. I initially used two laptops to test the connectivity of the cards. This is essential to ensure the cards and software are working correctly. I had great success with a later version of David Hinds' Card Services, pcmcia-cs 3.1.5, along with the next version, pcmcia-cs 3.1.6.
As sold, the kit allows for connection between two wireless points: point A-->point B.
Before enabling the cards, you must first edit /etc/pcmcia/config.opts and insert the line
Upon starting, Card Services will then read in the ray_cs.opts configuration file for the wireless cards (ray_cs.opts is copied into the /etc/pcmcia directory as part of make install). This file contains several important settings, in the form of setup strings, used to configure the Aviator 2.4 card after insertion. The settings line (there are several, as the driver supports at least three different wireless cards) I used was:
module "ray_cs" opts "pc_debug=2 essid=LINUX\ hop_dwell=128 beacon_period=256 translate=1"Make sure to use the same settings for each end of the wireless connection. The pc_debug=2 option is a handy way to get more information from /var/log/messages upon insertion or removal of the card. The essid=LINUX option designates a network name of LINUX for the wireless cards (according to Webgear, 61 cards may be on the same network). After installing and configuring the software, I used Red Hat's netcfg tool to create an eth0 interface on each laptop. You can also create your own by editing the /etc/sysconfig/network-scripts/ifcfg-eth0 file:
DEVICE=eth0 IPADDR=192.168.2.37 NETMASK=255.255.255.0 NETWORK=192.168.2.0 BROADCAST=192.168.2.255 ONBOOT=yes BOOTPROTO=none USERCTL=noThe cards must be started sequentially. I went to the first laptop, ensured Card Services was running (you can do an /etc/rc.d/init.d/pcmcia start), then inserted one of the Aviator cards. Upon hearing two beeps, I looked at the output of /var/log/messages (not all the output is shown here):
$Id: ray_cs.c,v 1.68 1999/11/21 10:43:35 corey Exp $-Corey Thomas firstname.lastname@example.org ray_cs Detected: WebGear PC Card WLAN Adapter Version 4.88 Jan 1999 eth0: RayLink, irq 4, hw_addr 00:00:8F:48:E8:DB ray_cs interrupt network "LINUX" startedThe important thing to look for is the “started” string. I then enabled the interface using netcfg, as according to Thomas, you cannot use the ifconfig command to set the IP address using the ray_cs driver. I then went to the other laptop, inserted the other Aviator card, listened for the two beeps, and looked at /var/log/messages:
$Id: ray_cs.c,v 1.68 1999/11/21 10:43:35 corey Exp $-Corey Thomas email@example.com ray_cs Detected: WebGear PC Card WLAN Adapter Version 4.88 Jan 1999 eth0: RayLink, irq 10, hw_addr 00:00:8F:48:E8:45 ray_cs interrupt network "LINUX" joinedAgain, the important string to look for is “joined”. This means the cards are communicating. I then enabled the eth0 interface, and voil<\#224>--I could use ping, telnet, ftp and talk between the two laptops wirelessly. FTP file transfers were about 180K per second, and that speed is reasonable enough for remote X11 client launching. This shows that Linux can be used to support wireless networking in a variety of situations where cabled installations are impractical or unnecessary.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- Linux Systems Administrator
- New Products
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Have you tried Boxen? It's a
3 hours 49 min ago
- seo services in india
8 hours 21 min ago
- For KDE install kio-mtp
8 hours 22 min ago
- Evernote is much more...
10 hours 22 min ago
- Reply to comment | Linux Journal
19 hours 7 min ago
- Dynamic DNS
19 hours 41 min ago
- Reply to comment | Linux Journal
20 hours 40 min ago
- Reply to comment | Linux Journal
21 hours 30 min ago
- Not free anymore
1 day 1 hour ago
1 day 5 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?