Work to Date

While Linux distributions do not currently support zeroconf networking very well, some progress has been made, and some of the required elements are now available. This section provides a sample overview, mainly to show it isn't all hype.

zcip

zcip is an implementation of the ad-hoc link-local IP autoconfiguration algorithm described in the IETF Draft "Dynamic Configuration of IPv4 link-local addresses"[1]. zcip is mostly conformant to the latest draft.

zcip uses libpcap and libnet (which in turn use fairly standardised socket interfaces provided by the Linux kernel, and also by the various BSD kernels) to provide the required functionality. It runs entirely in userspace, and most kernels are shipped with the required configuration options set[2].

CUPS

CUPS is an implementation of the Internet Printing Protocol, and is rapidly becoming the industry standard for network printing. Internet Printing Protocol does not specify a way of locating network printers, but CUPS has its own protocol. Unfortunately the CUPS printer discovery protocol is broadcast based, and uses a lot of network bandwidth, to the extent where some organisations turn it off.

However CUPS also includes a Service Location Protocol option, which is built if the configuration process finds suitable system libraries (almost always OpenSLP). This can offer a standardised way of locating any printer on the network, without excessive network traffic, potentially including printer location across routers.

The CUPS implementation currently exposes limitations in OpenSLP. In particular, the CUPS daemon is not threaded, and OpenSLP doesn't support the asynchronous API at this stage, so the daemon essentially hangs waiting for the service discovery to time out each time it runs the service discovery loop (30 seconds, by default). Future changes to CUPS (to add a standalone monitoring server for SLP) and OpenSLP (to support the asynchronous API) should rectify these issues.

Demos

As an example, I have produced a simple demonstration based on rsync. The rsync server advertises each of its modules, and the client can identify all the rsync servers that are available.

The changes to rsync are mostly service location protocol boilerplate - two functions were inserted into the existing client and server routines, and a small change was made to the configuration file to allow variable timeouts.

Tools

Apart from OpenSLP and zcip (which were discussed previously), the main tool I use for Zeroconf development is Ethereal[3]. You need at least version 0.9.7 to have any SLPv2 dissection functionality, and version 0.9.8 to get improved handling of mDNS and DNS service discovery.

Notes

[1]

At the time of writing, the current version was available as http://www.ietf.org/internet-drafts/draft-ietf-zeroconf-ipv4-linklocal-07.txt

[2]

One important exception is that Linus' kernels come with a default .config that does not have the "Socket Filtering" option (CONFIG_FILTER) turned on. zcip now detects this, and warns you to reconfigure the kernel.

[3]

You can download Ethereal from http://www.ethereal.com. It is GPL'd software.