Zeroconf under Debian Linux

This afternoon I quickly setup enough infrastructure on my test server to enable it to use Multicast DNS to resolve local names and answer local queries. Multicast DNS is part of the Zeroconf specification, which Apple has implemented and refers to as Rendezvous.

In order for this to work, your system needs to both answer and perform multicast DNS queries. The two pieces you need for this are:

  • mDNSResponder: From Apple, and covered under the APSL, but included in [Porchdog Software]‘s Howl package.
  • nss-mdns: Written by Lennart Poettering, provides a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing host name resolution via Multicast DNS

As of 0.3, nss-mdns is already Debian-ready, simply build a package executing fakeroot dpkg-buildpackage from the unpacked tarball. There is an mDNSResponder package in Sarge which is rumored to be removed shortly due to license problems with APSL, so grab a copy soon.

Once these are installed, simply add mdns to the hosts line of /etc/nsswitch.conf and you’re done.

You will now be able to resolve “.local” hosts from your Debian system and also resolve this system’s hostname on other local hosts. By editing /etc/mdnsresponder/mDNSResponder.conf, you can advertise any service you want.

2 thoughts on “Zeroconf under Debian Linux

  1. Hans

    Hum. Just figured out today that when you have mDNS set up, you can’t resolve .local by any other means than using mDNS. In our particular instance, someone set up our Windows AD server to name our internal network with .local in the end, so I tried to configure our internal development DNS server to use .local as well and this did not work.

    It goes hosts => mdns_minimal => mdns => dns.

    But .local addresses will stop at mdns_minimal no matter what. Never goes to dns.

  2. adam Post author

    Yeah, that’s a problem. Under Mac OS X I’m able to force specific domains by putting a file into /etc/resolver/.


Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>