Zeroconf / mDNS / Bonjour

I have just discovered a whole area of IP based LAN technology I knew nothing about until this week! It's known by various names including Zeroconfig, mDNS and Bonjour and I think this has the potential to completely change home networking.

I have been toying with setting up a DNS server at home to resolve all the host names for the machines on my local LAN, but in my research I spotted a suggestion to use Zeroconfig instead. After a bit of digging I realised this stuff looks very good.

What ever you call it, Bonjour essentially does 3 things: IP address allocation without DHCP (in the range 169.254.x.x), host name resolution without a DNS server or local hosts files (Multicast DNS) and dynamic service discovery (which is more than just IP address lookups, this is IP address, protocol and port; so a device could, for example, advertise it has a live camera feed available via http on a particular port - very slick).

It appears that Apple are leading this effort and brand it under the name Bonjour. So Mac's already have this technology built in. If you've used iTunes and accessed a shared iTunes library on another machine then you've already used Bonjour, even if you are on Windows. On Linux there are a couple of implementations, howl (which seems to be almost dead) and avahi/nss-mdns. I installed the latter on my Ubuntu server and it works perfectly.

For Windows, Apple have released Bonjour for Windows. It looks like it just does printer sharing but it definitely also does host name resolution via mDNS. The other good thing is that it a free download. I don't suppose Vista has it built in, it would be so unlike Microsoft to actually follow a standard espcially since this one is designed by Apple.

The architect behind the whole thing is Stuart Cheshire from Apple, and there is a good video of him presenting Bonjour and zeroconfig on Google Video.

Some other good links are :
http://www.ifcx.org/wiki/LocalNetworking.html (good overview)
http://avahi.org (Linux)
http://0pointer.de/lennart/projects/nss-mdns (Linux)
http://www.apple.com/macosx/features/bonjour (Mac and Windows)
http://files.zeroconf.org/rfc3927.txt (IP address allocation)

Martin

03 July 2007

Stuart Cheshire popped up on my Ipod today in a Podcast recorded by IT Conversations. There is now a plug in for Asterisk, the open source PBX, to automatically configure SIP clients. This is a very cool application for Bonjour. Bonjour could basically enable seamless VOIP roaming between networks. This may be the application that finally gives Bonjour the accolade it deserves. Listen to Stuart here: http://www.itconversations.com/shows/detail1711.html

Martin (Admin)

12 September 2007

Install on Ubuntu 704 Server: $sudo apt-get install libnss-mdns This will install, configure and start the avahi-daemon process. It will also edit /etc/nsswitch.conf to include mdns in name resolution.

Martin

03 September 2008

Install on Redhat EL5 and CentOS 5.3: Either download the source and compile with : # ./configure # make # make install or Google for "nss-mdns rpm redhat". I found nss-mdns-0.10-2.el5.i386.rpm downloadable from atrpms.net. As root: # yum install nss-mdns*.rpm Lastly, edit the nsswitch.conf file to tell the OS to use Bonjour in its DNS lookups. # vi /etc/nsswitch.conf replace hosts line with: hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

martin

06 August 2009

On Ubuntu Server 9.04 (Jaunty Jackalope), it worked straight out of the box. No need to install or configure any extra packages. I like Ubuntu.

martin

21 October 2010

New install of CentOS 5.5 and still no easy way of getting nss-mdns installed. Googled around again a discovered that it is available from the EPEL repository (http://fedoraproject.org/wiki/EPEL/FAQ). To add EPEL to your list of Yum repositories, $ sudo rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm Then install nss-mdns like so, $ sudo yum install nss-mdns That's it!

martin

07 June 2013

Same problem on EL6 (Oracle Enterprise Linux 6.3 in this case). $ sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm $ sudo yum install nss-mdns See the EPEL FAQ here: http://fedoraproject.org/wiki/EPEL/FAQ#How_can_I_install_the_packages_from_the_EPEL_software_repository.3F