[avahi] avahi-autoipd

Lennart Poettering lennart at poettering.net
Sun Sep 3 09:30:06 PDT 2006


On Sun, 03.09.06 14:00, chris mcharg (chris at outtrack.org) wrote:

Hi!

> One thing I'd like to note (something I picked up from the busybox  
> mailing list), is that if you allow the dhcp client to kill autoipd  
> when it sets a routable ip address, it's possible that current tcp  
> transmission taking place with the ip4ll address will just be cut.  A  
> possible resolution for this was to start the ip4ll daemon on an ip  
> alias for the same interface that the dhcp client is trying to obtain  
> an address for, and then just leave it running there after the  
> routable address is set (It seems that the routable address is  
> selected over the ip4ll address automatically?).  Do you have any  
> thoughts on this?

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

-- 
Lennart Poettering; lennart [at] poettering [dot] net
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/


More information about the avahi mailing list