Adventures with DD-WRT
Part 4: Zeroconf should be available on all network devices, including routers

Apple_Bonjour_IconLast time, we got JFFS and a USB drive working on the DD-WRT router. Now I want to put it to use. 

The first thing I want is Zeroconf. While all my OS X readers are very familiar with the technology and understand its powerful implications, there are still many circles outside that don't. 

So for those who aren't familiar with it, Zeroconf (Zero-Configuration Networking) is an open standard to make IP-based network devices trivially easy to plug in and configure. A typical comparison is a USB device. With your USB device, you plug it in, and don't have to worry about typing in IP addresses, subnet masks, etc. There is no good reason IP based devices can't do this, and Zeroconf finally fills in that hole.

Zeroconf is actually built on 3 standard technologies and basically just connects the dots to make them more usable: Link-Local addressing, Multicast Name Resolution (mDNS), and DNS Service Discovery (DNS-SD).

The first technology is about always having an IP address. When you turn on your device, you get an IP address. If you have DHCP or a static IP address, that's great. But if you don't, you still need an IP address or you can't access the device. So if you've ever seen a 169.x.x.x address, that is a self-assigned link-local address. Unfortunately, before Zeroconf, you might get the link local address, but you have no idea what it is so you don't know how to connect to the device to reconfigure it.

So now that we've established that all devices will have an IP address whether it be from DHCP, static, or link local, it would be nice to have a human readable name to reference the device. Nobody likes to type in or memorize IP addresses, especially IPv6 addressees, so referring to them by name like "AsusWireless" would be nice. Zeroconf basically uses the DNS system combined with multicast to make this happen so devices can give themselves names without a central name server. Thus you will be able to type in a name and connect to the device you want.


The final piece is service discovery. Basically, what if you didn't know the name "AsusWireless", well you can just browse the network and ask the network, "what web services are available?", or "what devices are offering printer services?" 

On top of that, Zeroconf also provides the port numbers in case the service is running on a non-standard port. For example, what if you wanted to run a public web server on port 80, so you moved the administration web gui to a different port (maybe even selected randomly)? Zeroconf still allows you to find the service.


Despite any dogma you may have heard, it is all very fast, lightweight, efficient, mature, proven, doesn't spew the network with traffic, all built on open standards, is an open standard, and is cross-platform.


Apple introduced this technology and made it an open standard. Bonjour is the name of Apple's implementation and is open source under the Apache License, but there are other implementations of Zeroconf as well, which all interoperate together. Avahi is the most popular implementation on Linux.

In this day and age, all network devices should ship with Zeroconf. In fact, pretty much all printer manufacturers that ship IP-based printers ship with Zeroconf now. Network printers used to cost a massive premium because support and return costs were so high. But once Zeroconf became widely adopted, IP based printers became, and are now affordable to the masses.

Unfortunately, there are still certain industry segments that would greatly benefit from this technology, but are still oblivious or clueless and still haven't adopted it. IP-based cameras are one group. Some companies like Axis Communications get it. But many still do not. I had a friend recently ask me if I could connect to his IP-based security camera because he was unable to do it. The documentation was wrong and the custom tools included on the CD failed to work. After spending an hour troubleshooting it, I managed to connect to it via a brute force guess as to what its IP might be along with all the other parameters. I bet this product sees a lot of returns and gets a lot of support calls.

But the home router industry is probably the worst. I think only Apple ships with Zeroconf. Ruckus Wireless almost, but not quite. And that's all I know of. I was hoping these Linux firmware distros were more brilliant and included it, but I was wrong. 

I posted to the DD-WRT forum 2 and a half years ago asking about this. (Yes, it took me 2 and a half more years to finally getting around to trying DD-WRT.) Nobody knew the answer. Since then, I got one reply that Avahi was in the 3rd party packaging system Optware but nobody knew if it worked. And somebody said the commercial version of DD-WRT might have it, though I could not find confirmation of that.

So why is Zeroconf important on a home router? Because configuration isn't necessarily a one time thing. There have been many different situations I've found myself in. For example, sometimes I need to add a second router to the network to create a second wireless access point to expand the coverage area. Since you can't have two DHCPd services running without a problem, one of those routers is going to get its DHCPd service disabled and its IP address changed to something other than the default either via static assignment or assigned by the other DHCPd service. 

But then what happens when you take that router off the network, either because you only needed a temporary expansion, or you needed to move it to another network to do a similar job, or maybe you are just building a new network? Well, unless you remember what the settings and IP address were, good luck finding that router's web gui. You have to play 'guess my IP address'. And this is true even if you didn't move the router but you need to tweak some setting…maybe the MAC address restriction list in the wireless access settings. In this case, you really don't want to hard reset the router and reconfigure everything. You just need to know the stupid IP address. 

Zeroconf solves all this nonsense.

So since DD-WRT (and all the other distros) fail to include Zeroconf, I am going to install it myself. Next time we will go through the work of actually doing that.


Part 3: Enabling JFFS & Adding USB Storage (previous)

Part 5: Installing Optware & Avahi (next)

(Avahi and Bonjour logos from Wikimedia Commons, claiming fair use.)

Copyright © PlayControl Software, LLC / Eric Wing