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 (
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.
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.
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
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.
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.
Open System Preferences and click on the Network icon.
Choose New Location from the Location pop-up menu.
Name the new location Ad Hoc (for reference) and click on OK.
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;).
Click on the AirPort icon in your menu bar. From the AirPort menu, select Create Network.
Click on Show Options and encrypt the connection by entering a password as described in the dialog box.
Click on OK. The AirPort icon in the system menu bar changes to a little computer in a gray signal field.
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.
The trouble with Bluetooth
Bluetooth adapters are a standard feature in PowerBooks and an option for iBooks. The more widely available version of Bluetooth pushes 1 Mbps of data across a short-range network; the newer Bluetooth 2.0+EDR runs at 3 Mbps. Bluetooth has some advantages in moving files around, but its speed might limit its utility.
Because Bluetooth requires special software, you cannot mix Bluetooth with one of the other connection methods discussed in this article.
To connect machines over Bluetooth, you first must pair them. The pairing process securely makes sure that both computers want to talk to each other. Once that’s accomplished, the two machines use Bluetooth File Exchange (Applications: Utilities) to transfer files.
Unlike with the other aforementioned ad hoc networks, only two computers can exchange data at a time; however, you can set up pair relationships between multiple computers.
Hooking up your ad hoc network to the Internet turns it into a standard LAN (local area network). Because you can use only one Ethernet or Wi-Fi interface at a time, if you’re connecting to the Net via Ethernet, you’ll have to share access with your ad hoc network via Wi-Fi (and vice versa). (Adding a second Ethernet port via a PC Card will work, but OS X can’t seem to handle a second Wi-Fi adapter.)
To connect to the Internet via Ethernet or Wi-Fi, follow these steps:
Open System Preferences, select the Sharing icon, and click on the Internet tab.
Choose your Internet-connection method from the Share Your Connection Using pop-up menu.
In Panther, you then have to select just one other network over which you’ll share your connection. In Tiger, you can choose one or more interfaces.
Click on Start, and you’re ready to go.
This method provides assigned but private addresses to computers on your ad hoc network—these computers can send data but can’t be discovered from the rest of the Internet—so it creates a passive but effective firewall.