Hacknight Summary, Advertising to zero conf clients without Multicast DNS
Update: It appears we were overlooking a big thing here, the needed Preferences Pane to actually enable “Wide Area Bonjour”.
Yet another hacknight. Seems that Eric, Rob, and I have spent most of our time trying to advertise services in Bonjour (Apple’s implementation of ZeroConf) via plain old DNS using SRV records. Bonjour, previously called rendezvous is usually associated with Multicast, and Multicast DNS. It sends Multicast DNS requests out the local network to discover services like printers, ssh servers, web servers, and Ichat participants.
It seems that a not so well known fact about bonjour is that it in addition to querying via Multicast DNS, it will also do a unicast DNS request to your default domain.
The basic idea is this. Lets say your default domain is foo.com. You have an SSH server you want to advertise to people in your domain. You create a SRV record to advertise this service and anyone who opens their Bonjour client looking for SSH servers will check their default domain via unicast DNS as well, and if it finds a record it will show it in the Bonjour client.
Sounds easy enough, although finding the right zone file fu has proven difficult. We have figured this out so far:
Domain foo.com needs a ptr record for the service type you wish to advertise.
Domain foo.com also needs a SRV record specifing the name and port of the service.
The Bonjour client then when browsing for SSH servers via Multicast DNS, should also query a PTR record containing the name and protocol (i.e. ssh and tcp) and that PTR record should return the SRV records for the available SSH servers. Of course this can be applied to any abitrary UDP and TCP service. We are just trying to get the bugs worked out using SSH as an example.
Here is a similar example from the Orielly Zero Conf Book:
; Invite clients to browse this domain ("@" means "this domain")
b._dns-sd._udp PTR @
lb._dns-sd._udp PTR @
; Advertise our web page ("www.
" in this example)
_http._tcp PTR Our Web Page._http._tcp
Our Web Page._http._tcp SRV 0 0 80 www
TXT path=/
Using this, google, ethereal and stumbling through the rfc draft, we have made some progress but its still not *working* fully.

March 16th, 2006 at 12:48 pm
[…] And finally, after literally hours of fiddling about, Eric, Ken and I got wide area Bonjour working. Think Multicast DNS, only Unicast and directed at a particular domain. By publishing various SRV, PTR, and TXT records, you can advertise Bonjour services in traditional DNS, without the need for a multicast responder. Brand new Macs (or any OS X Tiger box with the Bonjour Preference Pane) will query traditional DNS for service discovery, in addition to the usual multicast stuff. […]