avahi-autoipd.action
Configure a link-local IP address automatically
SYNOPSIS
avahi-autoipd.action interface
PARAMETERS
interface
The network interface to configure.
For example: eth0, wlan0.
DESCRIPTION
The `avahi-autoipd.action` script is used to configure an IPv4 link-local address using the `avahi-autoipd` daemon. It's typically invoked by network management scripts (like those in `/etc/network/interfaces.d`) to automatically configure an IP address in the 169.254.x.x range when DHCP fails. This allows devices on a local network to communicate without a central DHCP server. The script checks if another interface already has an address in the link-local range. If not, it picks an address, probes the network to avoid conflicts, and configures the interface with the chosen address, netmask, and sets up an ARP announcement to inform other devices on the LAN.
CAVEATS
This script relies on the `avahi-autoipd` daemon being installed and running.
It only configures IPv4 addresses.
Manual configuration may be required in complex network environments.
OPERATION
When executed, `avahi-autoipd.action` checks the existing IP configuration on the specified interface and other interfaces to avoid address conflicts. If no conflicting addresses are found, it selects a random address within the 169.254/16 range (excluding the network and broadcast addresses), probes the network by sending ARP requests to ensure the address is not already in use, configures the interface with the selected IP address and a 255.255.0.0 netmask, and then sends ARP announcements to notify other devices of the new address.
ERROR HANDLING
The script typically outputs error messages to standard error if it encounters problems, such as failure to find the specified interface or an inability to configure the interface. Consult system logs for more details if problems occur.
HISTORY
The `avahi-autoipd` package and associated scripts were developed to provide a simple, zeroconf-compliant method for automatic IP address configuration in the absence of DHCP. It became prevalent in environments where relying on a DHCP server wasn't always feasible, such as small home networks or ad-hoc networks. Its usage peaked with the broader adoption of Avahi for service discovery.
SEE ALSO
avahi-autoipd(8), ifconfig(8), ip(8)