$Id: appletalk_seed_router.txt,v 1.1 2004/01/22 19:27:41 jmates Exp $ Notes on how to setup an AppleTalk seed router using Netatalk. An AppleTalk seed router keeps the AppleTalk network numbers sane, promotes AppleTalk network stability, and generally makes AppleTalk network lookups faster. These are all good things. Various products can be used as an AppleTalk router, ranging from dedicated hardware (Cisco routers) to software packages (Netatalk). Apple's Mac OS X Server Operating System also can act as an AppleTalk router, and will prompt the user to set one up during the post-installation script if no local router can be found on the floor. Of these, Netatalk is freely available, and runs on generic hardware running freely available operating systems such as Linux or *BSD. Therefore, it is a low-cost solution for managing AppleTalk networks, assuming a local administrator is available to configure and maintain the machine(s) in question. A Bad AppleTalk Network On a typical LAN subnet, where there is a single router off the class C TCP/IP network, there might also be a gaggle of Mac OS machines running AppleTalk to access printers or file shares over the AppleTalk network. Without a "seed router," AppleTalk devices pick numbers wildly from the available AppleTalk address space, resulting in confused networks with no organizing zones: Boris:AFPServer 65420.1:249 Boris:PPCToolBox 65420.1:251 Boris: Macintosh 65420.1:253 Boris:Workstation 65420.1:4 821950-1B66813D:Miramar AppleTalk Stack 1021.29:255 IBM78HVRAB:Windows 95 Workstation 1021.29:0 Sandy:Power Macintosh 7100/80 47583.154:253 Sandy:Workstation 47583.154:4 F428-G4/400:ShareWayIP 4400.134:4 F428-G4/400:AFPServer 4400.134:250 F428-G4/400: Power Macintosh 4400.134:252 F428-G4/400:Workstation 4400.134:4 Where a 'X.Y:Z' numeric set represents the network, node, and "port" number, much in the same way 192.168.0.1:80 breaks down into network (192.168.0), node (1), and port (80). There can be roughly 250 nodes on any given network, and networks range from 0 to 65535, with some of the higher 65* series being denoted for router-less networks. On the above network, there used to be a seed router, but machines (Boris) are now choosing the higher no-router numbers. This is bad, as Chooser lookups will be randomly slow, and wierd one-time "can't find printer" errors may crop up randomly. Fixing a Bad AppleTalk Network The solution is to install an AppleTalk router which allows a narrow range of network numbers (helps lookup speed, if memory serves) and also allows various zones to be created which can be used to subdivide the AppleTalk devices into logical groups. Installing Netatalk is beyond the scope of this document; for Linux and *BSD there are pre-built packages available on the internet that handle most of the troubles of getting Netatalk installed and running. However, one should be aware that Netatalk typically requires kernel support to work properly. The following instructions are for Netatalk running on a RedHat Linux machine; on other systems the only differences should be where or how Netatalk is started, and where the config files are located. To get an AppleTalk seed router working on Netatalk, the /etc/atalk/atalkd.conf file will have to be altered. Altering this file is tricky, as atalkd has a habit of rewriting it depending on the current state of the network. Also, if atalkd does not start up when configured to be a router, then there is likely another device acting (or trying to act) as a router that is causing the conflict, in which case you should use the nbplkup utility to map the AppleTalk network as a regular client, then go hunting for the wayward device. Anyhow, for a single-interfaced machine, one must use the -router option to the ethernet device arguments, as well as specify a manual -net range and -addr for your seed router: eth0 -router -phase 2 -net 1-2 -addr 1.1 -zone "Foo" Configuration is different with multiple ethernet cards, and the documentation for Netatalk covers that topic fairly well. Notes on the arguments: -phase 2 is required (phase 1 old and bad). -router is an undocumented feature I eventually found somewhere on the internet, -seed was not an option as none of our netatalk servers had multiple network cards available. -net is any range of numbers from 1 to 65000-something; each network number supports roughly 250 devices, and you should keep the number of nets as low as possible. A -net of 1-2 supports roughly 500 devices on a single network, and should be more than enough for a small LAN. -addr is the specific address of the router, and should be inside the -net range. I like to use .1, as on TCP/IP networks the .1 address is also for "important" things. Technically you don't have to set the -addr and atalkd will wander out and find an address for itself, but I like to play it safe when establishing a new seed router on a chaotic network. Other backup routers you might add later can have the -addr bit removed, as they will get a number from the primary seed router, which allows the simple addition of the following line to backup seed routers: eth0 -router -phase 2 -net 1-2 -zone "Foo" Note that with multiple seed routers on the network, they all need to agree on the configuration of all the various options, with the exception of -addr. Otherwise, the first atalkd up wins, and the others will not start. -zone allows the creation of named logical groups on the network; a single zone won't change anything, but multiple zones: eth0 (other args) -zone "Foo" -zone "Bar" -zone "Zot" Will cause the Chooser on Mac OS to display various zones, under which devices can be moved, e.g. under the AppleTalk Control Panel on Mac OS, or though remote printer setup utilities on printers, etc. The first zone listed will be the "primary" zone under which devices default to unless told otherwise. Post New Seed Router Network Woes After atalkd is running with the new configuration, there will be some chaos on the AppleTalk network until the devices sort themselves out. Printers and the like should be rebooted to align them into the new network numbers, while under Mac OS the AppleTalk control panel (or the Network panel on older systems) can be used to reconfigure AppleTalk on the machine-- no reboot required. Following this, printers may have to be redefined due to the network numbers for the desktop printer no longer being valid; on recent systems this can be accomplished by locating the non-functional desktop printer icon for the printer, dragging it to the trash, and the reconfiguring that printer by selecting it under the Chooser. Also, aliases made to remote volumes may also no longer work, again due to the new network numbers. Delete these, and have the user go through the Chooser and manually mount the volume in question, then remake the alias to the volume, and they should be set. Once the transition is complete, the new network will be much more orderly and faster to browse from the chooser: Aidan:Workstation 1.2:4 Aidan:netatalk 1.2:4 Aidan:AFPServer 1.2:4 K341 Color Duplex:SNMP Agent 1.6:8 K341 Color Duplex:HP Zoner Responder 1.6:156 K341 Color Duplex:LaserWriter 1.6:157 K341 Color Duplex:HP LaserJet 1.6:158 Debbie G4:ShareWayIP 1.70:4 Debbie G4:AFPServer 1.70:254 Debbie G4: Power Macintosh 1.70:251 Debbie G4:Workstation 1.70:4 D-416 Color Printer:EPSONLQ2 2.178:128 D-416 Color Printer:ITC_Responder 2.178:131 HPDJ488CA@Retro:LaserWriter 2.224:251 Retro: Power Macintosh 2.224:252 Retro:Workstation 2.224:4