]>
Commit | Line | Data |
---|---|---|
08fe7cdb TL |
1 | .\" dhcpd.8 |
2 | .\" | |
69c620f2 TL |
3 | .\" Copyright (c) 1996-2001 Internet Software Consortium. |
4 | .\" Redistribution and use in source and binary forms, with or without | |
5 | .\" modification, are permitted provided that the following conditions | |
6 | .\" are met: | |
08fe7cdb | 7 | .\" |
69c620f2 TL |
8 | .\" 1. Redistributions of source code must retain the above copyright |
9 | .\" notice, this list of conditions and the following disclaimer. | |
10 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
11 | .\" notice, this list of conditions and the following disclaimer in the | |
12 | .\" documentation and/or other materials provided with the distribution. | |
13 | .\" 3. Neither the name of The Internet Software Consortium nor the names | |
14 | .\" of its contributors may be used to endorse or promote products derived | |
15 | .\" from this software without specific prior written permission. | |
08fe7cdb | 16 | .\" |
69c620f2 TL |
17 | .\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND |
18 | .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, | |
19 | .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
20 | .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
21 | .\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR | |
22 | .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
23 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
24 | .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | |
25 | .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | |
26 | .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
27 | .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT | |
28 | .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
29 | .\" SUCH DAMAGE. | |
08fe7cdb | 30 | .\" |
69c620f2 TL |
31 | .\" This software has been written for the Internet Software Consortium |
32 | .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc. | |
33 | .\" To learn more about the Internet Software Consortium, see | |
34 | .\" ``http://www.isc.org/''. To learn more about Vixie Enterprises, | |
35 | .\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see | |
36 | .\" ``http://www.nominum.com''. | |
ee0cda4d TL |
37 | .TH dhcpd 8 |
38 | .SH NAME | |
5e6b52dc | 39 | dhcpd - Dynamic Host Configuration Protocol Server |
ee0cda4d TL |
40 | .SH SYNOPSIS |
41 | .B dhcpd | |
42 | [ | |
43 | .B -p | |
44 | .I port | |
45 | ] | |
d27562c7 TL |
46 | [ |
47 | .B -f | |
48 | ] | |
49 | [ | |
5e6b52dc TL |
50 | .B -d |
51 | ] | |
52 | [ | |
6edb572b TL |
53 | .B -q |
54 | ] | |
55 | [ | |
897065dc TL |
56 | .B -t |
57 | | | |
58 | .B -T | |
59 | ] | |
60 | [ | |
e2ac5814 TL |
61 | .B -cf |
62 | .I config-file | |
63 | ] | |
64 | [ | |
65 | .B -lf | |
66 | .I lease-file | |
67 | ] | |
68 | [ | |
51fe0cce TL |
69 | .B -tf |
70 | .I trace-output-file | |
71 | ] | |
72 | [ | |
73 | .B -play | |
74 | .I trace-playback-file | |
75 | ] | |
76 | [ | |
d27562c7 TL |
77 | .I if0 |
78 | [ | |
79 | .I ...ifN | |
80 | ] | |
81 | ] | |
ee0cda4d | 82 | .SH DESCRIPTION |
5e6b52dc TL |
83 | The Internet Software Consortium DHCP Server, dhcpd, implements the |
84 | Dynamic Host Configuration Protocol (DHCP) and the Internet Bootstrap | |
85 | Protocol (BOOTP). DHCP allows hosts on a TCP/IP network to request | |
86 | and be assigned IP addresses, and also to discover information about | |
87 | the network to which they are attached. BOOTP provides similar | |
88 | functionality, with certain restrictions. | |
f21a7b4a TL |
89 | .SH CONTRIBUTIONS |
90 | .PP | |
46a65180 TL |
91 | This software is free software. At various times its development has |
92 | been underwritten by various organizations, including the ISC and | |
93 | Vixie Enterprises. The development of 3.0 has been funded almost | |
94 | entirely by Nominum, Inc. | |
95 | .PP | |
96 | At this point development is being shepherded by Ted Lemon, and hosted | |
97 | by the ISC, but the future of this project depends on you. If you | |
98 | have features you want, please consider implementing them. | |
ee0cda4d TL |
99 | .SH OPERATION |
100 | .PP | |
08fe7cdb TL |
101 | The DHCP protocol allows a host which is unknown to the network |
102 | administrator to be automatically assigned a new IP address out of a | |
103 | pool of IP addresses for its network. In order for this to work, the | |
104 | network administrator allocates address pools in each subnet and | |
ee0cda4d TL |
105 | enters them into the dhcpd.conf(5) file. |
106 | .PP | |
08fe7cdb | 107 | On startup, dhcpd reads the |
ee0cda4d | 108 | .IR dhcpd.conf |
5e6b52dc TL |
109 | file and stores a list of available addresses on each subnet in |
110 | memory. When a client requests an address using the DHCP protocol, | |
111 | dhcpd allocates an address for it. Each client is assigned a lease, | |
112 | which expires after an amount of time chosen by the administrator (by | |
113 | default, one day). Before leases expire, the clients to which leases | |
114 | are assigned are expected to renew them in order to continue to use | |
115 | the addresses. Once a lease has expired, the client to which that | |
116 | lease was assigned is no longer permitted to use the leased IP | |
117 | address. | |
ee0cda4d | 118 | .PP |
08fe7cdb | 119 | In order to keep track of leases across system reboots and server |
ee0cda4d TL |
120 | restarts, dhcpd keeps a list of leases it has assigned in the |
121 | dhcpd.leases(5) file. Before dhcpd grants a lease to a host, it | |
122 | records the lease in this file and makes sure that the contents of the | |
123 | file are flushed to disk. This ensures that even in the event of a | |
124 | system crash, dhcpd will not forget about a lease that it has | |
125 | assigned. On startup, after reading the dhcpd.conf file, dhcpd | |
126 | reads the dhcpd.leases file to refresh its memory about what leases | |
127 | have been assigned. | |
128 | .PP | |
129 | New leases are appended to the end of the dhcpd.leases | |
08fe7cdb | 130 | file. In order to prevent the file from becoming arbitrarily large, |
ee0cda4d TL |
131 | from time to time dhcpd creates a new dhcpd.leases file from its |
132 | in-core lease database. Once this file has been written to disk, the | |
133 | old file is renamed | |
134 | .IR dhcpd.leases~ , | |
135 | and the new file is renamed dhcpd.leases. If the system crashes in | |
136 | the middle of this process, whichever dhcpd.leases file remains will | |
137 | contain all the lease information, so there is no need for a special | |
138 | crash recovery process. | |
139 | .PP | |
5e6b52dc TL |
140 | BOOTP support is also provided by this server. Unlike DHCP, the BOOTP |
141 | protocol does not provide a protocol for recovering | |
142 | dynamically-assigned addresses once they are no longer needed. It is | |
143 | still possible to dynamically assign addresses to BOOTP clients, but | |
144 | some administrative process for reclaiming addresses is required. By | |
145 | default, leases are granted to BOOTP clients in perpetuity, although | |
146 | the network administrator may set an earlier cutoff date or a shorter | |
147 | lease length for BOOTP leases if that makes sense. | |
148 | .PP | |
149 | BOOTP clients may also be served in the old standard way, which is to | |
150 | simply provide a declaration in the dhcpd.conf file for each | |
151 | BOOTP client, permanently assigning an address to each client. | |
ee0cda4d TL |
152 | .PP |
153 | Whenever changes are made to the dhcpd.conf file, dhcpd must be | |
154 | restarted. To restart dhcpd, send a SIGTERM (signal 15) to the | |
155 | process ID contained in | |
5e6b52dc TL |
156 | .IR RUNDIR/dhcpd.pid , |
157 | and then re-invoke dhcpd. Because the DHCP server database is not as | |
158 | lightweight as a BOOTP database, dhcpd does not automatically restart | |
159 | itself when it sees a change to the dhcpd.conf file. | |
4e19a6df TL |
160 | .PP |
161 | Note: We get a lot of complaints about this. We realize that it would | |
162 | be nice if one could send a SIGHUP to the server and have it reload | |
163 | the database. This is not technically impossible, but it would | |
164 | require a great deal of work, our resources are extremely limited, and | |
165 | they can be better spent elsewhere. So please don't complain about | |
166 | this on the mailing list unless you're prepared to fund a project to | |
167 | implement this feature, or prepared to do it yourself. | |
d27562c7 TL |
168 | .SH COMMAND LINE |
169 | .PP | |
5e6b52dc TL |
170 | The names of the network interfaces on which dhcpd should listen for |
171 | broadcasts may be specified on the command line. This should be done | |
172 | on systems where dhcpd is unable to identify non-broadcast interfaces, | |
173 | but should not be required on other systems. If no interface names | |
174 | are specified on the command line dhcpd will identify all network | |
175 | interfaces which are up, elimininating non-broadcast interfaces if | |
176 | possible, and listen for DHCP broadcasts on each interface. | |
d27562c7 | 177 | .PP |
5e6b52dc TL |
178 | If dhcpd should listen on a port other than the standard (port 67), |
179 | the | |
d27562c7 | 180 | .B -p |
5e6b52dc TL |
181 | flag may used. It should be followed by the udp port number on which |
182 | dhcpd should listen. This is mostly useful for debugging purposes. | |
d27562c7 | 183 | .PP |
5e6b52dc TL |
184 | To run dhcpd as a foreground process, rather than allowing it to run |
185 | as a daemon in the background, the | |
d27562c7 | 186 | .B -f |
5e6b52dc TL |
187 | flag should be specified. This is useful when running dhcpd under a |
188 | debugger, or when running it out of inittab on System V systems. | |
189 | .PP | |
190 | To have dhcpd log to the standard error descriptor, specify the | |
191 | .B -d | |
192 | flag. This can be useful for debugging, and also at sites where a | |
193 | complete log of all dhcp activity must be kept but syslogd is not | |
194 | reliable or otherwise cannot be used. Normally, dhcpd will log all | |
195 | output using the syslog(3) function with the log facility set to | |
196 | LOG_DAEMON. | |
e2ac5814 TL |
197 | .PP |
198 | Dhcpd can be made to use an alternate configuration file with the | |
199 | .B -cf | |
200 | flag, or an alternate lease file with the | |
201 | .B -lf | |
202 | flag. Because of the importance of using the same lease database at | |
203 | all times when running dhcpd in production, these options should be | |
204 | used \fBonly\fR for testing lease files or database files in a | |
205 | non-production environment. | |
6edb572b TL |
206 | .PP |
207 | When starting dhcpd up from a system startup script (e.g., /etc/rc), | |
208 | it may not be desirable to print out the entire copyright message on | |
209 | startup. To avoid printing this message, the | |
210 | .B -q | |
211 | flag may be specified. | |
897065dc TL |
212 | .PP |
213 | The DHCP server reads two files on startup: a configuration file, and | |
214 | a lease database. If the | |
215 | .B -t | |
216 | flag is specified, the server will simply test the configuration file | |
217 | for correct syntax, but will not attempt to perform any network | |
218 | operations. This can be used to test the a new configuration file | |
219 | automatically before installing it. | |
220 | .PP | |
221 | The | |
222 | .B -T | |
223 | flag can be used to test the lease database file in a similar way. | |
51fe0cce TL |
224 | .PP |
225 | The \fB-tf\fR and \fB-play\fR options allow you to specify a file into | |
226 | which the entire startup state of the server and all the transactions | |
227 | it processes are either logged or played back from. This can be | |
228 | useful in submitting bug reports - if you are getting a core dump | |
229 | every so often, you can start the server with the \fB-tf\fR option and | |
230 | then, when the server dumps core, the trace file will contain all the | |
231 | transactions that led up to it dumping core, so that the problem can | |
232 | be easily debugged with \fB-play\fR. | |
233 | .PP | |
234 | The \fB-play\fR option must be specified with an alternate lease file, | |
235 | using the \fB-lf\fR switch, so that the DHCP server doesn't wipe out | |
236 | your existing lease file with its test data. The DHCP server will | |
237 | refuse to operate in playback mode unless you specify an alternate | |
238 | lease file. | |
ee0cda4d | 239 | .SH CONFIGURATION |
ba7ed239 | 240 | The syntax of the dhcpd.conf(5) file is discussed seperately. This |
ee0cda4d | 241 | section should be used as an overview of the configuration process, |
ba7ed239 | 242 | and the dhcpd.conf(5) documentation should be consulted for detailed |
ee0cda4d TL |
243 | reference information. |
244 | .PP | |
245 | .SH Subnets | |
246 | dhcpd needs to know the subnet numbers and netmasks of all subnets for | |
247 | which it will be providing service. In addition, in order to | |
248 | dynamically allocate addresses, it must be assigned one or more ranges | |
249 | of addresses on each subnet which it can in turn assign to client | |
250 | hosts as they boot. Thus, a very simple configuration providing DHCP | |
08fe7cdb TL |
251 | support might look like this: |
252 | .nf | |
253 | .sp 1 | |
5e6b52dc | 254 | subnet 239.252.197.0 netmask 255.255.255.0 { |
08fe7cdb | 255 | range 239.252.197.10 239.252.197.250; |
5e6b52dc | 256 | } |
08fe7cdb | 257 | .fi |
ee0cda4d | 258 | .PP |
08fe7cdb TL |
259 | Multiple address ranges may be specified like this: |
260 | .nf | |
261 | .sp 1 | |
5e6b52dc TL |
262 | subnet 239.252.197.0 netmask 255.255.255.0 { |
263 | range 239.252.197.10 239.252.197.107; | |
08fe7cdb | 264 | range 239.252.197.113 239.252.197.250; |
5e6b52dc | 265 | } |
08fe7cdb | 266 | .fi |
ee0cda4d | 267 | .PP |
08fe7cdb TL |
268 | If a subnet will only be provided with BOOTP service and no dynamic |
269 | address assignment, the range clause can be left out entirely, but the | |
270 | subnet statement must appear. | |
ee0cda4d TL |
271 | .PP |
272 | .SH Lease Lengths | |
08fe7cdb TL |
273 | DHCP leases can be assigned almost any length from zero seconds to |
274 | infinity. What lease length makes sense for any given subnet, or for | |
275 | any given installation, will vary depending on the kinds of hosts | |
276 | being served. | |
ee0cda4d | 277 | .PP |
08fe7cdb TL |
278 | For example, in an office environment where systems are added from |
279 | time to time and removed from time to time, but move relatively | |
280 | infrequently, it might make sense to allow lease times of a month of | |
281 | more. In a final test environment on a manufacturing floor, it may | |
282 | make more sense to assign a maximum lease length of 30 minutes - | |
283 | enough time to go through a simple test procedure on a network | |
284 | appliance before packaging it up for delivery. | |
ee0cda4d | 285 | .PP |
08fe7cdb TL |
286 | It is possible to specify two lease lengths: the default length that |
287 | will be assigned if a client doesn't ask for any particular lease | |
288 | length, and a maximum lease length. These are specified as clauses | |
289 | to the subnet command: | |
290 | .nf | |
291 | .sp 1 | |
5e6b52dc TL |
292 | subnet 239.252.197.0 netmask 255.255.255.0 { |
293 | range 239.252.197.10 239.252.197.107; | |
294 | default-lease-time 600; | |
08fe7cdb | 295 | max-lease-time 7200; |
5e6b52dc | 296 | | |
08fe7cdb | 297 | .fi |
ee0cda4d | 298 | .PP |
08fe7cdb TL |
299 | This particular subnet declaration specifies a default lease time of |
300 | 600 seconds (ten minutes), and a maximum lease time of 7200 seconds | |
301 | (two hours). Other common values would be 86400 (one day), 604800 | |
302 | (one week) and 2592000 (30 days). | |
ee0cda4d | 303 | .PP |
08fe7cdb TL |
304 | Each subnet need not have the same lease\(emin the case of an office |
305 | environment and a manufacturing environment served by the same DHCP | |
306 | server, it might make sense to have widely disparate values for | |
307 | default and maximum lease times on each subnet. | |
ee0cda4d TL |
308 | .SH BOOTP Support |
309 | Each BOOTP client must be explicitly declared in the dhcpd.conf | |
08fe7cdb TL |
310 | file. A very basic client declaration will specify the client |
311 | network interface's hardware address and the IP address to assign to | |
312 | that client. If the client needs to be able to load a boot file from | |
313 | the server, that file's name must be specified. A simple bootp | |
314 | client declaration might look like this: | |
315 | .nf | |
316 | .sp 1 | |
fc5aedc9 TL |
317 | host haagen { |
318 | hardware ethernet 08:00:2b:4c:59:23; | |
5e6b52dc | 319 | fixed-address 239.252.197.9; |
08fe7cdb | 320 | filename "/tftpboot/haagen.boot"; |
5e6b52dc | 321 | } |
08fe7cdb | 322 | .fi |
ee0cda4d | 323 | .SH Options |
08fe7cdb TL |
324 | DHCP (and also BOOTP with Vendor Extensions) provide a mechanism |
325 | whereby the server can provide the client with information about how | |
326 | to configure its network interface (e.g., subnet mask), and also how | |
327 | the client can access various network services (e.g., DNS, IP routers, | |
328 | and so on). | |
ee0cda4d | 329 | .PP |
08fe7cdb TL |
330 | These options can be specified on a per-subnet basis, and, for BOOTP |
331 | clients, also on a per-client basis. In the event that a BOOTP | |
332 | client declaration specifies options that are also specified in its | |
333 | subnet declaration, the options specified in the client declaration | |
334 | take precedence. An reasonably complete DHCP configuration might | |
335 | look something like this: | |
336 | .nf | |
337 | .sp 1 | |
5e6b52dc TL |
338 | subnet 239.252.197.0 netmask 255.255.255.0 { |
339 | range 239.252.197.10 239.252.197.250; | |
340 | default-lease-time 600 max-lease-time 7200; | |
341 | option subnet-mask 255.255.255.0; | |
342 | option broadcast-address 239.252.197.255; | |
343 | option routers 239.252.197.1; | |
344 | option domain-name-servers 239.252.197.2, 239.252.197.3; | |
08fe7cdb | 345 | option domain-name "isc.org"; |
5e6b52dc | 346 | } |
08fe7cdb | 347 | .fi |
ee0cda4d | 348 | .PP |
08fe7cdb TL |
349 | A bootp host on that subnet that needs to be in a different domain and |
350 | use a different name server might be declared as follows: | |
351 | .nf | |
352 | .sp 1 | |
ba7ed239 TL |
353 | host haagen { |
354 | hardware ethernet 08:00:2b:4c:59:23; | |
5e6b52dc TL |
355 | fixed-address 239.252.197.9; |
356 | filename "/tftpboot/haagen.boot"; | |
357 | option domain-name-servers 192.5.5.1; | |
08fe7cdb | 358 | option domain-name "vix.com"; |
5e6b52dc | 359 | } |
08fe7cdb | 360 | .fi |
ee0cda4d | 361 | .PP |
5e6b52dc TL |
362 | A more complete description of the dhcpd.conf file syntax is provided |
363 | in dhcpd.conf(5). | |
90e0ef94 TL |
364 | .SH OMAPI |
365 | The DHCP server provides the capability to modify some of its | |
366 | configuration while it is running, without stopping it, modifying its | |
367 | database files, and restarting it. This capability is currently | |
368 | provided using OMAPI - an API for manipulating remote objects. OMAPI | |
369 | clients connect to the server using TCP/IP, authenticate, and can then | |
370 | examine the server's current status and make changes to it. | |
371 | .PP | |
372 | Rather than implementing the underlying OMAPI protocol directly, user | |
373 | programs should use the dhcpctl API or OMAPI itself. Dhcpctl is a | |
374 | wrapper that handles some of the housekeeping chores that OMAPI does | |
375 | not do automatically. Dhcpctl and OMAPI are documented in \fBdhcpctl(3)\fR | |
376 | and \fBomapi(3)\fR. | |
377 | .PP | |
378 | OMAPI exports objects, which can then be examined and modified. The | |
379 | DHCP server exports the following objects: lease, host, | |
380 | failover-state and group. Each object has a number of methods that | |
381 | are provided: lookup, create, and destroy. In addition, it is | |
382 | possible to look at attributes that are stored on objects, and in some | |
383 | cases to modify those attributes. | |
384 | .SH THE LEASE OBJECT | |
385 | Leases can't currently be created or destroyed, but they can be looked | |
386 | up to examine and modify their state. | |
387 | .PP | |
388 | Leases have the following attributes: | |
389 | .PP | |
390 | .B state \fIinteger\fR lookup, examine | |
391 | .RS 0.5i | |
392 | .nf | |
393 | 1 = free | |
394 | 2 = active | |
395 | 3 = expired | |
396 | 4 = released | |
397 | 5 = abandoned | |
398 | 6 = reset | |
399 | 7 = backup | |
400 | 8 = reserved | |
401 | 9 = bootp | |
402 | .fi | |
403 | .RE | |
404 | .PP | |
405 | .B ip-address \fIdata\fR lookup, examine | |
406 | .RS 0.5i | |
407 | The IP address of the lease. | |
408 | .RE | |
409 | .PP | |
410 | .B dhcp-client-identifier \fIdata\fR lookup, examine, update | |
411 | .RS 0.5i | |
412 | The | |
413 | client identifier that the client used when it acquired the lease. | |
414 | Not all clients send client identifiers, so this may be empty. | |
415 | .RE | |
416 | .PP | |
417 | .B client-hostname \fIdata\fR examine, update | |
418 | .RS 0.5i | |
419 | The value the client sent in the host-name option. | |
420 | .RE | |
421 | .PP | |
422 | .B host \fIhandle\fR examine | |
423 | .RS 0.5i | |
424 | the host declaration associated with this lease, if any. | |
425 | .RE | |
426 | .PP | |
427 | .B subnet \fIhandle\fR examine | |
428 | .RS 0.5i | |
429 | the subnet object associated with this lease (the subnet object is not | |
430 | currently supported). | |
431 | .RE | |
432 | .PP | |
433 | .B pool \fIhandle\fR examine | |
434 | .RS 0.5i | |
435 | the pool object associted with this lease (the pool object is not | |
436 | currently supported). | |
437 | .RE | |
438 | .PP | |
439 | .B billing-class \fIhandle\fR examine | |
440 | .RS 0.5i | |
441 | the handle to the class to which this lease is currently billed, if | |
442 | any (the class object is not currently supported). | |
443 | .RE | |
444 | .PP | |
445 | .B hardware-address \fIdata\fR examine, update | |
446 | .RS 0.5i | |
447 | the hardware address (chaddr) field sent by the client when it | |
448 | acquired its lease. | |
449 | .RE | |
450 | .PP | |
451 | .B hardware-type \fIinteger\fR examine, update | |
452 | .RS 0.5i | |
453 | the type of the network interface that the client reported when it | |
454 | acquired its lease. | |
455 | .RE | |
456 | .PP | |
457 | .B ends \fItime\fR examine | |
458 | .RS 0.5i | |
459 | the time when the lease's current state ends, as understood by the | |
460 | client. | |
461 | .RE | |
462 | .PP | |
463 | .B tstp \fItime\fR examine | |
464 | .RS 0.5i | |
465 | the time when the lease's current state ends, as understood by the | |
466 | server. | |
467 | .RE | |
468 | .B tsfp \fItime\fR examine | |
469 | .RS 0.5i | |
470 | the time when the lease's current state ends, as understood by the | |
471 | failover peer (if there is no failover peer, this value is | |
472 | undefined). | |
473 | .RE | |
474 | .PP | |
475 | .B cltt \fItime\fR examine | |
476 | .RS 0.5i | |
477 | The time of the last transaction with the client on this lease. | |
478 | .RE | |
479 | .SH THE HOST OBJECT | |
480 | Hosts can be created, destroyed, looked up, examined and modified. | |
481 | If a host declaration is created or deleted using OMAPI, that | |
482 | information will be recorded in the dhcpd.leases file. It is | |
483 | permissible to delete host declarations that are declared in the | |
484 | dhcpd.conf file. | |
485 | .PP | |
486 | Hosts have the following attributes: | |
487 | .PP | |
488 | .B name \fIdata\fR lookup, examine, modify | |
489 | .RS 0.5i | |
490 | the name of the host declaration. This name must be unique among all | |
491 | host declarations. | |
492 | .RE | |
493 | .PP | |
494 | .B group \fIhandle\fR examine, modify | |
495 | .RS 0.5i | |
496 | the named group associated with the host declaration, if there is one. | |
497 | .RE | |
498 | .PP | |
499 | .B hardware-address \fIdata\fR lookup, examine, modify | |
500 | .RS 0.5i | |
501 | the link-layer address that will be used to match the client, if any. | |
502 | Only valid if hardware-type is also present. | |
503 | .RE | |
504 | .PP | |
505 | .B hardware-type \fIinteger\fR lookup, examine, modify | |
506 | .RS 0.5i | |
507 | the type of the network interface that will be used to match the | |
508 | client, if any. Only valid if hardware-address is also present. | |
509 | .RE | |
510 | .PP | |
511 | .B dhcp-client-identifier \fIdata\fR lookup, examine, modify | |
512 | .RS 0.5i | |
513 | the dhcp-client-identifier option that will be used to match the | |
514 | client, if any. | |
515 | .RE | |
516 | .PP | |
517 | .B ip-address \fIdata\fR examine, modify | |
518 | .RS 0.5i | |
519 | a fixed IP address which is reserved for a DHCP client that matches | |
520 | this host declaration. The IP address will only be assigned to the | |
521 | client if it is valid for the network segment to which the client is | |
522 | connected. | |
523 | .RE | |
524 | .PP | |
525 | .B statements \fIdata\fR modify | |
526 | .RS 0.5i | |
527 | a list of statements in the format of the dhcpd.conf file that will be | |
528 | executed whenever a message from the client is being processed. | |
529 | .RE | |
530 | .PP | |
531 | .B known \fIinteger\fR examine, modify | |
532 | .RS 0.5i | |
533 | if nonzero, indicates that a client matching this host declaration | |
534 | will be treated as \fIknown\fR in pool permit lists. If zero, the | |
535 | client will not be treated as known. | |
536 | .RE | |
537 | .SH THE GROUP OBJECT | |
538 | Named groups can be created, destroyed, looked up, examined and | |
539 | modified. If a group declaration is created or deleted using OMAPI, | |
540 | that information will be recorded in the dhcpd.leases file. It is | |
541 | permissible to delete group declarations that are declared in the | |
542 | dhcpd.conf file. | |
543 | .PP | |
544 | Named groups currently can only be associated with | |
545 | hosts - this allows one set of statements to be efficiently attached | |
546 | to more than one host declaration. | |
547 | .PP | |
548 | Groups have the following attributes: | |
549 | .PP | |
550 | .B name \fIdata\fR | |
551 | .RS 0.5i | |
552 | the name of the group. All groups that are created using OMAPI must | |
553 | have names, and the names must be unique among all groups. | |
554 | .RE | |
555 | .PP | |
556 | .B statements \fIdata\fR | |
557 | .RS 0.5i | |
558 | a list of statements in the format of the dhcpd.conf file that will be | |
559 | executed whenever a message from a client whose host declaration | |
560 | references this group is processed. | |
561 | .RE | |
d758ad8c TL |
562 | .SH THE CONTROL OBJECT |
563 | The control object allows you to shut the server down. If the server | |
564 | is doing failover with another peer, it will make a clean transition | |
565 | into the shutdown state and notify its peer, so that the peer can go | |
566 | into partner down, and then record the "recover" state in the lease | |
567 | file so that when the server is restarted, it will automatically | |
568 | resynchronize with its peer. | |
569 | .PP | |
570 | On shutdown the server will also attempt to cleanly shut down all | |
571 | OMAPI connections. If these connections do not go down cleanly after | |
572 | five seconds, they are shut down pre-emptively. It can take as much | |
573 | as 25 seconds from the beginning of the shutdown process to the time | |
574 | that the server actually exits. | |
575 | .PP | |
576 | To shut the server down, open its control object and set the state | |
577 | attribute to 2. | |
ee0cda4d TL |
578 | .SH FILES |
579 | .B ETCDIR/dhcpd.conf, DBDIR/dhcpd.leases, RUNDIR/dhcpd.pid, | |
580 | .B DBDIR/dhcpd.leases~. | |
581 | .SH SEE ALSO | |
66b01364 | 582 | dhclient(8), dhcrelay(8), dhcpd.conf(5), dhcpd.leases(5) |
ee0cda4d TL |
583 | .SH AUTHOR |
584 | .B dhcpd(8) | |
90e0ef94 TL |
585 | was originally written by Ted Lemon under a contract with Vixie Labs. |
586 | Funding for this project was provided by the Internet Software | |
587 | Consortium. Version 3 of the DHCP server was funded by Nominum, Inc. | |
588 | Information about the Internet Software Consortium is available at | |
589 | .B http://www.isc.org/isc\fR. | |
590 | Information about Nominum and support contracts for DHCP and BIND can | |
591 | be found at \fBhttp://www.nominum.com\fR. |