[avahi] General Avahi usage questions

Lennart Poettering lennart at poettering.net
Wed Feb 10 14:26:36 PST 2010


On Sat, 06.02.10 18:46, Linus Lüssing (linus.luessing at web.de) wrote:

> hi guys. I was looking for a way to get pidgin/libpurple working
> with avahi+ipv6. but then I realised, that I'm lacking some basic
> knowledge about avahi :)
> 
> first question: I think I remember having the avahi-daemon running
> which assigned an ipv4 address on a new alias interface. when does
> this happen, when not?

avahi-autoipd is usually used as a fallback for dhcp.

> I also found this avahi-ipauto thingy, but it does not seem to be
> running for this avahi-ip4ll stuff to assign a 169.254.0.0/16
> adress
> -169.254.0.0/24 and 169.254.254.0/24 (if I remember right)

uh? avahi-autoipd will assign one of those addresses if no other
address is configured via dhcp or so.

> 2nd question: how can I look up the ip addresses that are assigned
> to mylaptop.local (mylaptop should just be the local host name in
> /etc/hosts on 127.0.1.1 on a debian system, right?)

getent hosts mylaptop.local

(you need nss-mdns installed for that)

Avahi will always announce the "best" address it can find on each
interface. Meaning that global addresses are generally preferred over
link-local ones.

> 3rd question: when exactly is avahi-dnsconfd needed and why? Is my
> assupmtion right, that I need this thing, if I want to use
> applications that are not utilising avahi (for instance a normal
> ping tool) and I want to reach mylaptop.local with that?

It's useful when unicast-DNS server adresses are stored in multicast
DNS. it could be used to configure unicast DNS servers in a non-dhcp
environment. It is a more exotic feature and hence not installed by
default on most distros.

> 4th question: so an application that uses the libavahi can tell
> the avahi-daemon to announce a certain service with the specified
> port. which ip addresses would/should the avahi-daemon be
> announcing then?

as mentioned above avahi uses the "best" ip adress of each respective
iface, and treat every iface seperately.

> 5th question: what has to be kept in mind when using avahi with
> ipv4+ipv6 or ipv6 only? read this article in the german linux
> maganzine  03/06. at the end it is saying that for ipv6 stateless
> autoconfiguration, avahi-dnsconfd is necessary. sounds plausible
> because of the lack of a dhcp server. but why is this not the case
> for avahi with ipv4?

Some awesome dude wrote that article. He is really brainy and smart. I
am a great admirer of his ;-)

That said, I cannot remember I wrote "necessary" in that
article. useful, yes. But necessary, no. In IPv4 if you do automatic
configuration of routable IP adresses you use DHCP. And DHCP allows
configuration of unicast DNS servers anyway. That's why the
avahi-dnsconfd stuff is not really that useful there.

Lennart

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


More information about the avahi mailing list