AppleTalk NBP (Name Binding Protocol)

Stuart Cheshire, September 1997.

My article about NBP/IP was originally posted to a Macintosh-oriented network discussion list, where all the participants were already familiar with the details of how NBP works. NBP is the AppleTalk "Name Binding Protocol". It has been pointed out to me that many people in the Internet community are not aware of these details, so here's a very quick explanation of AppleTalk NBP:

Each named AppleTalk communication endpoint (i.e. each 'socket') has a name of the form "Entity:Type@Zone". An example NBP name might be:

Stuart's Printer:LaserWriter@Stuart's House

The entity "type" implies a particular protocol that must be used to communiate with it. In this case, the service type name "LaserWriter" indicates that communication to this named socket must use the AppleTalk Printer Access Protocol (PAP). It may or may not be a genuine Apple-brand LaserWriter. In fact it may not be a printer at all. The entity may be a computer running print spooler software, or it may be some other kind of device, like a network fax machine. What is relevant is that this service on the network is one that may be of interest to people looking for printing-type services, and it communicates using PAP. How those people find those services is the purpose of NBP.

When a user opens the Macintosh "Chooser" and clicks on the LaserWriter icon, their Mac logically sends out a broadcast to all the other machines on the network, saying "Who has any named sockets of type LaserWriter?" All the devices on the network that have sockets with TypeName "LaserWriter" send back responses, and the user's Mac displays the responses in a list for the user to choose one of them.

In practice, to reduce unneccessary load on other computers on the network, NBP doesn't really broadcast the requests; it uses Ethernet multicast instead. NBP uses a hash function to select an Ethernet multicast address, and then sends the search request only to that multicast address. Machines that are providing services on the network use the same hash function, and listen to the appropriate Ethernet multicast address to receive the NBP lookup packets.

There are a few more minor details, like how gateways forward packets and cache responses, but that's basically all you need to know to understand the fundamental idea. It's very simple, very easy to implement, and very useful. It's easy to criticise NBP for being too simple-minded, but the fact remains that for the last fourteen years lots of people have spent their time criticising NBP but none of them have actually done anything better, and we're still waiting for IP to have the out-of-the-box automatic configuration and service location that AppleTalk's NBP has provided since 1984.


Page maintained by Stuart Cheshire
(Check out my latest construction project: Swimming pool by Swan Pools)