Wireless Tips & Tricks: Setting Up an Ad-Hoc Wi-Fi Net

Wireless Tips & Tricks: Setting Up an Ad-Hoc Wi-Fi Net


How do I set up a wireless network between two computers without a router? Can they share an Internet connection this way?

The ability to create a quick and dirty network between two (or more) computers or PDAs is an underutilized Wi-Fi capability that is really quite simple to set up. You can even connect Macs and PCs this way. First, be sure both computers are disconnected from any router. Then set manual IP addresses so that the two computers will be able to see each other on the network (normally a router performs this task). They should each be something like 192.168.2.x, where x is a number from 1 to 255 and different for each computer (more than two computers can be in the ad-hoc group). The subnet mask for each should be 255.255.255.0.

Then open your Wi-Fi adapter setup utility (unless your card has a proprietary setup program, this means opening the Windows Wireless Connection Manager in the Windows XP System Tray or choosing "Create Network" from the AirPort menu in Mac OS X). Then make sure the adapters in each computer are set to "Ad-Hoc" mode (as opposed to "Infrastructure," which is for connecting to routers), with the same SSID (case-sensitive) and channel number. They should also be in the same Wi-Fi mode, such as b, g or enhanced-g, as applicable. A MIMO card in MIMO-only mode won't be able to talk to a plain-g card, for example. Don't bother with encryption if it's just a one-time connection in a non-public place. If you do need encryption for a regular connection, get things working without encryption first, then add the same type of encryption on each end, with the same password.

You can also share an Internet connection with computers on your Ad-Hoc network. In Windows XP, go to the Network Connections control panel, click on the connection you want to share, then choose "Change settings of the connection." Click on the Advanced tab, and then turn on Internet Connection Sharing. In Mac OS X, open the Sharing control panel in OS X and click the Internet tab, then turn on sharing. Note that you do this ONLY on the computer that is physically connected to the Internet, not on the computers that will share the connection. This is also a great way to share a hotel room Ethernet connection.