Inside AppleTalk, Second Edition
by Gursharan S. Sidhu, Richard F. Andrews, Alan B. Oppenheimer Apple Computer, Inc.

The Apple® Communications Library
The Official Publications from Apple Computer, Inc.
The Apple Communications Library provides complete information on Apple Computer, Inc.’s approach to networking and communications. The library consists of three related series: Apple Communications Basics, Apple Communications Reference, and Apple Communications Technical. These books offer comprehensive material on a wide variety of topics for a vast range of readers, from basic-level users to network administrators and developers.
The Apple Communications Basics series covers networking fundamentals. Designed for those new to networks, these introductory-level books explain all aspects of networking.
The Apple Communications Reference series provides overviews of networking topics. These books are written for developers, network administrators, or users, and currently include an overview of AppleTalk®, Apple’s networking system.
For developers and programmers, technical detail is provided by the Apple Communications Technical series. These books include advanced-level information about the AppleTalk network system’s capabilities and specifications necessary to allow implementation of a system by developers. Inside AppleTalk is the first in this series.
Gursharan S. Sidhu
Technical Director
Richard F. Andrews
Staff Engineer
Alan B. Oppenheimer
Staff Engineer
Network Systems Development
Apple Computer, Inc.
Addison-Wesley Publishing Company
Reading, Massachusetts Menlo Park, California New York
Don Mills, Ontario Wokingham, England Amsterdam Bonn
Sidney Singapore Tokyo Madrid San Juan Paris
Seoul Milan Mexico City Taipei
APPLE COMPUTER, INC.
Copyright © 1990 by Apple Computer, Inc.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, mechanical, electronic, photocopying, recording, or otherwise, without prior written consent of Apple Computer, Inc. Printed in the United States of America.
Apple Computer, Inc. 20525 Mariani Avenue Cupertino, CA 95014 (408) 996-1010
Apple, the Apple logo, AppleShare, AppleTalk, Apple IIe, Apple IIGS, EtherTalk, ImageWriter, LaserWriter, Macintosh, ProDOS, and TokenTalk are registered trademarks of Apple Computer, Inc.
Apple Desktop Bus, Finder, LocalTalk, and MultiFinder are trademarks of Apple Computer, Inc.
AlisaShare is a trademark of Alisa Systems.
CL/1 is a trademark of Network Innovations.
DECnet and VAX are trademarks of Digital Equipment Corporation.
IBM and SNA are registered trademarks of International Business Machines Corporation.
InBox is a trademark of Symantec Corporation’s Think Technologies.
ITC Garamond and ITC Zapf Dingbats are registered trademarks of International Typeface Corporation.
Kinetics is a trademark of Kinetics, Inc.
LANSTAR and Meridian are registered trademarks of Northern Telecom.
LANSTAR AppleTalk is a joint trademark of Northern Telecom and Apple Computer, Inc.
Linotronic is a registered trademark of Linotype Co.
Microsoft and MS-DOS are registered trademarks of Microsoft Corporation.
Netway is a registered trademark of Tri-Data Systems, Inc.
NFS is a trademark of Sun Microsystems.
PacerShare is a registered trademark of Pacer Software, Inc.
PhoneNET is a registered trademark of Farallon Computing.
PostScript is a registered trademark, and Illustrator is a trademark, of Adobe Systems Incorporated.
UNIX is a registered trademark of AT&T Information Systems.
Varityper is a registered trademark, and VT600 is a trademark, of AM International, Inc.
Zilog is a trademark of Infocom, Inc.
No licenses, express or implied, are granted by reason of this book describing certain processes or techniques that may be the intellectual property of the author or others, including, but not limited to, United States Patents 4,661,902 and 4,689,786 assigned to Apple Computer, Inc.
Simultaneously published in the United States and Canada.
ISBN 0-201-55021-0
4 5 6 7 8 9 10 - DO - 959493 Fourth printing, January 1993
Acknowledgments
EVEN THOUGH Inside AppleTalk was published by Addison-Wesley as recently as early 1989, the needed evolution of technology has already made it necessary to produce a new edition! In fact, even while we were in the final editing and production stages of the first edition, our engineering teams were busy implementing a major extension of the network system, now known as AppleTalk® Phase 2. This extension was introduced in June of 1989, and its various components are now in users’ hands. This second edition includes all changes made to the protocols to implement the enhanced capabilities of AppleTalk Phase 2.
It is my privilege to acknowledge the contributions of many of the finest networking engineers in the industry in this endeavour. Jim Mathis, who has been involved with network systems design since the advent of TCP (Transmission Control Protocol) in his university days at Stanford, worked with me on the early architectural design of Phase 2, critiquing and suggesting amendments to the design. The refinement and translation of that design into an actual implementation was done by a team under the leadership of Alan Oppenheimer, who is a co-author of this book. Major contributions were made by several members of Alan’s staff—I would like to make special note of Sean Findley, Louise Laier, Kerry Lynn, and Mike Quinn. These engineers par excellence have built a new version of the system in the face of the enormous challenge of maintaining compatibility with existing AppleTalk applications. The results have been simply extraordinary. Whereas the original AppleTalk system had a size limitation of at most 254 devices connected to a single network, the new design extends this limit to approximately 16 million devices. The owner of the network system has enhanced flexibility in distributing these devices on the various networks that comprise the internet. Much care has been devoted to minimizing the use of network bandwidth for the system’s internal coordination, such as routing table maintenance.
Acknowledgments to First Edition
THE DEVELOPMENT of the AppleTalk network system spans more than a five-year period. Although the authors of Inside AppleTalk were the key players in the system’s design, many others helped in numerous ways.
Without a doubt, the genesis of AppleTalk is to be found in the demanding and uncompromising questioning of Steve Jobs. In particular, at the National Computer Conference (NCC) in Anaheim in 1983, he asked me the key question: “Why has networking not caught on?” My awkward attempts to answer his question started us on this venture. Invention always has its instigator, and Steve played this role for AppleTalk as he has for many other wonderful products from Apple. I owe a great personal debt to him for first listening to my fervent but not yet fully formed vision of networks as empowering extensions of the personal computer and for later helping remove barriers from our developmental path.
Bob Belleville, former engineering director of the Macintosh® Division and ever a pragmatist, converted the vision into three succinct memos that put a stop to all argument on this issue at Apple. He provided a focus for this nascent activity, including the general goals for LocalTalk (then known as AppleBus), the LaserWriter® printer, and the system’s file server. Although the actual products turned out considerably different from what he indicated in those memos, he summarized the target area with consummate simplicity.
The most exciting activity of the last quarter of 1983 and the first few months of 1984 was the development of the LocalTalk Link Access Protocol (LLAP). This protocol is the basis of LocalTalk and related connectivity implementations from several vendors, including PhoneNET from Farallon Computing and Fiber Optic Communication Card from Du Pont Electronics. I wish to acknowledge several colleagues at Apple who played key roles in this difficult design activity: Ron Hochsprung and Larry Kenyon for their very creative design participation, George Crow for the superb analog design of the LocalTalk hardware, and Jim Nichols for an uncompromising test harness that proved that the design was efficient and stable.
The AppleTalk protocol architecture almost did not happen. Bob Belleville proposed an external, device-interconnect bus for the then-closed Macintosh personal computer. Creating a network system was my somewhat clandestine idea; when I described the network architecture to Bob on January 24, 1984, about two hours after the Macintosh introduction, I did so with some trepidation. I am grateful to him for his forthright admission that I had made AppleTalk into something much more comprehensive than he had anticipated and for his full support!
In its early days, any new idea is tender and vulnerable. I am especially grateful to Ed Taft of Adobe Systems, one of the most widely known members of the networking community, for his very thorough review and his advice in late 1983 and early 1984. His extremely encouraging comments bolstered my own commitment to build this system; without his encouragement, compromises to “conventionalism” might have crept in.
It was all very well to have the approval of fellow designers of network systems, but the proverbial proof-is-in-the-pudding was still missing: How would users of the system respond to it? Stan Dunton and Rich Brown of Dartmouth College provided a crucial vote of confidence in early 1984 with their decision to install AppleTalk as their campus-wide system. I will be eternally grateful to Stan for standing up at the first AppleBus Developers’ Conference and saying: “This is just the system we’ve been waiting for someone to design.”
My biggest debt of gratitude is to Rich Andrews and Alan Oppenheimer, who have been my technical partners in this venture from the beginning. The credit for the outstanding reliability of the Macintosh AppleTalk drivers goes to Alan’s meticulous attention to detail in writing them. They are a model of how an efficient and tight implementation of network protocols can be achieved in a difficult environment.
The elegant design of the AppleTalk Transaction Protocol (ATP) exactly-once packet exchange is the contribution of Rich Andrews. Rich listened to my somewhat unconventional ideas about not building a general stream protocol but relying instead on transactions. I then suggested at-least-once and exactly-once service. My exactly-once proposal, however, was considerably clumsier than Rich’s modification, which has become integral to millions of Macintosh and LaserWriter ROMs.
One of the impressive services in the AppleTalk system is provided by the AppleShare® file server, which was many years in the making. Rich Andrews has been my partner in this venture throughout. I wish to thank him for his tremendous effort in the face of considerable adversity and public opprobrium. His persistent, dogged work toward the final AppleShare product has earned him the title of Apple Hero.
Rich and Alan join me in thanking all our colleagues in Apple’s Network Systems Development (NSD) group; in particular, we would like to mention a few veterans: Pat Dirks, Bruce Gaya, Rick Hoiberg, and Gene Tyacke. Tim Warden and Steve Schwartz made significant contributions to the chapters on the AppleTalk Data Stream Protocol (ADSP) and the Printer Access Protocol (PAP), for which they have my appreciation and thanks.
Since 1985, the NSD group has enjoyed the support and encouragement of Ed Birss and Jean-Louis Gassée. Both have become strong converts to our dream of extending the power of the individual beyond the desk top.
The unsung key contributors to a system such as AppleTalk are the third-party developers who have risked their investment funds to add end-user value. They kept AppleTalk alive when many thought it was just a printer cable. I wish to acknowledge, as representative of this group, the following key entrepreneurs: Evan Solley of Infosphere for the first AppleTalk disk-server product; Andrew Singer, formerly of Think Technologies, for the InBox electronic mail service; Alex Gernert, formerly of Tri Data, for the Netway 1000 SNA connectivity server; Rob Ryan of Hayes Microcomputer Products, Inc. and Tim McCreery of Kinetics for their AppleTalk routers; Reese Jones of Farallon Computing for the PhoneNET implementation of LocalTalk service; and Bob Denny of Alisa Systems for the implementation of Apple’s AppleTalk for VMS software.
Lest other good developer friends take umbrage at my not mentioning them specifically, I plead the impracticality of producing an exhaustive list; they know the depth of my gratitude—and that of the users—to all of them. This large body of third-party developers is a measure of the broad acceptance of the AppleTalk system.
Protocol specifications of the AppleTalk system have been provided to developers in several versions starting with the “AppleBus Developer’s Handbook” of March 1984. It was my intention to publish it as a book, but we grossly underestimated the effort involved. It was not until August of 1988 that we assembled some of Apple’s finest editors, production editors, and desktop publishers to pull together all the pieces that comprise this book. I am indebted to Judy Bligh, editor; Judi Seip, art director; Sheila Mulligan; Ron Morton; Roy Zitting; Debbie McDaniel; Luann Rugebregt; and Patrick Ames.
Finally, I would like to dedicate this book to the patience and understanding of my wife, Elvira, who endured the many nights when I paced the floor while struggling with some protocol problem.
Gursharan S. Sidhu November 1988
Table of contents
- Introduction
- LocalTalk Link Access Protocol
- AppleTalk Address Resolution Protocol
- EtherTalk and TokenTalk Link Access Protocols
- Datagram Delivery Protocol
- Routing Table Maintenance Protocol
- AppleTalk Echo Protocol
- Name Binding Protocol
- Zone Information Protocol
- AppleTalk Transaction Protocol
- Printer Access Protocol
- AppleTalk Session Protocol
- AppleTalk Data Stream Protocol
- AppleTalk Filing Protocol
- Print Spooling Architecture
- LocalTalk Hardware Specifications
- LLAP Access Control Algorithms
- AppleTalk Parameters
- Character Codes