[avahi] virtual hosts

Lennart Poettering lennart at poettering.net
Tue Nov 20 10:02:41 PST 2007

On Mon, 05.11.07 14:57, Bluejack (bluejack at bluejack.com) wrote:

> Ahoy,
> I would have thought this would be a common enough question for the
> faq, but I can't even find reference to it in the mailing list
> archives. I'm probably searching wrong. Anyway, perhaps someone could
> help me.
> How do I publish an alias to a certain machine?
> Ie., I have 'foo.local' which also needs to be known as 'bar.local' ...
> Can avahi do this?

Yes, you can register whatever RR makes you happy. Just write a small
Avahi client and register an additionaö A or CNAME RR for your
machine. It's not black magic.

> Nothing in the (rather primitive) docs suggest that the host-name
> config entry can take multiple values;

If you complain about the docs, than please remember that this
software written by volunteers and it is given to you for free. So,
instead of complaining, how about reading the sources and contributing
better docs? Also, the Avahi web site is a Wiki and can be edited

> and having the daemon publish an additional mapping through an entry
> in the avahi hosts file doesn't seem to work.

Yes, since that registers both a A and a PTR RR. In the latter will
conflict with the main host name of your machine. If you want to
register just an alias, then you want to register only an A or CNAME
RR. (see above)

If you just want to define aliases via a static file read by the Avahi
server, then you're welcome to send a patch for this!


Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

More information about the avahi mailing list