ahcpd - ad-hoc configuration daemon
Contents
Configuration File Format
The configuration is a sequence of lines, each of which starts with one of the keywords below. Blank
lines are ignored. Comments are introduced with an octothorp ``#'' and terminate at the end of the line.
The following keywords are recognised:
modeserver|client|forwarder
Specifies whether the daemon operates as a server, a client, or a forwarder. If omitted, the
default is to operate as a client, unless the -n flag is present on the command line. If present,
this must be the first line in the configuration file.
prefixprefix
Specifies a prefix to use for configuring clients. This keyword is only valid in server
configurations, and may be specified twice, once for IPv4 and once for IPv6.
lease-dirdirectory
Specifies a directory to store lease files. This keyword is only valid in server configurations.
name-serveraddress
Specifies the address of a DNS server to configure clients with. This keyword is only valid in
server configurations, and may be repeated multiple times.
ntp-serveraddress
Specifies the address of an NTP server to configure clients with. This keyword is only valid in
server configurations, and may be repeated multiple times.
Description
AHCP is a configuration protocol that can replace DHCP on networks without transitive connectivity, such
as mesh networks.
Files
/var/lib/ahcp-unique-id
An 8-byte long file containing this host's unique id. If it doesn't exist, a new unique id will
be generated from an interface's MAC address.
/etc/ahcp/ahcp-config.sh
The script that performs the actual configuration. It will be passed one argument, which is
either start or stop.
/etc/ahcp/ahcp-local.sh
If this is an executable script, it will be called by ahcp-config.sh just after configuring or
deconfiguring. It will be passed one argument, which is either start or stop.
Name
ahcpd - ad-hoc configuration daemon
Notes
Since the AHCP protocol is designed for mesh networks, it doesn't have any provisions for setting routing
parameters such as a default gateway, the IPv4 network mask and the IPv6 list of on-link prefixes; these
are expected to be provided by a full-fledged routing protocol for mesh nodes, and by router
advertisements for ordinary nodes.
The AHCP server should use NTP to synchronise its clock. If a server instance of ahcpd doesn't detect
time synchronisation, it will only give out leases for a short period of time, and be extremely
conservative about releasing them. Note that an SNTP client is not enough — ahcpd actually checks with
the kernel for time synchronisation, so real NTP is necessary.
Options
-mmulticast-address
Specify the link-local multicast address to be used by AHCP. The default is
ff02::cca6:c0f9:e182:5359.
-pport
Specify the UDP port number to be used by AHCP. The default is 5359.
-n Operate as a forwarder: participate in the flooding protocol, but don't actually perform any
configuration.
-4 Only attempt to configure IPv4 addresses.
-6 Only attempt to configure IPv6 addresses.
-N Do not configure DNS.
-ttime
Specify the time, in seconds, for which leases are requested. The default is slightly over one
hour. Must be between five minutes and a year.
-sscript
Specify the configuration script to run. The default is /etc/ahcp/ahcp-config.sh.
-dlevel
Set the debug level to level (default 1).
-ifilename
Specify the filename containing this host's unique id. The default is /var/lib/ahcp-unique-id.
If it doesn't exist, it will be created by ahcpd.
-cfilename
Specify the name of the configuration file.
-Cstatement
Specify a configuration statement directly on the command line.
-D Daemonise at startup.
-Llogfile
Specify a file to log random ``how do you do?'' messages to. This defaults to standard error if
not daemonising, and to /var/log/ahcpd.log otherwise.
-Ipidfile
Specify a file to write our process id to. The default is /var/run/ahcpd.pid.See Also
dhcpcd(8), dhclient(8), babeld(8), olsrd(8), ntpd(8), TheAd-HocConfigurationProtocol.
Signals
SIGUSR1
Print ahcpd's status to standard output or to the log file.
SIGUSR2
Check all interfaces for status changes, then reopen the log file.
Synopsis
ahcpdoption... [ -- ] interface...
