How to assign foo.local domains with zeroconf

Levi Pearson levipearson at
Fri Mar 16 17:30:13 MDT 2012

On Fri, Mar 16, 2012 at 2:02 PM, AJ ONeal <coolaj86 at> wrote:
> I thought the whole point of mDNS was for a device on a network to be able
> to advertise itself so that you can go to `ping foo-device.local` and get
> it's IP address.
> For example, I've got a Western Digital WorldBook that I access from any
> computer on the network as `big-guy.local`.
> ... maybe I should just reboot it and wireshark its network traffic.

That is indeed the point of mDNS.  The mDNS RFC talks about two
entities, the mDNS Querier and the mDNS Responder.  The Querier is the
entity that wishes to resolve a ".local" name to an address, and the
Responder is the entity that recognizes if it has the answer to any
given query and, if so, provides the answer.  The RFC defines how the
query/answer interaction should happen on the network and the
differences in behavior between mDNS and DNS, but it does *not* define
how a Responder is configured to know what names it can give answers
to queries about.  That is an implementation decision left to the
programmer of the Responder entity.

I have written a program (unfortunately not something I can share)
that does something like what you were asking.  It has a web
interface, and it advertises services via mDNS and DNS-SD based on web
interaction.  To implement this, I downloaded Apple's source code for
their mDNSResponder, learned its API, and wrote a program in C that
both listened to HTTP requests and made calls to the mDNSResponder
API.  There was no XML or UDP-based configuration.  The mDNS
queries/answers go over UDP, of course, but they use the DNS packet
format, which is about as far from XML as you can get.

So, the only thing I can tell you is to find yourself a mDNS Responder
implementation and read its documentation.  I have already given you a
link to one that is probably already installed, or at least is easily
available, for your Linux server.  You seem to want someone to tell
you, "Just write this chunk of XML to UDP port xxxx and it's done!"
but, if some such Zeroconf implementation exists, then that mechanism
is purely implementation-specific and I have no knowledge about it.
Just like any other non-standard network server, you're going to have
to find an implementation, read the documentation, and do the
implementation-specific configuration.


More information about the PLUG mailing list