LDP/LDP/guide/docbook/Linux-Networking/Appletalk.xml

267 lines
8.2 KiB
XML
Raw Blame History

<sect1 id="Appletalk">
<title>Appletalk</title>
<para>
Appletalk is the network architecture/internetworking stack developed
by Apple to work with Macintosh computers. It allows a peer-to-peer
network model which provides basic functionality such as file and printer
sharing. Each machine can simultaneously act as a client and a server,
and the software and hardware necessary are included with every Apple
computer. Appletalk actually supports three network transports:
Ethernet, Token Ring, and a dedicated system called Localtalk.
</para>
<para>
LocalTalk is traditionally wired in a star or hybrid topology using custom
connectors and STP cable. A popular third-party system allows ordinary phone
cable to be used instead of STP. LocalTalk supports up to 32 node per network.
The implementations of Ethernet and Token Ring (EtherTalk and TokenTalk)
support for more sophisticated networks. Localtalk uses CSMA/CA access method.
Rather than detect collisions as with Ethernet, this method requires nodes to
wait a certain amount of time after detecting an existing signal on the network
before attempting to transmit, avoiding most collisions.
</para>
<para>
Linux provides full Appletalk networking. Netatalk is a kernel-level
implementation of the AppleTalk Protocol Suite, originally for BSD-
derived systems. It includes support for routing AppleTalk, serving
Unix and AFS filesystems over AFP (AppleShare), serving Unix printers
and accessing AppleTalk printers over PAP. Linux systems just show up
as another Macintosh on the network.
</para>
<para>
To enable the Appletalk ( AF_APPLETALK ) protocol in the kernel
please add the following options to your kernel configuration.
The Appletalk support has no special device names as it uses
existing network devices.
</para>
<para>
<screen>
Kernel Compile Options:
Networking options --->
<*> Appletalk DDP
</screen>
</para>
<para>
Appletalk support allows your Linux machine to interwork with Apple
networks. An important use for this is to share resources such as
printers and disks between both your Linux and Apple computers.
Additional software is required, this is called netatalk. Wesley Craig
netatalk@umich.edu represents a team called the `Research Systems Unix
Group' at the University of Michigan and they have produced the
netatalk package which provides software that implements the Appletalk
protocol stack and some useful utilities. The netatalk package will
either have been supplied with your Linux distribution, or you will
have to ftp it from its home site at the University of Michigan
</para>
<para>
To build and install the package do something like:
</para>
<para>
<screen>
user% tar xvfz .../netatalk-1.4b2.tar.Z
user% make
root# make install
</screen>
</para>
<para>
You may want to edit the `Makefile' before calling make to actually
compile the software. Specifically, you might want to change the
DESTDIR variable which defines where the files will be installed
later. The default of /usr/local/atalk is fairly safe.
</para>
8.2.1. Configuring the Appletalk software.
<para>
The first thing you need to do to make it all work is to ensure that
the appropriate entries in the /etc/services file are present. The
entries you need are:
</para>
<para>
<screen>
rtmp 1/ddp # Routing Table Maintenance Protocol
nbp 2/ddp # Name Binding Protocol
echo 4/ddp # AppleTalk Echo Protocol
zip 6/ddp # Zone Information Protocol
</screen>
</para>
<para>
The next step is to create the Appletalk configuration files in the
/usr/local/atalk/etc directory (or wherever you installed the
package).
</para>
<para>
The first file to create is the /usr/local/atalk/etc/atalkd.conf file.
Initially this file needs only one line that gives the name of the
network device that supports the network that your Apple machines are
on:
</para>
<para>
<screen>
eth0
</screen>
</para>
<para>
The Appletalk daemon program will add extra details after it is run.
</para>
8.2.2. Exporting a Linux filesystems via Appletalk.
<para>
You can export filesystems from your linux machine to the network so
that Apple machine on the network can share them.
</para>
<para>
To do this you must configure the
/usr/local/atalk/etc/AppleVolumes.system file. There is another
configuration file called /usr/local/atalk/etc/AppleVolumes.default
which has exactly the same format and describes which filesystems
users connecting with guest privileges will receive.
</para>
<para>
Full details on how to configure these files and what the various
options are can be found in the afpd man page.
</para>
<para>
A simple example might look like:
</para>
<para>
<screen>
/tmp Scratch
/home/ftp/pub "Public Area"
</screen>
</para>
<para>
Which would export your /tmp filesystem as AppleShare Volume `Scratch'
and your ftp public directory as AppleShare Volume `Public Area'. The
volume names are not mandatory, the daemon will choose some for you,
but it won't hurt to specify them anyway.
</para>
8.2.3. Sharing your Linux printer across Appletalk.
<para>
You can share your linux printer with your Apple machines quite
simply. You need to run the papd program which is the Appletalk
Printer Access Protocol Daemon. When you run this program it will
accept requests from your Apple machines and spool the print job to
your local line printer daemon for printing.
</para>
<para>
You need to edit the /usr/local/atalk/etc/papd.conf file to configure
the daemon. The syntax of this file is the same as that of your usual
/etc/printcap file. The name you give to the definition is registered
with the Appletalk naming protocol, NBP.
</para>
<para>
A sample configuration might look like:
</para>
<para>
<screen>
TricWriter:\
:pr=lp:op=cg:
</screen>
</para>
<para>
Which would make a printer named `TricWriter' available to your
Appletalk network and all accepted jobs would be printed to the linux
printer `lp' (as defined in the /etc/printcap file) using lpd. The
entry `op=cg' says that the linux user `cg' is the operator of the
printer.
</para>
8.2.4. Starting the appletalk software.
<para>
Ok, you should now be ready to test this basic configuration. There is
an rc.atalk file supplied with the netatalk package that should work
ok for you, so all you should have to do is:
</para>
<para>
<screen>
root# /usr/local/atalk/etc/rc.atalk
</screen>
</para>
<para>
and all should startup and run ok. You should see no error messages
and the software will send messages to the console indicating each
stage as it starts.
</para>
8.2.5. Testing the appletalk software.
<para>
To test that the software is functioning properly, go to one of your
Apple machines, pull down the Apple menu, select the Chooser, click on
AppleShare, and your Linux box should appear.
</para>
8.2.6. Caveats of the appletalk software.
<EFBFBD> You may need to start the Appletalk support before you configure
your IP network. If you have problems starting the Appletalk
programs, or if after you start them you have trouble with your IP
network, then try starting the Appletalk software before you run
your /etc/rc.d/rc.inet1 file.
<EFBFBD> The afpd (Apple Filing Protocol Daemon) severely messes up your
hard disk. Below the mount points it creates a couple of
directories called ``.AppleDesktop'' and Network Trash Folder.
Then, for each directory you access it will create a .AppleDouble
below it so it can store resource forks, etc. So think twice before
exporting /, you will have a great time cleaning up afterwards.
<EFBFBD> The afpd program expects clear text passwords from the Macs.
Security could be a problem, so be very careful when you run this
daemon on a machine connected to the Internet, you have yourself to
blame if somebody nasty does something bad.
<EFBFBD> The existing diagnostic tools such as netstat and ifconfig don't
support Appletalk. The raw information is available in the
/proc/net/ directory if you need it.
8.2.7. More information
<para>
For a much more detailed description of how to configure Appletalk for
Linux refer to Anders Brownworth Linux Netatalk-HOWTO page at
thehamptons.com.
</para>
<para>
Netatalk faq and HOWTO:
</para>
<para>
<EFBFBD> http://thehamptons.com/anders/netatalk/
<EFBFBD> http://www.umich.edu/~rsug/netatalk/
<EFBFBD> http://www.umich.edu/~rsug/netatalk/faq.html
</para>
</sect1>