Nobody Told Me This Job Required French

Dobbs Code Talk - March 13, 2008
Mark Nelson

From dobbscodetalk.com

As part of my long and storied career at The World's Biggest Router Company, I pulled a two-year stretch working on a new phone system for the small business market. Given the target market, one of the important system features was ease of installation.

A VoIP (Voice Over IP) phone system is composed of phones, gateways, routers, application servers and other devices that all plug into a local network. As part of the installation process, these devices all have to find each other, and that can be complicated. To simplify the process, we used a technology called Bonjour.

What is Bonjour?

Bonjour is a trademarked name for Apple's implementation of Zeroconf, a set of technologies and protocols governed by the IETF Zeroconf Working Group. While we really should always use the word Zeroconf instead of Bonjour, current usage has become somewhat ingrained, so this is not likely to change.

The three things that Zeroconf is being used for in typical implementations today are:

  1. Allocating addresses to network nodes without the need of a DHCP server.
  2. Allowing host name lookups without the need of a DNS server.
  3. Advertising and discovering service names, often for headless devices such as printers, cameras, storage, and so on.

Zeroconf is an integral part of Apple's flagship OS/X, and as such it provides some eye-opening features. As an example, you can attach a few OS/X computers to an isolated deadnet along with a printer, and they will all happily generate IP addresses for themselves, advertise their host names to one another, and immediately offer the user the option of using the local printer as it is needed. This ease of use is described on the Zeroconf web page this way:

The work to improve network ease-of-use (Zero Configuration Networking) continues. That means making it possible to take two laptop computers, and connect them with a crossover Ethernet cable, and have them communicate usefully using IP, without needing a man in a white lab coat to set it all up for you.

Unfortunately, Zeroconf is not universally implemented in the desktop world, probably because it bumps into competing technologies such as uPNP. If you're thinking HD vs. BlueRay, or VHS vs. Beta, or Alien vs. Predator, you're on track - this is a case of vested interests squabbling over NIH interests without much concern for the big picture.

As an example, I bought a new HP multifunction printer for my home yesterday, and saw that it advertises itself using Bonjour. When plugged into my home network, Apple computers immediately saw that a new printer was in the house and offered it up for use. My XP and Vista machines required the usual painful network installation process (Vista apparently does a brute force search of all IP addresses on its subnet, looking for anything that appears printer-ish.)

How Does Bonjour Work?

Most of what Bonjour does is accomplished by simply having network nodes advertise their properties using Multicast DNS records. In the simplest terms, that means that when an HP computer is plugged into the network, it sends out DNS records that say something like "I'm a printer with postscript and PCL-6, try me!"
Because these are multicast records, everyone on the LAN will see them, and so everyone is effortlessly aware of the presence of the printer. All without any help from the man in the lab coat.

The idea that we use Multicast to advertise capabilities and configuration data is simple enough, but in practice implementing it can be a bit tricky. As the network gets crowded, a poor implementation of any protocol like this could result in a network that is swamped with continuous status updates and responses. Much of the work on Zeroconf goes into making its use of network infrastructure efficient.

What's In the Future for Bonjour?

Much of the work on Zeroconf has been driven by Apple engineer Stuart Cheshire. Stuart has a very nice one-hour talk on Bonjour posted on YouTube. In the video, Stuart talks about the big picture, which means radically transforming computer networks into much more usable entities.

If the continued evangelism of Zeroconf by Stuart and others is successful, and its support becomes ubiquitous throughout the infrastructure (this means you, Microsoft), we could see some remarkable changes. For example, your parents could set up a home network complete with a gateway, printer, and various computers, just by plugging things in. The mythical networked refrigerator could actually become a real and useful entity. And of course, installing an IP phone system would consist of one step: Plug in phones as needed.

Of course, mere politics and pride could never stand in the way of something so obviously useful, right?