~ubuntu-branches/ubuntu/oneiric/isc-dhcp/oneiric-security

« back to all changes in this revision

Viewing changes to server/dhcpd.8

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Pollock
  • Date: 2009-09-02 22:34:25 UTC
  • Revision ID: james.westby@ubuntu.com-20090902223425-nypo7bkftxffq41m
Tags: upstream-4.1.0
ImportĀ upstreamĀ versionĀ 4.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.\"     dhcpd.8
 
2
.\"
 
3
.\" Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC")
 
4
.\" Copyright (c) 1996-2003 by Internet Software Consortium
 
5
.\"
 
6
.\" Permission to use, copy, modify, and distribute this software for any
 
7
.\" purpose with or without fee is hereby granted, provided that the above
 
8
.\" copyright notice and this permission notice appear in all copies.
 
9
.\"
 
10
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
 
11
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 
12
.\" MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
 
13
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 
14
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 
15
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
 
16
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
17
.\"
 
18
.\"   Internet Systems Consortium, Inc.
 
19
.\"   950 Charter Street
 
20
.\"   Redwood City, CA 94063
 
21
.\"   <info@isc.org>
 
22
.\"   http://www.isc.org/
 
23
.\"
 
24
.\" This software has been written for Internet Systems Consortium
 
25
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
 
26
.\" To learn more about Internet Systems Consortium, see
 
27
.\" ``http://www.isc.org/''.  To learn more about Vixie Enterprises,
 
28
.\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
 
29
.\" ``http://www.nominum.com''.
 
30
.\"
 
31
.\" $Id: dhcpd.8,v 1.29 2008/07/17 06:17:57 each Exp $
 
32
.\"
 
33
.TH dhcpd 8
 
34
.SH NAME
 
35
dhcpd - Dynamic Host Configuration Protocol Server
 
36
.SH SYNOPSIS
 
37
.B dhcpd
 
38
[
 
39
.B -p
 
40
.I port
 
41
]
 
42
[
 
43
.B -f
 
44
]
 
45
[
 
46
.B -d
 
47
]
 
48
[
 
49
.B -q
 
50
]
 
51
[
 
52
.B -t
 
53
|
 
54
.B -T
 
55
]
 
56
[
 
57
.B -4
 
58
 
59
.B -6
 
60
]
 
61
[
 
62
.B -s
 
63
.I server
 
64
]
 
65
[
 
66
.B -cf
 
67
.I config-file
 
68
]
 
69
[
 
70
.B -lf
 
71
.I lease-file
 
72
]
 
73
[
 
74
.B -pf
 
75
.I pid-file
 
76
]
 
77
[
 
78
.B -tf
 
79
.I trace-output-file
 
80
]
 
81
[
 
82
.B -play
 
83
.I trace-playback-file
 
84
]
 
85
[
 
86
.I if0
 
87
[
 
88
.I ...ifN
 
89
]
 
90
]
 
91
 
 
92
.B dhcpd
 
93
--version
 
94
.SH DESCRIPTION
 
95
The Internet Systems Consortium DHCP Server, dhcpd, implements the
 
96
Dynamic Host Configuration Protocol (DHCP) and the Internet Bootstrap
 
97
Protocol (BOOTP).  DHCP allows hosts on a TCP/IP network to request
 
98
and be assigned IP addresses, and also to discover information about
 
99
the network to which they are attached.  BOOTP provides similar
 
100
functionality, with certain restrictions.
 
101
.SH CONTRIBUTIONS
 
102
.PP
 
103
This software is free software.  At various times its development has
 
104
been underwritten by various organizations, including the ISC and
 
105
Vixie Enterprises.  The development of 3.0 has been funded almost
 
106
entirely by Nominum, Inc.
 
107
.PP
 
108
At this point development is being shepherded by Ted Lemon, and hosted
 
109
by the ISC, but the future of this project depends on you.  If you
 
110
have features you want, please consider implementing them.
 
111
.SH OPERATION
 
112
.PP
 
113
The DHCP protocol allows a host which is unknown to the network
 
114
administrator to be automatically assigned a new IP address out of a
 
115
pool of IP addresses for its network.   In order for this to work, the
 
116
network administrator allocates address pools in each subnet and
 
117
enters them into the dhcpd.conf(5) file.
 
118
.PP
 
119
On startup, dhcpd reads the
 
120
.IR dhcpd.conf
 
121
file and stores a list of available addresses on each subnet in
 
122
memory.  When a client requests an address using the DHCP protocol,
 
123
dhcpd allocates an address for it.  Each client is assigned a lease,
 
124
which expires after an amount of time chosen by the administrator (by
 
125
default, one day).  Before leases expire, the clients to which leases
 
126
are assigned are expected to renew them in order to continue to use
 
127
the addresses.  Once a lease has expired, the client to which that
 
128
lease was assigned is no longer permitted to use the leased IP
 
129
address.
 
130
.PP
 
131
In order to keep track of leases across system reboots and server
 
132
restarts, dhcpd keeps a list of leases it has assigned in the
 
133
dhcpd.leases(5) file.   Before dhcpd grants a lease to a host, it
 
134
records the lease in this file and makes sure that the contents of the
 
135
file are flushed to disk.   This ensures that even in the event of a
 
136
system crash, dhcpd will not forget about a lease that it has
 
137
assigned.   On startup, after reading the dhcpd.conf file, dhcpd
 
138
reads the dhcpd.leases file to refresh its memory about what leases
 
139
have been assigned.
 
140
.PP
 
141
New leases are appended to the end of the dhcpd.leases
 
142
file.   In order to prevent the file from becoming arbitrarily large,
 
143
from time to time dhcpd creates a new dhcpd.leases file from its
 
144
in-core lease database.  Once this file has been written to disk, the
 
145
old file is renamed
 
146
.IR dhcpd.leases~ ,
 
147
and the new file is renamed dhcpd.leases.   If the system crashes in
 
148
the middle of this process, whichever dhcpd.leases file remains will
 
149
contain all the lease information, so there is no need for a special
 
150
crash recovery process.
 
151
.PP
 
152
BOOTP support is also provided by this server.  Unlike DHCP, the BOOTP
 
153
protocol does not provide a protocol for recovering
 
154
dynamically-assigned addresses once they are no longer needed.   It is
 
155
still possible to dynamically assign addresses to BOOTP clients, but
 
156
some administrative process for reclaiming addresses is required.   By
 
157
default, leases are granted to BOOTP clients in perpetuity, although
 
158
the network administrator may set an earlier cutoff date or a shorter
 
159
lease length for BOOTP leases if that makes sense.
 
160
.PP
 
161
BOOTP clients may also be served in the old standard way, which is to
 
162
simply provide a declaration in the dhcpd.conf file for each
 
163
BOOTP client, permanently assigning an address to each client.
 
164
.PP
 
165
Whenever changes are made to the dhcpd.conf file, dhcpd must be
 
166
restarted.   To restart dhcpd, send a SIGTERM (signal 15) to the
 
167
process ID contained in
 
168
.IR RUNDIR/dhcpd.pid ,
 
169
and then re-invoke dhcpd.  Because the DHCP server database is not as
 
170
lightweight as a BOOTP database, dhcpd does not automatically restart
 
171
itself when it sees a change to the dhcpd.conf file.
 
172
.PP
 
173
Note: We get a lot of complaints about this.   We realize that it would
 
174
be nice if one could send a SIGHUP to the server and have it reload
 
175
the database.   This is not technically impossible, but it would
 
176
require a great deal of work, our resources are extremely limited, and
 
177
they can be better spent elsewhere.   So please don't complain about
 
178
this on the mailing list unless you're prepared to fund a project to
 
179
implement this feature, or prepared to do it yourself.
 
180
.SH COMMAND LINE
 
181
.PP
 
182
The names of the network interfaces on which dhcpd should listen for
 
183
broadcasts may be specified on the command line.  This should be done
 
184
on systems where dhcpd is unable to identify non-broadcast interfaces,
 
185
but should not be required on other systems.  If no interface names
 
186
are specified on the command line dhcpd will identify all network
 
187
interfaces which are up, eliminating non-broadcast interfaces if
 
188
possible, and listen for DHCP broadcasts on each interface.
 
189
.PP
 
190
The server either operates as a DHCPv6 server or a DHCP server, but
 
191
not both at the same time. To run as a DHCPv6 server, use the
 
192
.B -6
 
193
flag. To run as a DHCP server, use the
 
194
.B -4
 
195
flag. If neither is used, the default is to run as a DHCPv6 server.
 
196
.PP
 
197
If dhcpd should listen on a port other than the standard (port 67),
 
198
the
 
199
.B -p
 
200
flag may used.  It should be followed by the udp port number on which
 
201
dhcpd should listen.  This is mostly useful for debugging purposes.
 
202
.PP
 
203
If dhcpd should send replies to an address other than the broadcast
 
204
address (255.255.255.255), the 
 
205
.B -s
 
206
flag may be used. It is followed by either the IP address or the host 
 
207
name to send replies to. This option is only supported in IPv4.
 
208
.PP
 
209
To run dhcpd as a foreground process, rather than allowing it to run
 
210
as a daemon in the background, the
 
211
.B -f
 
212
flag should be specified.  This is useful when running dhcpd under a
 
213
debugger, or when running it out of inittab on System V systems.
 
214
.PP
 
215
To have dhcpd log to the standard error descriptor, specify the
 
216
.B -d
 
217
flag.  This can be useful for debugging, and also at sites where a
 
218
complete log of all dhcp activity must be kept but syslogd is not
 
219
reliable or otherwise cannot be used.   Normally, dhcpd will log all
 
220
output using the syslog(3) function with the log facility set to
 
221
LOG_DAEMON.  Note that -d implies -f (the daemon will not fork
 
222
itself into the background).
 
223
.PP
 
224
Dhcpd can be made to use an alternate configuration file with the
 
225
.B -cf
 
226
flag, an alternate lease file with the
 
227
.B -lf
 
228
flag, or an alternate pid file with the
 
229
.B -pf
 
230
flag.   Because of the importance of using the same lease database at
 
231
all times when running dhcpd in production, these options should be
 
232
used \fBonly\fR for testing lease files or database files in a
 
233
non-production environment.
 
234
.PP
 
235
When starting dhcpd up from a system startup script (e.g., /etc/rc),
 
236
it may not be desirable to print out the entire copyright message on
 
237
startup.   To avoid printing this message, the
 
238
.B -q
 
239
flag may be specified.
 
240
.PP
 
241
The DHCP server reads two files on startup: a configuration file, and
 
242
a lease database.   If the
 
243
.B -t
 
244
flag is specified, the server will simply test the configuration file
 
245
for correct syntax, but will not attempt to perform any network
 
246
operations.   This can be used to test the a new configuration file
 
247
automatically before installing it.
 
248
.PP
 
249
The
 
250
.B -T
 
251
flag can be used to test the lease database file in a similar way.
 
252
.PP
 
253
The \fB-tf\fR and \fB-play\fR options allow you to specify a file into
 
254
which the entire startup state of the server and all the transactions
 
255
it processes are either logged or played back from.  This can be
 
256
useful in submitting bug reports - if you are getting a core dump
 
257
every so often, you can start the server with the \fB-tf\fR option and
 
258
then, when the server dumps core, the trace file will contain all the
 
259
transactions that led up to it dumping core, so that the problem can
 
260
be easily debugged with \fB-play\fR.
 
261
.PP
 
262
The \fB-play\fR option must be specified with an alternate lease file,
 
263
using the \fB-lf\fR switch, so that the DHCP server doesn't wipe out
 
264
your existing lease file with its test data.  The DHCP server will
 
265
refuse to operate in playback mode unless you specify an alternate
 
266
lease file.
 
267
.PP
 
268
To find the version of dhcpd that will run, use the
 
269
.B --version
 
270
argument. Instead of running, the version will be printed.
 
271
.SH CONFIGURATION
 
272
The syntax of the dhcpd.conf(5) file is discussed separately.   This
 
273
section should be used as an overview of the configuration process,
 
274
and the dhcpd.conf(5) documentation should be consulted for detailed
 
275
reference information.
 
276
.PP
 
277
.SH Subnets
 
278
dhcpd needs to know the subnet numbers and netmasks of all subnets for
 
279
which it will be providing service.   In addition, in order to
 
280
dynamically allocate addresses, it must be assigned one or more ranges
 
281
of addresses on each subnet which it can in turn assign to client
 
282
hosts as they boot.   Thus, a very simple configuration providing DHCP
 
283
support might look like this:
 
284
.nf
 
285
.sp 1
 
286
        subnet 239.252.197.0 netmask 255.255.255.0 {
 
287
          range 239.252.197.10 239.252.197.250;
 
288
        }
 
289
.fi
 
290
.PP
 
291
Multiple address ranges may be specified like this:
 
292
.nf
 
293
.sp 1
 
294
        subnet 239.252.197.0 netmask 255.255.255.0 {
 
295
          range 239.252.197.10 239.252.197.107;
 
296
          range 239.252.197.113 239.252.197.250;
 
297
        }
 
298
.fi
 
299
.PP
 
300
If a subnet will only be provided with BOOTP service and no dynamic
 
301
address assignment, the range clause can be left out entirely, but the
 
302
subnet statement must appear.
 
303
.PP
 
304
.SH Lease Lengths
 
305
DHCP leases can be assigned almost any length from zero seconds to
 
306
infinity.   What lease length makes sense for any given subnet, or for
 
307
any given installation, will vary depending on the kinds of hosts
 
308
being served.
 
309
.PP
 
310
For example, in an office environment where systems are added from
 
311
time to time and removed from time to time, but move relatively
 
312
infrequently, it might make sense to allow lease times of a month of
 
313
more.   In a final test environment on a manufacturing floor, it may
 
314
make more sense to assign a maximum lease length of 30 minutes -
 
315
enough time to go through a simple test procedure on a network
 
316
appliance before packaging it up for delivery.
 
317
.PP
 
318
It is possible to specify two lease lengths: the default length that
 
319
will be assigned if a client doesn't ask for any particular lease
 
320
length, and a maximum lease length.   These are specified as clauses
 
321
to the subnet command:
 
322
.nf
 
323
.sp 1
 
324
        subnet 239.252.197.0 netmask 255.255.255.0 {
 
325
          range 239.252.197.10 239.252.197.107;
 
326
          default-lease-time 600;
 
327
          max-lease-time 7200;
 
328
        }
 
329
.fi
 
330
.PP
 
331
This particular subnet declaration specifies a default lease time of
 
332
600 seconds (ten minutes), and a maximum lease time of 7200 seconds
 
333
(two hours).   Other common values would be 86400 (one day), 604800
 
334
(one week) and 2592000 (30 days).
 
335
.PP
 
336
Each subnet need not have the same lease\(emin the case of an office
 
337
environment and a manufacturing environment served by the same DHCP
 
338
server, it might make sense to have widely disparate values for
 
339
default and maximum lease times on each subnet.
 
340
.SH BOOTP Support
 
341
Each BOOTP client must be explicitly declared in the dhcpd.conf
 
342
file.   A very basic client declaration will specify the client
 
343
network interface's hardware address and the IP address to assign to
 
344
that client.   If the client needs to be able to load a boot file from
 
345
the server, that file's name must be specified.   A simple bootp
 
346
client declaration might look like this:
 
347
.nf
 
348
.sp 1
 
349
        host haagen {
 
350
          hardware ethernet 08:00:2b:4c:59:23;
 
351
          fixed-address 239.252.197.9;
 
352
          filename "/tftpboot/haagen.boot";
 
353
        }
 
354
.fi
 
355
.SH Options
 
356
DHCP (and also BOOTP with Vendor Extensions) provide a mechanism
 
357
whereby the server can provide the client with information about how
 
358
to configure its network interface (e.g., subnet mask), and also how
 
359
the client can access various network services (e.g., DNS, IP routers,
 
360
and so on).
 
361
.PP
 
362
These options can be specified on a per-subnet basis, and, for BOOTP
 
363
clients, also on a per-client basis.   In the event that a BOOTP
 
364
client declaration specifies options that are also specified in its
 
365
subnet declaration, the options specified in the client declaration
 
366
take precedence.   A reasonably complete DHCP configuration might
 
367
look something like this:
 
368
.nf
 
369
.sp 1
 
370
        subnet 239.252.197.0 netmask 255.255.255.0 {
 
371
          range 239.252.197.10 239.252.197.250;
 
372
          default-lease-time 600 max-lease-time 7200;
 
373
          option subnet-mask 255.255.255.0;
 
374
          option broadcast-address 239.252.197.255;
 
375
          option routers 239.252.197.1;
 
376
          option domain-name-servers 239.252.197.2, 239.252.197.3;
 
377
          option domain-name "isc.org";
 
378
        }
 
379
.fi
 
380
.PP
 
381
A bootp host on that subnet that needs to be in a different domain and
 
382
use a different name server might be declared as follows:
 
383
.nf
 
384
.sp 1
 
385
        host haagen {
 
386
          hardware ethernet 08:00:2b:4c:59:23;
 
387
          fixed-address 239.252.197.9;
 
388
          filename "/tftpboot/haagen.boot";
 
389
          option domain-name-servers 192.5.5.1;
 
390
          option domain-name "vix.com";
 
391
        }
 
392
.fi
 
393
.PP
 
394
A more complete description of the dhcpd.conf file syntax is provided
 
395
in dhcpd.conf(5).
 
396
.SH OMAPI
 
397
The DHCP server provides the capability to modify some of its
 
398
configuration while it is running, without stopping it, modifying its
 
399
database files, and restarting it.  This capability is currently
 
400
provided using OMAPI - an API for manipulating remote objects.  OMAPI
 
401
clients connect to the server using TCP/IP, authenticate, and can then
 
402
examine the server's current status and make changes to it.
 
403
.PP
 
404
Rather than implementing the underlying OMAPI protocol directly, user
 
405
programs should use the dhcpctl API or OMAPI itself.   Dhcpctl is a
 
406
wrapper that handles some of the housekeeping chores that OMAPI does
 
407
not do automatically.   Dhcpctl and OMAPI are documented in \fBdhcpctl(3)\fR
 
408
and \fBomapi(3)\fR.
 
409
.PP
 
410
OMAPI exports objects, which can then be examined and modified.   The
 
411
DHCP server exports the following objects: lease, host,
 
412
failover-state and group.   Each object has a number of methods that
 
413
are provided: lookup, create, and destroy.   In addition, it is
 
414
possible to look at attributes that are stored on objects, and in some
 
415
cases to modify those attributes.
 
416
.SH THE LEASE OBJECT
 
417
Leases can't currently be created or destroyed, but they can be looked
 
418
up to examine and modify their state.
 
419
.PP
 
420
Leases have the following attributes:
 
421
.PP
 
422
.B state \fIinteger\fR lookup, examine
 
423
.RS 0.5i
 
424
.nf
 
425
1 = free
 
426
2 = active
 
427
3 = expired
 
428
4 = released
 
429
5 = abandoned
 
430
6 = reset
 
431
7 = backup
 
432
8 = reserved
 
433
9 = bootp
 
434
.fi
 
435
.RE
 
436
.PP
 
437
.B ip-address \fIdata\fR lookup, examine
 
438
.RS 0.5i
 
439
The IP address of the lease.
 
440
.RE
 
441
.PP
 
442
.B dhcp-client-identifier \fIdata\fR lookup, examine, update
 
443
.RS 0.5i
 
444
The
 
445
client identifier that the client used when it acquired the lease.
 
446
Not all clients send client identifiers, so this may be empty.
 
447
.RE
 
448
.PP
 
449
.B client-hostname \fIdata\fR examine, update
 
450
.RS 0.5i
 
451
The value the client sent in the host-name option.
 
452
.RE
 
453
.PP
 
454
.B host \fIhandle\fR examine
 
455
.RS 0.5i
 
456
the host declaration associated with this lease, if any.
 
457
.RE
 
458
.PP
 
459
.B subnet \fIhandle\fR examine
 
460
.RS 0.5i
 
461
the subnet object associated with this lease (the subnet object is not
 
462
currently supported).
 
463
.RE
 
464
.PP
 
465
.B pool \fIhandle\fR examine
 
466
.RS 0.5i
 
467
the pool object associated with this lease (the pool object is not
 
468
currently supported).
 
469
.RE
 
470
.PP
 
471
.B billing-class \fIhandle\fR examine
 
472
.RS 0.5i
 
473
the handle to the class to which this lease is currently billed, if
 
474
any (the class object is not currently supported).
 
475
.RE
 
476
.PP
 
477
.B hardware-address \fIdata\fR examine, update
 
478
.RS 0.5i
 
479
the hardware address (chaddr) field sent by the client when it
 
480
acquired its lease.
 
481
.RE
 
482
.PP
 
483
.B hardware-type \fIinteger\fR examine, update
 
484
.RS 0.5i
 
485
the type of the network interface that the client reported when it
 
486
acquired its lease.
 
487
.RE
 
488
.PP
 
489
.B ends \fItime\fR examine
 
490
.RS 0.5i
 
491
the time when the lease's current state ends, as understood by the
 
492
client.
 
493
.RE
 
494
.PP
 
495
.B tstp \fItime\fR examine
 
496
.RS 0.5i
 
497
the time when the lease's current state ends, as understood by the
 
498
server.
 
499
.RE
 
500
.B tsfp \fItime\fR examine
 
501
.RS 0.5i
 
502
the adjusted time when the lease's current state ends, as understood by
 
503
the failover peer (if there is no failover peer, this value is
 
504
undefined).  Generally this value is only adjusted for expired, released,
 
505
or reset leases while the server is operating in partner-down state, and
 
506
otherwise is simply the value supplied by the peer.
 
507
.RE
 
508
.B atsfp \fItime\fR examine
 
509
.RS 0.5i
 
510
the actual tsfp value sent from the peer.  This value is forgotten when a
 
511
lease binding state change is made, to facilitate retransmission logic.
 
512
.RE
 
513
.PP
 
514
.B cltt \fItime\fR examine
 
515
.RS 0.5i
 
516
The time of the last transaction with the client on this lease.
 
517
.RE
 
518
.SH THE HOST OBJECT
 
519
Hosts can be created, destroyed, looked up, examined and modified.
 
520
If a host declaration is created or deleted using OMAPI, that
 
521
information will be recorded in the dhcpd.leases file.   It is
 
522
permissible to delete host declarations that are declared in the
 
523
dhcpd.conf file.
 
524
.PP
 
525
Hosts have the following attributes:
 
526
.PP
 
527
.B name \fIdata\fR lookup, examine, modify
 
528
.RS 0.5i
 
529
the name of the host declaration.   This name must be unique among all
 
530
host declarations.
 
531
.RE
 
532
.PP
 
533
.B group \fIhandle\fR examine, modify
 
534
.RS 0.5i
 
535
the named group associated with the host declaration, if there is one.
 
536
.RE
 
537
.PP
 
538
.B hardware-address \fIdata\fR lookup, examine, modify
 
539
.RS 0.5i
 
540
the link-layer address that will be used to match the client, if any.
 
541
Only valid if hardware-type is also present.
 
542
.RE
 
543
.PP
 
544
.B hardware-type \fIinteger\fR lookup, examine, modify
 
545
.RS 0.5i
 
546
the type of the network interface that will be used to match the
 
547
client, if any.   Only valid if hardware-address is also present.
 
548
.RE
 
549
.PP
 
550
.B dhcp-client-identifier \fIdata\fR lookup, examine, modify
 
551
.RS 0.5i
 
552
the dhcp-client-identifier option that will be used to match the
 
553
client, if any.
 
554
.RE
 
555
.PP
 
556
.B ip-address \fIdata\fR examine, modify
 
557
.RS 0.5i
 
558
a fixed IP address which is reserved for a DHCP client that matches
 
559
this host declaration.   The IP address will only be assigned to the
 
560
client if it is valid for the network segment to which the client is
 
561
connected.
 
562
.RE
 
563
.PP
 
564
.B statements \fIdata\fR modify
 
565
.RS 0.5i
 
566
a list of statements in the format of the dhcpd.conf file that will be
 
567
executed whenever a message from the client is being processed.
 
568
.RE
 
569
.PP
 
570
.B known \fIinteger\fR examine, modify
 
571
.RS 0.5i
 
572
if nonzero, indicates that a client matching this host declaration
 
573
will be treated as \fIknown\fR in pool permit lists.   If zero, the
 
574
client will not be treated as known.
 
575
.RE
 
576
.SH THE GROUP OBJECT
 
577
Named groups can be created, destroyed, looked up, examined and
 
578
modified.  If a group declaration is created or deleted using OMAPI,
 
579
that information will be recorded in the dhcpd.leases file.  It is
 
580
permissible to delete group declarations that are declared in the
 
581
dhcpd.conf file.
 
582
.PP
 
583
Named groups currently can only be associated with
 
584
hosts - this allows one set of statements to be efficiently attached
 
585
to more than one host declaration.   
 
586
.PP
 
587
Groups have the following attributes:
 
588
.PP
 
589
.B name \fIdata\fR
 
590
.RS 0.5i
 
591
the name of the group.  All groups that are created using OMAPI must
 
592
have names, and the names must be unique among all groups.
 
593
.RE
 
594
.PP
 
595
.B statements \fIdata\fR
 
596
.RS 0.5i
 
597
a list of statements in the format of the dhcpd.conf file that will be
 
598
executed whenever a message from a client whose host declaration
 
599
references this group is processed.
 
600
.RE
 
601
.SH THE CONTROL OBJECT
 
602
The control object allows you to shut the server down.   If the server
 
603
is doing failover with another peer, it will make a clean transition
 
604
into the shutdown state and notify its peer, so that the peer can go
 
605
into partner down, and then record the "recover" state in the lease
 
606
file so that when the server is restarted, it will automatically
 
607
resynchronize with its peer.
 
608
.PP
 
609
On shutdown the server will also attempt to cleanly shut down all
 
610
OMAPI connections.  If these connections do not go down cleanly after
 
611
five seconds, they are shut down preemptively.  It can take as much
 
612
as 25 seconds from the beginning of the shutdown process to the time
 
613
that the server actually exits.
 
614
.PP
 
615
To shut the server down, open its control object and set the state
 
616
attribute to 2.
 
617
.SH THE FAILOVER-STATE OBJECT
 
618
The failover-state object is the object that tracks the state of the
 
619
failover protocol as it is being managed for a given failover peer.
 
620
The failover object has the following attributes (please see
 
621
.B dhcpd.conf (5)
 
622
for explanations about what these attributes mean):
 
623
.PP
 
624
.B name \fIdata\fR examine
 
625
.RS 0.5i
 
626
Indicates the name of the failover peer relationship, as described in
 
627
the server's \fBdhcpd.conf\fR file.
 
628
.RE
 
629
.PP
 
630
.B partner-address \fIdata\fR examine
 
631
.RS 0.5i
 
632
Indicates the failover partner's IP address.
 
633
.RE
 
634
.PP
 
635
.B local-address \fIdata\fR examine
 
636
.RS 0.5i
 
637
Indicates the IP address that is being used by the DHCP server for
 
638
this failover pair.
 
639
.RE
 
640
.PP
 
641
.B partner-port \fIdata\fR examine
 
642
.RS 0.5i
 
643
Indicates the TCP port on which the failover partner is listening for
 
644
failover protocol connections.
 
645
.RE
 
646
.PP
 
647
.B local-port \fIdata\fR examine
 
648
.RS 0.5i
 
649
Indicates the TCP port on which the DHCP server is listening for
 
650
failover protocol connections for this failover pair.
 
651
.RE
 
652
.PP
 
653
.B max-outstanding-updates \fIinteger\fR examine
 
654
.RS 0.5i
 
655
Indicates the number of updates that can be outstanding and
 
656
unacknowledged at any given time, in this failover relationship.
 
657
.RE
 
658
.PP
 
659
.B mclt \fIinteger\fR examine
 
660
.RS 0.5i
 
661
Indicates the maximum client lead time in this failover relationship.
 
662
.RE
 
663
.PP
 
664
.B load-balance-max-secs \fIinteger\fR examine
 
665
.RS 0.5i
 
666
Indicates the maximum value for the secs field in a client request
 
667
before load balancing is bypassed.
 
668
.RE
 
669
.PP
 
670
.B load-balance-hba \fIdata\fR examine
 
671
.RS 0.5i
 
672
Indicates the load balancing hash bucket array for this failover
 
673
relationship.
 
674
.RE
 
675
.PP
 
676
.B local-state \fIinteger\fR examine, modify
 
677
.RS 0.5i
 
678
Indicates the present state of the DHCP server in this failover
 
679
relationship.   Possible values for state are:
 
680
.RE
 
681
.RS 1i
 
682
.PP
 
683
.nf
 
684
1   - startup
 
685
2   - normal
 
686
3   - communications interrupted
 
687
4   - partner down
 
688
5   - potential conflict
 
689
6   - recover
 
690
7   - paused
 
691
8   - shutdown
 
692
9   - recover done
 
693
10  - resolution interrupted
 
694
11  - conflict done
 
695
254 - recover wait
 
696
.fi
 
697
.RE
 
698
.PP
 
699
.RS 0.5i
 
700
(Note that some of the above values have changed since DHCP 3.0.x.)
 
701
.RE
 
702
.PP
 
703
.RS 0.5i
 
704
In general it is not a good idea to make changes to this state.
 
705
However, in the case that the failover partner is known to be down, it
 
706
can be useful to set the DHCP server's failover state to partner
 
707
down.   At this point the DHCP server will take over service of the
 
708
failover partner's leases as soon as possible, and will give out
 
709
normal leases, not leases that are restricted by MCLT.   If you do put
 
710
the DHCP server into the partner-down when the other DHCP server is
 
711
not in the partner-down state, but is not reachable, IP address
 
712
assignment conflicts are possible, even likely.   Once a server has
 
713
been put into partner-down mode, its failover partner must not be
 
714
brought back online until communication is possible between the two
 
715
servers.
 
716
.RE
 
717
.PP
 
718
.B partner-state \fIinteger\fR examine
 
719
.RS 0.5i
 
720
Indicates the present state of the failover partner.
 
721
.RE
 
722
.PP
 
723
.B local-stos \fIinteger\fR examine
 
724
.RS 0.5i
 
725
Indicates the time at which the DHCP server entered its present state
 
726
in this failover relationship.
 
727
.RE
 
728
.PP
 
729
.B partner-stos \fIinteger\fR examine
 
730
.RS 0.5i
 
731
Indicates the time at which the failover partner entered its present state.
 
732
.RE
 
733
.PP
 
734
.B hierarchy \fIinteger\fR examine
 
735
.RS 0.5i
 
736
Indicates whether the DHCP server is primary (0) or secondary (1) in
 
737
this failover relationship.
 
738
.RE
 
739
.PP
 
740
.B last-packet-sent \fIinteger\fR examine
 
741
.RS 0.5i
 
742
Indicates the time at which the most recent failover packet was sent
 
743
by this DHCP server to its failover partner.
 
744
.RE
 
745
.PP
 
746
.B last-timestamp-received \fIinteger\fR examine
 
747
.RS 0.5i
 
748
Indicates the timestamp that was on the failover message most recently
 
749
received from the failover partner.
 
750
.RE
 
751
.PP
 
752
.B skew \fIinteger\fR examine
 
753
.RS 0.5i
 
754
Indicates the skew between the failover partner's clock and this DHCP
 
755
server's clock
 
756
.RE
 
757
.PP
 
758
.B max-response-delay \fIinteger\fR examine
 
759
.RS 0.5i
 
760
Indicates the time in seconds after which, if no message is received
 
761
from the failover partner, the partner is assumed to be out of
 
762
communication.
 
763
.RE
 
764
.PP
 
765
.B cur-unacked-updates \fIinteger\fR examine
 
766
.RS 0.5i
 
767
Indicates the number of update messages that have been received from
 
768
the failover partner but not yet processed.
 
769
.RE
 
770
.SH FILES
 
771
.B ETCDIR/dhcpd.conf, DBDIR/dhcpd.leases, RUNDIR/dhcpd.pid,
 
772
.B DBDIR/dhcpd.leases~.
 
773
.SH SEE ALSO
 
774
dhclient(8), dhcrelay(8), dhcpd.conf(5), dhcpd.leases(5)
 
775
.SH AUTHOR
 
776
.B dhcpd(8)
 
777
was originally written by Ted Lemon under a contract with Vixie Labs.
 
778
Funding for this project was provided by Internet Systems
 
779
Consortium.   Version 3 of the DHCP server was funded by Nominum, Inc.
 
780
Information about Internet Systems Consortium is available at
 
781
.B http://www.isc.org/\fR.
 
782
Information about Nominum can be found at \fBhttp://www.nominum.com/\fR.