[avahi] avahi-autoipd

chris mcharg chris at outtrack.org
Mon Sep 4 06:07:26 PDT 2006


Hi again,

Just to make sure I've got all of this ok...

autoipd gets its chance to run and set an ipv4ll address when  
dhclient fails for some reason to set a routable address, and with  
the default script it can then get killed when dhclient obtains an ip  
address lease. On top of this, by default autoipd can remove the  
ipv4ll address when a routable address has somehow been set (by  
monitoring Netlink events?).  If a user/admin wants to ensure tcp  
transmission doesn't get cut during a switch from ipv4ll to routable,  
they can use --force-bind so the Netlink events have no effect, and  
also alter the dhclient hook script so autoipd is not killed.

Does that sound right?

A couple of other things...

Apple has this page on mixed routable and ip4ll addresses:
http://developer.apple.com/qa/qa2004/qa1357.html
I have no idea of the default routing settings of most of the linux  
distributions, but it seems debian at least doesn't have the settings  
for responding to a host with an ipv4ll address when a routable  
address is set.  Do you have any plans for providing defaults/ 
guidance for these?

In the current avahi-autoipd.action script, a label is set when using  
the ip tool, but no alias is defined when setting the address with  
ifconfig.  Was there a reason for that? (sorry... I don't know a lot  
about interface labels/aliases)

Sorry for all the questions,

Chris

On 2006/09/04, at 1:30, Lennart Poettering wrote:

> avahi-autoipd supports two different modes: the default mode is to
> assign an IPv4LL address only if no other routable address is
> configured. That means that IPv4ll is deactivated as soon as a
> routable address is added to the iface and activated again soon as a
> it is removed again.
>
> This mode is of course "vulnerable" to the problems you mentioned
> above. However this mode is probably the mode that will confuse people
> the least and causes the least routing problems. That's why I chose to
> make it the default.
>
> Alternatively you can pass "--force-bind" to avahi-autoipd. If you do
> this IPv4LL will be activated even when a routable address is already
> assigned to the interface. This will fix the problems you mentioned
> above, however might be confusing to people (see Debian bug #302684)
> and makes routing non-trivial. (multicast routing that is, such as
> what is needed for mDNS)
>
> The actual interface configuration is done by an action script which
> is called whenever an IPv4LL address needs to be added or removed from
> the network interface. This is similar to the way ISC's dhclient
> works.
>
> The default action script uses Linux' iproute tool for adding the
> address to the the network interface. The address is added with link
> local scope and is labeled "eth0:avahi". For the legacy IP
> configuration tools such as "ifconfig" such an address will show up as
> alias interface "eth0:avahi".
>
> With minor changes on the action script you could create a mode where
> zeroconf is only activated when no other address is configured, but
> the zeroconf address is left on the interface, even after a routable
> address is configured later in time. This however I would consider
> "configuration" and is as such left to the user/administrator.
>
> Lennart
>




More information about the avahi mailing list