Using Rendezvous At Home
(NOTE: For new information regarding the iTunes4 Rendezvous capability, see the bottom of this page)
I've owned an Apple TiBook for almost a year now, and have really taken a liking to Mac OS X. One of the most intriguing bits of OS X, for me, is Apple Rendezvous, a.k.a. ZeroConf.
What's so neat about Rendezvous, you ask? Put simply, it allows, among other things, the automatic location of available services on a network, without the user having to know about them in advance, or do anything to use them.
As a professional sysadmin, that's a dream come true.
I've got a metric buttload (as opposed to an imperial arseload) of gadgetry and computers in my home, providing various services to my family and our guests. Mail, multiple webservers, multiple webcams, monitoring services, web-enabled printers, MP3 servers, networking devices, and so on. Unfortunately, none of these devices are Rendezvous-enabled by default. Consumer devices that are rendezvous-enabled are just now starting to hit the market, and there are still very few of them.
But, slavering frippery-freak that I am, I wanted to use Rendezvous with everything NOW! So I set about to figure out how.
Building the Tools
I started at the web pages I link to above: The Apple Rendezvous Developer FAQ and the ZeroConf home page. From the ZeroConf site, I found this page at Apple. You'll need to register for the ADC, but it's fast and free... just click on the "Membership" link near the top of the page. Once you've registered, you'll be able to download mDNSResponder, which includes all the tools necessary to get Rendezvous working for everything in your home. (Or, grab it directly from here.)
Once you've downloaded the file, unpack the archive, and cd into the Rendezvous/mDNSPosix directory.
Read the ReadMe.txt file, and follow the instructions for compiling the code. I've successfully built the code on FreeBSD (using the "osx" type), and OpenBSD.
Getting Rendezvous running
Once you've successfully compiled the code, the fun begins! cd into the builddirectory. There, you'll find three binaries: mDNSClientPosix, mDNSResponderPosix, and mDNSProxyResponderPosix. We're interested in mDNSProxyResponderPosix.
To get things rolling, you'll need to understand the syntax that mDNSProxyResponderPosix expects, and what it's going to do. To get the syntax, just execute the binary. You'll get the following:
ip hostlabel srvname srvtype port txt
It's mostly self-explanatory, but hostlabel, srvname, and srvtype require some further investigation. Hostlabel is arbitrary, and will be used as the host name for the service under the .local domain (all this is made clear from the RFCs and drafts on the ZeroConf web page). Srvname and srvtype pertain to multicast DNS: srvname is the name that'll show up in your Rendezvous browser (e.g., the Rendezvous pull-down in the Safari web browser). srvtype is both the IANA service name and protocol type to be used. You don't need to worry about this overly-much if you don't know what that means, because I'm about to give you a few examples!
Let's say you've got a web-enabled printer, like I do. Suppose you want to make access to that printer's web-based configuration page available via Rendezvous, rather than having to hunt down the URL and bookmark it. To do this, you'd do the following:
./mDNSProxyResponderPosix 192.168.1.10 my-printer
"My Home Printer" _http._tcp. 80 &
This starts up the proxy responder, advertising your printer's web page via your printer's IP (192.168.1.10 in the example), on port 80, via the http service, over the tcp protocol. It will appear as "My Home Printer" in a Rendezvous browser or client, and will be accessed as my-printer.local. The ampersand backgrounds the process so we can do other things.
Make sense? Let's try another. This time, we'll advertise the printer itself via Rendezvous, rather than just its web-based configuration tool:
./mDNSProxyResponderPosix 192.168.1.10 my-printer
"My Home Printer" _printer._tc p. queuename
test&
Using this code, substituting the actual queue name for "queuename" (on my Broth er 1270N, it's "BINARY_P1"), my printer shows up in the Rendezvous menu of Print Center, and I'm able to print to it. Cool!
What if you've got a particular web page you want everyone to know about? Let's assume it's your intranet page, and you want all your OS X-using employees to be able to use Rendezvous to get to it. But with a twist: You don't want to just send them to the server, you want to send them to a particular page on the server. You can do it this way:
/mDNSProxyResponderPosix 192.168.1.11 intranet
"Company Intranet" _http._tcp. 80
path=/intranet/new-data/ &
This is just like the first example, except for the addition of the "path=/intra net/new-data/" portion. This is, as it implies, the path from the root of the webserver. In other words, it's all the stuff that normally comes after the first single "/" in a URL.
That's it for now. Enjoy playing with it, and I'll add to this as I get further into it.
20030429 UPDATE!
yesterday, Apple released iTunes4, which includes the ability to share music adv ertised via Rendezvous. Those of you interested in playing with this may find t he following useful:
Service name: _daap._tcp. Port: 3689
With this information, I'm able to create an item in the iTunes4 "Source" list. It appears, however, that the DRM and/or streaming protocol make simply sharing a remote MP# store using this method impossible (for now).
More news as I find it!