avahi-autoipd.action
Configure a link-local IP address automatically
SYNOPSIS
This script is invoked by the avahi-autoipd daemon, not directly by users.
avahi-autoipd.action <interface> <script-state> <address> <netmask> [client-id]
PARAMETERS
<interface>
The name of the network interface for which the action is being performed (e.g., eth0, wlan0).
<script-state>
Indicates the state or type of action being requested by the daemon. Common values include BOUND (address assigned), UNBOUND (address released), CONFLICT (address conflict detected), and STOP (daemon stopping).
<address>
The IPv4 Link-Local address (e.g., 169.254.x.x) that is being assigned, released, or is in conflict.
<netmask>
The network mask associated with the IP address (typically 255.255.0.0 for Link-Local addresses).
[client-id]
An optional client identifier, though less commonly used or described in standard documentation for this script.
DESCRIPTION
The avahi-autoipd.action is a critical helper script utilized by the avahi-autoipd (Avahi AutoIP Daemon) to manage IPv4 Link-Local addressing (also known as APIPA or AutoIP). This daemon assigns IP addresses from the 169.254.0.0/16 range when no DHCP server is available or static configuration is present on a network interface.
Unlike typical Linux commands, avahi-autoipd.action is not intended for direct user execution. Instead, it acts as an event handler, being invoked by avahi-autoipd whenever a significant network event occurs concerning Link-Local IP assignment. These events include successfully binding an address, releasing an address, or detecting an IP address conflict.
The script receives parameters from the daemon indicating the specific event and relevant network details (interface, IP address, netmask). It then uses these parameters to perform the necessary system-level network configuration, typically by executing commands like ip to add or remove IP addresses from the specified network interface. Its primary role is to ensure seamless network connectivity in ad-hoc or unmanaged network environments.
CAVEATS
This script is part of the Avahi daemon suite and is not intended for direct manual execution by users. Modifications to this script should be done with extreme caution, as incorrect changes can disrupt network connectivity and the proper functioning of the Avahi Link-Local IP assignment. Its functionality relies on the underlying system's networking tools, primarily the ip command. It runs with privileges necessary to modify network interfaces, typically root.
STANDARD LOCATION
The avahi-autoipd.action script is typically located at /etc/avahi/avahi-autoipd.action on most Linux distributions. Distributions may provide a default script, which can be customized by system administrators if specific network configuration behaviors are required beyond standard IP address assignment.
SCRIPT-STATE ACTIONS
The <script-state> parameter dictates the primary action:
- BOUND: When avahi-autoipd successfully acquires a Link-Local IP address. The script will add this IP address to the specified interface.
- UNBOUND: When avahi-autoipd releases a previously bound Link-Local IP address, for example, upon detecting a DHCP server or manual static configuration. The script will remove the IP address from the interface.
- CONFLICT: When an IP address conflict is detected (another device on the network is using the same Link-Local IP). The script might log the event or take no action if the daemon itself handles re-probing.
- STOP: When the avahi-autoipd daemon is shutting down. The script will typically remove any Link-Local IP addresses it previously assigned.
HISTORY
The avahi-autoipd.action script is an integral part of the Avahi project, initiated by Lennart Poettering. Avahi aims to provide Zeroconf (Zero Configuration Networking) capabilities, including mDNS (multicast DNS) and DNS-SD (DNS Service Discovery), for Linux and other Unix-like systems. Link-Local IP addressing, managed by avahi-autoipd and its action script, is a fundamental component of Zeroconf, enabling devices to automatically obtain IP addresses and communicate on a local network without the need for manual configuration or a central DHCP server. This event-driven scripting model is a common design pattern in Linux daemons for handling external system interactions.
SEE ALSO
avahi-autoipd(8), avahi-daemon(8), ip(8), dhclient(8), ifconfig(8)


