Hack 69 Creating a One-Wire Network

figs/beginner.giffigs/hack69.gif

A one-wire network can be a salvation when you're in need of a quick file transfer between laptops with incompatible parts.

You're on a plane and desperately need to pass a file to (or play Quake against) your coworker. You both have Ethernet jacks, but there's no network available to you. You both have wireless cards, but transmitter/receivers are a no-no aboard airliners. She has a floppy drive, but your iBook has never heard of these floppy things. You have a USB drive, but the file's massive. And you're fresh out of CDs, or you'd simply burn one and pass it across.

Oh, and she's running Windows.

If you have an Ethernet cable handy, you can plug one end into the Ethernet jack of each of your machines, open your System Preferences Network pane, and select Built-in Ethernet from the Show pull-down menu.

If at least one of the computers is a Macintosh of recent vintage (PowerBook G4, iMac 17", or iBook, at the time of this writing), you don't even need one of those special crossover Ethernet cables. Refer to the consummate list at http://docs.info.apple.com/article.html?artnum=42717.

Wait. . . . Within a short while, you'll notice your system self-assigning an IP address in the 169.254 range, as shown in Figure 6-6. The same will be happening on your coworker's Windows laptop. What's happening is that both machines sense there's some network activity on the wire, yet there's no DHCP server to assign them an IP address. They'll self-assign addresses in the 169.254 range, establishing, in effect, a one-wire network.

Figure 6-6. Self-assigning an IP address
figs/xh_0606.gif

Now you can try and browse for any shares on the Windows laptop from your Mac using Go Connect to Server . . . or figs/command.gif-K. You can also turn on FTP Access[Hack #75] or Remote Login [Hack #65] on your iBook and SSH or FTP in from the Windows side (see Figure 6-7).

Figure 6-7. FTP and SSH from Windows to Mac over the one-wire network
figs/xh_0607.gif

Heck, you could fire up your Mac's Apache web server[Hack #85] and visit it from a Windows browser.

Go ahead and transfer to your heart's content via FTP or SSH (scp, if available on the Windows side). To disconnect, simply unplug the cable.

69.1 One-Wire Rendezvous

If you're both running OS X, you can actually let Rendezvous (http://www.apple.com/macosx/jaguar/rendezvous.html) take all the IP nonsense out of the equation. You should be able to browse each other's Public folders in the Connect to Server . . . dialog box and connect to each other using your machine's Rendezvous name (see System Preferences Sharing). You can even chat and transfer files via iChat over Rendezvous; turn on Rendezvous in iChat with iChat Log into Rendezvous or figs/command.gif-Option-L.

69.2 One-FireWire Network

Apple's recently announced IP over FireWire (http://developer.apple.com/firewire/IP_over_FireWire.html) (preview release at the time of this writing) means Rendezvous and all the joy it brings at FireWire speeds. Simply install the preview release software on both machines, plug them into each other with a FireWire cable, and fire(wire) away! Figure 6-8 shows the FireWire Network preferences.

Figure 6-8. FireWire Network preferences
figs/xh_0608.gif

Inspired by Chris Stone and Brian Jepson



Mac OS X Hacks
Mac OS X Hacks: 100 Industrial-Strength Tips & Tricks
ISBN: 0596004605
EAN: 2147483647
Year: 2006
Pages: 161

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