The Dream of Community Hotspots

Spontaneous Community: Ad-Hoc Networks

Virtually everyone who uses Wi-Fi does so by creating an 'infrastructure network' with a wireless access point acting as a hub for one or more wireless client adapters. I've concentrated my discussion on infrastructure mode and infrastructure networks in this book, but there is in fact another way to connect computers via Wi-Fi. I find it interesting that so little has been written about ad hoc mode, which is sometimes called peer-to-peer mode. In ad-hoc mode, wireless client adapters connect to one another directly, without the intermediation of an access point. It's a way to create a spontaneous and usually temporary network community, often when people gather around a table with their laptops for some kind of meeting.

Ad-hoc Wi-Fi networks remind me very much of the early Ethernet days, when all computers were daisy-chained together on a single run of coaxial cable. With ad-hoc networks, all network traffic between any two machines 'passes by' all of them. There's no lightning-quick switched connection created between two computers wishing to communicate, as modern Ethernet switches provide. Multiple file transfers can be going on at once, but the bandwidth of the ad-hoc radio connection is shared by all concurrent file transfers, and eventually too many simultaneous file transfers can bog everything down to a crawl.

That's why even though up to 256 simultaneously connected computers can exist in an ad-hoc network, you're unlikely to get any useful work done with anything close to that many machines sharing a single 11 Mbps connection. I'd suggest keeping it to eight or ten at the very most, especially if an intense activity (such as interactive network gaming or heavy file swapping) is happening across the connection.

An Ad-Hoc Scenario: A Family Genealogy Meeting

Say 'file sharing' to most people, and 'mp3s' follows along with the next breath. You can certainly swap music files using an ad-hoc network, but there are other uses, as you'll realize if you think about it for awhile. Here's a scenario I hope to put together myself someday:

Five cousins are researching their common ancestry, and have 'split up' family lines to research. Each is gathering information and photos of ancestors, ancestral home, and headstones for a common archive, eventually to be placed on CD-ROM. After six months of hard work, everybody gathers around the dining room table at the home of one of the cousins to share their data.

All five have Windows laptops with Wi-Fi client cards. Everybody puts their client adapters in ad-hoc mode, and all five laptops connect in a five-way connection. On all five laptops, the C:\Genealogy folder has been shared. Once it's all set up, the five cousins can sit down at the table and use Windows drag-and-drop to copy photo files and text files from one another's laptops. If they're really sharp, they can use a file-sharing utility like LANster, which provides the old Napster user interface model for file sharing across local area networks rather than the Internet (see Figure 5.1).

click to expand
Figure 5.1: The LANster User Interface.

Lanster is free and may be downloaded from the author's home page:

http://www.warpengine.com/

How to Create an Ad-Hoc Network

To set up an ad-hoc network, you'll need to make sure that all of the client adapters used are configured properly as presented here:

  • All client adapters wishing to connect in ad-hoc mode must be set to the same SSID. Remember, the SSID is the name of the network, not the name of an individual client adapter or access point.

  • All client adapters need to be set to the same channel. If there is an access point or wireless residential gateway in the vicinity, don't use the same channel as the access point or gateway.

  • All client adapters need to be set to operate in ad-hoc mode.

  • In most circumstances, you should leave WEP disabled for all client adapters.

If you're paranoid there's nothing keeping you from running WEP, but key distribution is a hassle, and if the network is temporary it's unlikely that anyone will try to 'break in' while everybody's gathered around a table swapping files.

The best way to make all these things happen is to create a profile for ad-hoc mode. A profile (as I explain in Chapter 7) is a collection of parameters gathered under a descriptive name. When you select and apply a profile, those parameters are imposed on your client adapter. Every client adapter I've ever used allows named profiles to be created, though it's done in a different way (as you might imagine) for every manufacturer's product line. What you should do is create a profile called 'Ad-Hoc,' and in the profile provide an SSID (I suggest 'LANParty'), a channel (I suggest 1), and the correct values for operating mode (ad-hoc) and WEP enable/disable.

If everyone wishing to join the ad-hoc network is within client adapter radio range, booting up and then changing to the 'Ad-hoc' profile should bring everyone into the network so that all machine names and their shares appear in 'Network Neighborhood' or 'Computers Near Me,' depending on your Windows version.

Maybe.

The Curse of the Ad-Hoc People

Ad-hoc mode is part of the 802.11b standard, and theoretically, all Wi-Fi certified client adapters should support it. The problem is that the Wi-Fi Alliance didn't originally include testing for ad-hoc mode in their Wi-Fi logo certification program. This may explain the number of people in my acquaintance who haven't been able to make it work consistently. I regularly see inquiries on various Web forums asking, 'How do I set up an ad-hoc network?' If they have to ask, there's something wrong. If everything's working correctly, ad-hoc networks happen automatically, once you apply your ad-hoc profile that puts your client adapter in ad hoc mode with the proper parameters.

However, as often as not I've had trouble even getting my own machines to gang up in an ad-hoc network. There's never any obvious reason why, but sometimes I have to reboot one of the machines once or twice to get it to cooperate.

Even though at the Wi-Fi level you have a wide-open N-way connection, Windows doesn't always get the I's dotted and the T's crossed. Often you'll see all the machine names in Windows Explorer's 'Computers Near Me' folder, but when you select some of them to see their shares, you'll get an error box that reads 'The network path was not found.' If this happens, reboot the machine you can't reach and try again.

If you encounter difficulty forming an ad-hoc network, make sure that all machines are getting a local IP address from somewhere, and that they're all in the same address block and subnet. Windows XP, once again, is best for wireless networking, with Windows 2000 close behind, and Win98 a distant third. (Don't even try it under Windows 95.) All of these versions support APIPA (Automatic Private IP Addressing) which can be considered a solo computer's fallback equivalent to network DHCP. (I described both in some detail in Chapter 3.)

If no DHCP server is detected at boot time, APIPA takes over and generates a local IP address in the reserved block 169.254.XXX.XXX. Make sure that all machines are using an IP address in the same block and subnet, which ideally should be the default APIPA block of 169.254.XXX.XXX and subnet 255.255.0.0. Typically, in an ad-hoc network no router or DHCP server is available, so all addresses will be assigned individually by APIPA and will be in the same block and subnet. If any are not, you may have to go deeper into the Windows networking machinery to troubleshoot further, and that falls outside the charter of this book.



Jeff Duntemann's Drive-By Wi-Fi Guide
Jeff Duntemanns Drive-By Wi-Fi Guide
ISBN: 1932111743
EAN: 2147483647
Year: 2005
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net