Linux Networking/Appletalk (AF APPLETALK)
Appletalk ( AF_APPLETALK )
The Appletalk support has no special device names as it uses existing network devices.
Kernel Compile Options:
Networking options ---> <*> Appletalk DDP
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 email@example.com 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
To build and install the package do something like:
user% tar xvfz .../netatalk-1.4b2.tar.Z user% make root# make install
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.
Configuring the Appletalk software.
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:
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
The next step is to create the Appletalk configuration files in the /usr/local/atalk/etc directory (or wherever you installed the package). 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:
The Appletalk daemon program will add extra details after it is run.
Exporting a Linux filesystems via Appletalk.
You can export filesystems from your linux machine to the network so that Apple machine on the network can share them.
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.
Full details on how to configure these files and what the various options are can be found in the afpd man page.
A simple example might look like:
/tmp Scratch /home/ftp/pub "Public Area"
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.
Sharing your Linux printer across Appletalk.
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.
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.
A sample configuration might look like:
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.
Starting the appletalk software.
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:
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.
Testing the appletalk software.
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.
Caveats of the appletalk software.
· 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. · 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. · 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. · 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.
For a much more detailed description of how to configure Appletalk for Linux refer to Anders Brownworth Linux Netatalk-HOWTO page at thehamptons.com.