Apple developed its AppleTalk protocol stack in conjunction with the LocalTalk networking hardware for some of its earliest Macintoshes in the mid-1980s. (In fact, early on, both the hardware and software went by the name AppleTalk, although today this name is reserved for the software side.) As Ethernet grew in popularity, Apple developed a way to use AppleTalk over Ethernet hardware ”a variant that's sometimes called EtherTalk. Linux supports AppleTalk over either the original LocalTalk hardware (if your system has a supported LocalTalk network card, as described in Chapter 1) or over Ethernet.
AppleTalk Features and Capabilities
Like TCP/IP, AppleTalk uses a 32-bit machine address. Also like TCP/IP, the AppleTalk address is broken down into two components ”a network address and a computer address; however, the division of these two components is fixed, with each consuming 16 of the 32 bits available for the address. AppleTalk includes a procedure by which the computers on the network can negotiate their own AppleTalk addresses, so you need not set this address explicitly. (You can request a specific address or an address in a specific range if you want to, but this usually isn't necessary.)
Above the AppleTalk numeric addresses lies a two-tiered alphabetic naming system that humans use more directly. Each computer has a name, and resides in a zone, which is a logical group of computers. Small networks may be zoneless, meaning that the zone name doesn't obtrude itself upon users. When you start Netatalk, the primary AppleTalk package for Linux, the software sets the system's AppleTalk name based upon the TCP/IP hostname, unless you override this setting. For instance, if a computer has the TCP/IP hostname larch.threeroomco.com , the computer's AppleTalk name becomes larch . The domain information is lost, though. (In a zoned network, the computer attempts to set its zone automatically, and the zone name may bear no resemblance to anything in the TCP/IP hostname.) The two-tiered nature of AppleTalk names is an important limiting factor on AppleTalk networks; without more layers of names , creating an AppleTalk network with more than a few hundred computers becomes awkward .
The primary applications for AppleTalk are the file and printer sharing for which the protocols were developed. Many network-enabled printers "speak" AppleTalk natively, and AppleTalk file-sharing protocols are understood by MacOS, Windows NT and 2000, Linux, BeOS, and other systems. There's seldom any reason to use AppleTalk except on a network that contains MacOS systems, though, because most other OSs provide better support for other network protocols. Even in the case of Macintosh-dominated networks, the Unix-based MacOS X supports NFS as well as AppleTalk, so you may prefer to use NFS if your network's Macintoshes run MacOS X. The Netatalk package (see http://netatalk. sourceforge .net) is the main program that uses AppleTalk in Linux; it's discussed in the next section.
Using Linux AppleTalk Software
The Netatalk package, which comes with most Linux distributions, is the primary AppleTalk software for Linux. This package provides three features:
The first two of these programs rely upon another one, atalkd , which configures the computer's overall AppleTalk presence ”features such as the AppleTalk name and address. This program is controlled through a file called atalkd.conf , which is also typically stored in /etc/atalk .
Most default installations of AppleTalk work correctly as soon as they're installed, but they're typically configured to share only the home directory of the user who logs in. You can alter this configuration by editing AppleVolumes.default . For instance, the following lines in this file tell the system to export both the user's home directory (specified by a tilde, ~ ) and the /mnt directory:
~ /mnt "Mount Points" options=noadouble
The first of these lines is the default, and includes no special options. The second includes a name to use instead of /mnt for the share as seen on a Macintosh client, as well as an options specification, which sets special options. In this case, the only option set is noadouble , which makes Netatalk not create AppleDouble files (these are special files stored in the .AppleDouble subdirectory to hold MacOS-specific data) unless they're absolutely required.
If your Netatalk package shipped with your distribution, it will probably start up automatically when you start the computer. If not, consult Chapter 4, Starting Servers, for general server startup information (a SysV or local startup script are the best options for starting Netatalk). You should start atalkd first, then afpd and papd . One of the quirks of Netatalk, and particularly of atalkd , is that this server can take quite some time to start ”sometimes over a minute, particularly on older hardware. You can avoid a pause in your system startup procedure by including an ampersand ( & ) after the program call in your startup script.