Bonjour

You are currently browsing articles tagged Bonjour.

Bonjour on Linux

A while back, I experimented with a multicast DNS (mDNS) responder for Linux.  (For those not already “in the know,” so to speak, multicast DNS is one of the key components of Bonjour, Apple’s automatic service discovery functionality—formerly known as Rendezvous).  For some strange reason, I had an urge to try it again today.  Here’s what I found.

First, I started looking for an “official” RPM package for a CentOS 4.2-based server that I manage.  Despite numerous Google hits that implied an official RPM existed, I could not find one.  (Pointers and/or URLs are welcome.)  I finally found a few RPMs on one of the CentOS mirrors, and installed it without any major issues.  The problem was, there was no documentation.  It installed an executable file called mdnsd, along with a directory in /usr/share/doc and a matching init script.  But how to configure it?  How to tell it what services to advertise via mDNS?

Having no luck whatsoever finding any additional documentation, I turned to a POSIX-compliant mDNS responder I had downloaded from Apple’s developer site and compiled on Red Hat Linux 9.0 some time ago.  I also had a simple init script for it, which (if I recall correctly) had been created by Rui Carmo of Tao of Mac (great site, by the way—I recommend it).  Fortunately for me, all I had to do was just copy the files over to the CentOS-based server and place the files in the right place, and it worked flawlessly.

Sure enough, I could now see this Linux-based server in Terminal.app’s “Connect to Server” dialog box.  I could not, however, see the server as an SFTP server in Cyberduck.  I briefly searched to see what kind of advertisements Cyberduck was expecting to see, but couldn’t find any information.  (Note, strangely enough, that Terminal.app could see the server as an SFTP server, but Cyberduck couldn’t.)

Now don’t ask me why exactly I was driven to tinker with this today, because I couldn’t tell you.

More information on multicast DNS, DNS Service Discovery, and related technologies can be found at the sites linked below:

DNS Service Discovery (DNS-SD) - http://www.dns-sd.org/
Multicast DNS - http://www.multicastdns.org/

Tags: , , , , , , ,

Mac OS X and .local Domains

Some time ago, Mac OS X Hints published a hint I submitted regarding the use of the .local TLD (top level domain) with Mac OS X.  Specifically, the hint centered around the use of Mac OS X with Active Directory domains using the .local TLD.  For ease of access, here’s that same hint.

Basically, Mac OS X uses the .local TLD for Bonjour/Rendezvous services, and is configured to use multicast DNS (mDNS) for discovery of those services.  This configuration occurs via a file named “local” in the /etc/resolver directory.  Apple’s Knowledge Base article offers a solution, but that solution involves editing this “local” file, which affects Bonjour/Rendezvous operation.  This solution, on the other hand, does not affect the “local” file in any way, and thus does not interfere with Bonjour/Rendezvous.

Let’s say that you need to integrate Mac OS X with an Active Directory domain called company.local.  Simply create a file in /etc/resolver named “company.local” with the following contents:

nameserver a.b.c.d
nameserver w.x.y.z
port 53

Obviously, replace the letters in the text above with the IP addresses of your appropriate DNS servers for the company.local Active Directory domain.  Then, flush the lookupd cache with “lookupd -flushcache” and that’s it!

With this file in place, your Mac OS X system will resolve company.local (or subdomain.company.local) via the instructions in the file /etc/resolver/company.local, but will handle Bonjour/Rendezvous service discovery via mDNS in the same fashion.

Tags: , , , , , ,