summaryrefslogtreecommitdiff
path: root/ahcpd.man
blob: eb91e4521defb7c103382748209d1d0b7b4034cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
.TH AHCPD 8
.SH NAME
ahcpd \- ad-hoc configuration daemon
.SH SYNOPSIS
.B ahcpd
.IR option ...
[
.B \-\-
]
.IR interface ...
.SH DESCRIPTION
AHCP is a configuration protocol that can replace DHCP on networks without
transitive connectivity, such as mesh networks.
.SH OPTIONS
.TP
.BI \-m " multicast-address"
Specify the link-local multicast address to be used by AHCP.  The
default is ff02::cca6:c0f9:e182:5359.
.TP
.BI \-p " port"
Specify the UDP port number to be used by AHCP.  The default is 5359.
.TP
.B \-n
Operate as a forwarder: participate in the flooding protocol, but don't
actually perform any configuration.
.TP
.B \-4
Only attempt to configure IPv4 addresses.
.TP
.B \-6
Only attempt to configure IPv6 addresses.
.TP
.B \-N
Do not configure DNS.
.TP
.BI \-t " time"
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.
.TP
.BI \-s " script"
Specify the configuration script to run.  The default is
.BR /etc/ahcp/ahcp-config.sh .
.TP
.BI \-d " level"
Set the debug level to
.I level
(default 1).
.TP
.BI \-i " filename"
Specify the filename containing this host's unique id.  The default is
.BR /var/lib/ahcp\-unique\-id .
If it doesn't exist, it will be created by
.BR ahcpd .
.TP
.BI \-c " filename"
Specify the name of the configuration file.
.TP
.BI \-C " statement"
Specify a configuration statement directly on the command line.
.TP
.B \-D
Daemonise at startup.
.TP
.BI \-L " logfile"
Specify a file to log random ``how do you do?'' messages to.  This
defaults to standard error if not daemonising, and to
.B /var/log/ahcpd.log
otherwise.
.TP
.BI \-I " pidfile"
Specify a file to write our process id to.  The default is
.B /var/run/ahcpd.pid.
.SH 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
.RB `` # ''
and terminate at the end of the line.

The following keywords are recognised:
.TP
.BR mode " " server | 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
.B \-n
flag is present on the command line.  If present, this must be the first
line in the configuration file.
.TP
.BI prefix " prefix"
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.
.TP
.BI lease-dir " directory"
Specifies a directory to store lease files.  This keyword is only valid
in server configurations.
.TP
.BI name-server " address"
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.
.TP
.BI ntp-server " address"
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.
.SH FILES
.TP
.B /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.
.TP
.BR /etc/ahcp/ahcp\-config.sh
The script that performs the actual configuration.  It will be passed one
argument, which is either
.B start
or
.BR stop .
.TP
.B /etc/ahcp/ahcp\-local.sh
If this is an executable script, it will be called by
.B ahcp\-config.sh
just after configuring or deconfiguring. It will be passed one
argument, which is either
.B start
or
.BR stop .
.SH SIGNALS
.TP
.B SIGUSR1
Print
.BR ahcpd 's
status to standard output or to the log file.
.TP
.B SIGUSR2
Check all interfaces for status changes, then reopen the log file.
.SH 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
.B 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 \[em]
.B ahcpd
actually checks with the kernel for time synchronisation, so real NTP is
necessary.
.SH SEE ALSO
.BR dhcpcd (8),
.BR dhclient (8),
.BR babeld (8),
.BR olsrd (8),
.BR ntpd (8),
.IR "The Ad-Hoc Configuration Protocol" .
.SH AUTHOR
Juliusz Chroboczek.