|Version 4 (modified by lennart, 7 years ago)|
Before reading this article make sure you know what IPv4LL and DHCP are and how they work.
A few notes on packaging and installing avahi-autoipd:
avahi-autoipd is best used as a plugin for ISC's dhclient. To work like this you need to hook it into dhclient's action script which is called (at least on Debian) /sbin/dhclient-script. On Debian this is easily done by putting two script files into /etc/dhcp3/dhclient-enter-hooks.d/ resp. /etc/dhcp3/dhclient-exit-hooks.d/. Sample implementations for these scripts are available in SVN:
Those scripts make sure that avahi-autoipd is automatically started when dhclient fails to acquire an IP address.
Similar scripts can be written for other DHCP client implementations.
Because avahi-autoipd makes a good plugin for dhclient, we encourage you to "recommend" it from the dhclient package and vice versa. (If your packaging format supports that, like Debian's.)
avahi-autoipd implements an official IETF RFC (RFC3927) and has been available in MacOSX and Windows since Win98, hence we see not much reason for not enabling it by default, except of course security considerations. avahi-autoipd drops privs and chroot()s (at least on Linux), which is much more than most alternative implementations, do. Hence we believe it is safe enough to enable it by default in all installations.
avahi-autoipd doesn't depend on any other Avahi library, hence it makes sense to install it even if Avahi itself is not installed.
In some sitautions it makes sense to enable only IPv4LL and not DHCP (ad-hoc networks like Bluetooth PANs, WLAN Ad-Hoc networks, eth1394 connections, USB-to-USB ethernet cables, Ethernet cross cables). For these situations make sure to allow avahi-autoipd to be used as primary IP address configuration method in your network configuration tool. "Primary" means that it is the only tool in charge for configuring the IP addreses.
To allow communication between machines which only have an IPv4LL address assigned and those which only have a routable address assigned you might want to add the following two routes to the network configuration by default:
route add -net 169.254.0.0 netmask 255.255.0.0 dev eth0 metric 99 route add default dev eth0 metric 99
This is recommended by Apple http://developer.apple.com/qa/qa2004/qa1357.html, however might be a security problem and cause network timeouts. The entire implications are not clear to us. Nonetheless we recommend to add these rules, since they affect communication only if no other default route is specified.
If available we encourage you to use the ip tool from the iproute package instead of the legacy route tool for these routes:
ip route add 169.254.0.0/16 dev realtek0 metric 1000 scope link ip route add default dev realtek0 metric 1000 scope link
These routes have to be added for every valid Ethernet interface. And need to be added on all hsosts: those which have IPv4LL configured and those which do not.
BTW, this page is a Wiki, you're welcome to edit it. (Requires a simple registration - no email address, nothing - just click on Register on the top right)