Ad hoc networking
When you’re on the road, your portable Mac is often on its own, cut adrift from the networks it usually relies on for Internet access and file sharing. And while you can often get Net access, one way or another, there are times when you need to share that access, or share files, with your traveling companions. The solution is ad hoc (or computer-to-computer) networking.
An ad hoc network ( ad hoc means “for this purpose”) is a network you create on-the-fly, using direct Ethernet, FireWire, Wi-Fi, or even Bluetooth connections among your Macs. An ad hoc, computer-to-computer network doesn’t rely on a local server, a router, or the Internet to mediate those connections. Instead, OS X (10.1 to 10.4) works out the details all by itself.
An ad hoc network does, of course, have its limits. If you’re using the network to share Internet access, the number of people who can effectively join it will be limited by the amount of available bandwidth. And each connection method has its own limits—for instance, while a FireWire network can handle more than 200 people, a Wi-Fi network might support only ten.
Pick your medium
How you connect your ad hoc network depends on the hardware you have and the speed you need.
FireWire You can create a FireWire network by daisy-chaining laptops (or desktops) together, but you need the right kind of cables. FireWire 400 (400 Mbps) is Apple’s original flavor; the faster FireWire 800 (800 Mbps) was added to professional Mac models in early 2003. Current 15- and 17-inch PowerBooks include one port of each type. For the fastest speed between two PowerBooks, use a FireWire 800 cable to connect them; to daisy-chain multiple PowerBooks, you can use cables that have a FireWire 400 plug on one end and a FireWire 800 plug on the other.
If your network includes iBooks, current 12-inch PowerBooks, or older PowerBooks that each have a single FireWire port, you’ll need a FireWire hub, too. But even with two iBooks, you can create a two-node network using the one port.
As far as Panther and Tiger are concerned, FireWire is just another network connection. Jaguar users used to be able to download a patch that enabled FireWire networking, but Apple has since pulled that download from its developer site.
Ethernet Creating an ad hoc Ethernet network is a snap. But because Macs include just one Ethernet port, you’ll need an Ethernet hub or switch to connect more than two Macs.
With an autosensing Ethernet switch or a newer Mac with autosensing capabilities, you can use any kind of Ethernet cable for computer-to-computer or computer-to-switch connections. Older Macs require a crossover cable, and an older Mac used with an older switch requires a straight-through Ethernet cable. (Find out whether your Mac has autosensing Ethernet.)
Wi-Fi For a wireless ad hoc network, each participant obviously needs an installed Wi-Fi card, but it doesn’t matter which specific Wi-Fi protocol each one uses. If everyone has AirPort Extreme (802.11g), the ad hoc network will run much faster than if even one person is using an older AirPort (802.11b) card.
Bluetooth While Bluetooth is also a reasonable option, its low speed and limited connectivity make it a last resort.
Overall, I recommend FireWire for its speed and flexibility, but because it requires cables, you’ll need to plan in advance. Wi-Fi is a natural second choice because it doesn’t require cables.
Setting up firewire or ethernet
To Panther and Tiger, Ethernet and FireWire are almost the same thing; it’s easy to set up either.
1. Open System Preferences and click on the Network icon.
2. Choose New Location from the Location pop-up menu.
3. Name the new location Ad Hoc (for reference) and click on OK.
4. Click on Apply Now. (This will disable any active network connection you have.)
OS X will create a new location with an entry for each networking interface installed on your machine. If you view the items listed in the Show pop-up menu, you should see AirPort (if you have an AirPort card), Built-in Ethernet, and Built-in FireWire. The default configurations for each should work.
For FireWire, you now daisy-chain your computers, using FireWire cables. For Ethernet, you now connect two computers with a cable, or connect several computers with one or more Ethernet hubs or switches.
Setting up Wi-Fi
Creating an ad hoc wireless network is different from using FireWire or Ethernet but just as easy (see top screenshot;).
1. Click on the AirPort icon in your menu bar. From the AirPort menu, select Create Network.
2. Click on Show Options and encrypt the connection by entering a password as described in the dialog box.
3. Click on OK. The AirPort icon in the system menu bar changes to a little computer in a gray signal field.
4. Each user on your ad hoc network can now select the network that appears in his or her AirPort menu and enter the password you set.
Making the network work
Once all the computers are connected via cable or Wi-Fi, OS X will automatically assign addresses to each one; thanks to Apple’s Bonjour technology (called Rendezvous before Tiger), each address will be unique (see bottom screenshot). (Windows XP can also assign addresses; if you install Bonjour for Windows on a PC, you can use it to take full advantage of the ad hoc network, accessing servers, printers, and file servers.)
In System Preferences, click on the Sharing icon and then on the Services tab. Turn on Personal File Sharing (AppleShare), Windows Sharing (Samba), or FTP Access, depending on which service you want to use. The Network icon in any Finder window lets you browse Bonjour-discoverable servers.
Ad hoc networking isn’t right for every situation. But it’s a great tool for gamers, business travelers, and people who need to pass big files or share an Internet connection when a local network isn’t available.
[ Glenn Fleishman is the author of the Take Control of Sharing Files in Tiger e-book (TidBits Electronic Publishing, 2005). ]To create an ad hoc wireless connection, you fill out the dialog box that appears when you select Create Network from the AirPort menu.OS X automatically assigns your Mac an address that doesn’t conflict with other machines on the network.