3 .\" Copyright (c) 2004-2005 by Internet Systems Consortium, Inc. ("ISC")
4 .\" Copyright (c) 1996-2003 by Internet Software Consortium
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.
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.
18 .\" Internet Systems Consortium, Inc.
19 .\" 950 Charter Street
20 .\" Redwood City, CA 94063
22 .\" http://www.isc.org/
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''.
31 .\" $Id: dhcpd.conf.5,v 1.12 2006/08/28 21:21:52 seb Exp $
35 dhcpd.conf - dhcpd configuration file
37 The dhcpd.conf file contains configuration information for
39 the Internet Systems Consortium DHCP Server.
41 The dhcpd.conf file is a free-form ASCII text file. It is parsed by
42 the recursive-descent parser built into dhcpd. The file may contain
43 extra tabs and newlines for formatting purposes. Keywords in the file
44 are case-insensitive. Comments may be placed anywhere within the
45 file (except within quotes). Comments begin with the # character and
46 end at the end of the line.
48 The file essentially consists of a list of statements. Statements
49 fall into two broad categories - parameters and declarations.
51 Parameter statements either say how to do something (e.g., how long a
52 lease to offer), whether to do something (e.g., should dhcpd provide
53 addresses to unknown clients), or what parameters to provide to the
54 client (e.g., use gateway 220.177.244.7).
56 Declarations are used to describe the topology of the
57 network, to describe clients on the network, to provide addresses that
58 can be assigned to clients, or to apply a group of parameters to a
59 group of declarations. In any group of parameters and declarations,
60 all parameters must be specified before any declarations which depend
61 on those parameters may be specified.
63 Declarations about network topology include the \fIshared-network\fR
64 and the \fIsubnet\fR declarations. If clients on a subnet are to be
66 dynamically, a \fIrange\fR declaration must appear within the
67 \fIsubnet\fR declaration. For clients with statically assigned
68 addresses, or for installations where only known clients will be
69 served, each such client must have a \fIhost\fR declaration. If
70 parameters are to be applied to a group of declarations which are not
71 related strictly on a per-subnet basis, the \fIgroup\fR declaration
74 For every subnet which will be served, and for every subnet
75 to which the dhcp server is connected, there must be one \fIsubnet\fR
76 declaration, which tells dhcpd how to recognize that an address is on
77 that subnet. A \fIsubnet\fR declaration is required for each subnet
78 even if no addresses will be dynamically allocated on that subnet.
80 Some installations have physical networks on which more than one IP
81 subnet operates. For example, if there is a site-wide requirement
82 that 8-bit subnet masks be used, but a department with a single
83 physical ethernet network expands to the point where it has more than
84 254 nodes, it may be necessary to run two 8-bit subnets on the same
85 ethernet until such time as a new physical network can be added. In
86 this case, the \fIsubnet\fR declarations for these two networks must be
87 enclosed in a \fIshared-network\fR declaration.
89 Some sites may have departments which have clients on more than one
90 subnet, but it may be desirable to offer those clients a uniform set
91 of parameters which are different than what would be offered to
92 clients from other departments on the same subnet. For clients which
93 will be declared explicitly with \fIhost\fR declarations, these
94 declarations can be enclosed in a \fIgroup\fR declaration along with
95 the parameters which are common to that department. For clients
96 whose addresses will be dynamically assigned, class declarations and
97 conditional declarations may be used to group parameter assignments
98 based on information the client sends.
100 When a client is to be booted, its boot parameters are determined by
101 consulting that client's \fIhost\fR declaration (if any), and then
102 consulting any \fIclass\fR declarations matching the client,
103 followed by the \fIpool\fR, \fIsubnet\fR and \fIshared-network\fR
104 declarations for the IP address assigned to the client. Each of
105 these declarations itself appears within a lexical scope, and all
106 declarations at less specific lexical scopes are also consulted for
107 client option declarations. Scopes are never considered
108 twice, and if parameters are declared in more than one scope, the
109 parameter declared in the most specific scope is the one that is
112 When dhcpd tries to find a \fIhost\fR declaration for a client, it
113 first looks for a \fIhost\fR declaration which has a
114 \fIfixed-address\fR declaration that lists an IP address that is valid
115 for the subnet or shared network on which the client is booting. If
116 it doesn't find any such entry, it tries to find an entry which has
117 no \fIfixed-address\fR declaration.
120 A typical dhcpd.conf file will look something like this:
123 .I global parameters...
125 subnet 204.254.239.0 netmask 255.255.255.224 {
126 \fIsubnet-specific parameters...\fR
127 range 204.254.239.10 204.254.239.30;
130 subnet 204.254.239.32 netmask 255.255.255.224 {
131 \fIsubnet-specific parameters...\fR
132 range 204.254.239.42 204.254.239.62;
135 subnet 204.254.239.64 netmask 255.255.255.224 {
136 \fIsubnet-specific parameters...\fR
137 range 204.254.239.74 204.254.239.94;
141 \fIgroup-specific parameters...\fR
142 host zappo.test.isc.org {
143 \fIhost-specific parameters...\fR
145 host beppo.test.isc.org {
146 \fIhost-specific parameters...\fR
148 host harpo.test.isc.org {
149 \fIhost-specific parameters...\fR
158 Notice that at the beginning of the file, there's a place
159 for global parameters. These might be things like the organization's
160 domain name, the addresses of the name servers (if they are common to
161 the entire organization), and so on. So, for example:
164 option domain-name "isc.org";
165 option domain-name-servers ns1.isc.org, ns2.isc.org;
171 As you can see in Figure 2, you can specify host addresses in
172 parameters using their domain names rather than their numeric IP
173 addresses. If a given hostname resolves to more than one IP address
174 (for example, if that host has two ethernet interfaces), then where
175 possible, both addresses are supplied to the client.
177 The most obvious reason for having subnet-specific parameters as
178 shown in Figure 1 is that each subnet, of necessity, has its own
179 router. So for the first subnet, for example, there should be
183 option routers 204.254.239.1;
186 Note that the address here is specified numerically. This is not
187 required - if you have a different domain name for each interface on
188 your router, it's perfectly legitimate to use the domain name for that
189 interface instead of the numeric address. However, in many cases
190 there may be only one domain name for all of a router's IP addresses, and
191 it would not be appropriate to use that name here.
193 In Figure 1 there is also a \fIgroup\fR statement, which provides
194 common parameters for a set of three hosts - zappo, beppo and harpo.
195 As you can see, these hosts are all in the test.isc.org domain, so it
196 might make sense for a group-specific parameter to override the domain
197 name supplied to these hosts:
200 option domain-name "test.isc.org";
203 Also, given the domain they're in, these are probably test machines.
204 If we wanted to test the DHCP leasing mechanism, we might set the
205 lease timeout somewhat shorter than the default:
209 default-lease-time 120;
212 You may have noticed that while some parameters start with the
213 \fIoption\fR keyword, some do not. Parameters starting with the
214 \fIoption\fR keyword correspond to actual DHCP options, while
215 parameters that do not start with the option keyword either control
216 the behavior of the DHCP server (e.g., how long a lease dhcpd will
217 give out), or specify client parameters that are not optional in the
218 DHCP protocol (for example, server-name and filename).
220 In Figure 1, each host had \fIhost-specific parameters\fR. These
221 could include such things as the \fIhostname\fR option, the name of a
222 file to upload (the \fIfilename\fR parameter) and the address of the
223 server from which to upload the file (the \fInext-server\fR
224 parameter). In general, any parameter can appear anywhere that
225 parameters are allowed, and will be applied according to the scope in
226 which the parameter appears.
228 Imagine that you have a site with a lot of NCD X-Terminals. These
229 terminals come in a variety of models, and you want to specify the
230 boot files for each model. One way to do this would be to have host
231 declarations for each server and group them by model:
236 next-server ncd-booter;
238 host ncd1 { hardware ethernet 0:c0:c3:49:2b:57; }
239 host ncd4 { hardware ethernet 0:c0:c3:80:fc:32; }
240 host ncd8 { hardware ethernet 0:c0:c3:22:46:81; }
245 next-server ncd-booter;
247 host ncd2 { hardware ethernet 0:c0:c3:88:2d:81; }
248 host ncd3 { hardware ethernet 0:c0:c3:00:14:11; }
253 next-server ncd-booter;
255 host ncd1 { hardware ethernet 0:c0:c3:11:90:23; }
256 host ncd4 { hardware ethernet 0:c0:c3:91:a7:8; }
257 host ncd8 { hardware ethernet 0:c0:c3:cc:a:8f; }
264 declaration can be used to specify a pool of addresses that will be
265 treated differently than another pool of addresses, even on the same
266 network segment or subnet. For example, you may want to provide a
267 large set of addresses that can be assigned to DHCP clients that are
268 registered to your DHCP server, while providing a smaller set of
269 addresses, possibly with short lease times, that are available for
270 unknown clients. If you have a firewall, you may be able to arrange
271 for addresses from one pool to be allowed access to the Internet,
272 while addresses in another pool are not, thus encouraging users to
273 register their DHCP clients. To do this, you would set up a pair of
277 subnet 10.0.0.0 netmask 255.255.255.0 {
278 option routers 10.0.0.254;
280 # Unknown clients get this pool.
282 option domain-name-servers bogus.example.com;
284 range 10.0.0.200 10.0.0.253;
285 allow unknown-clients;
288 # Known clients get this pool.
290 option domain-name-servers ns1.example.com, ns2.example.com;
291 max-lease-time 28800;
292 range 10.0.0.5 10.0.0.199;
293 deny unknown-clients;
298 It is also possible to set up entirely different subnets for known and
299 unknown clients - address pools exist at the level of shared networks,
300 so address ranges within pool declarations can be on different
303 As you can see in the preceding example, pools can have permit lists
304 that control which clients are allowed access to the pool and which
305 aren't. Each entry in a pool's permit list is introduced with the
307 or \fIdeny\fR keyword. If a pool has a permit list, then only those
308 clients that match specific entries on the permit list will be
309 eligible to be assigned addresses from the pool. If a pool has a
310 deny list, then only those clients that do not match any entries on
311 the deny list will be eligible. If both permit and deny lists exist
312 for a pool, then only clients that match the permit list and do not
313 match the deny list will be allowed access.
314 .SH DYNAMIC ADDRESS ALLOCATION
315 Address allocation is actually only done when a client is in the INIT
316 state and has sent a DHCPDISCOVER message. If the client thinks it
317 has a valid lease and sends a DHCPREQUEST to initiate or renew that
318 lease, the server has only three choices - it can ignore the
319 DHCPREQUEST, send a DHCPNAK to tell the client it should stop using
320 the address, or send a DHCPACK, telling the client to go ahead and use
321 the address for a while.
323 If the server finds the address the client is requesting, and that
324 address is available to the client, the server will send a DHCPACK.
325 If the address is no longer available, or the client isn't permitted
326 to have it, the server will send a DHCPNAK. If the server knows
327 nothing about the address, it will remain silent, unless the address
328 is incorrect for the network segment to which the client has been
329 attached and the server is authoritative for that network segment, in
330 which case the server will send a DHCPNAK even though it doesn't know
333 There may be a host declaration matching the client's identification.
334 If that host declaration contains a fixed-address declaration that
335 lists an IP address that is valid for the network segment to which the
336 client is connected. In this case, the DHCP server will never do
337 dynamic address allocation. In this case, the client is \fIrequired\fR
338 to take the address specified in the host declaration. If the
339 client sends a DHCPREQUEST for some other address, the server will respond
342 When the DHCP server allocates a new address for a client (remember,
343 this only happens if the client has sent a DHCPDISCOVER), it first
344 looks to see if the client already has a valid lease on an IP address,
345 or if there is an old IP address the client had before that hasn't yet
346 been reassigned. In that case, the server will take that address and
347 check it to see if the client is still permitted to use it. If the
348 client is no longer permitted to use it, the lease is freed if the
349 server thought it was still in use - the fact that the client has sent
350 a DHCPDISCOVER proves to the server that the client is no longer using
353 If no existing lease is found, or if the client is forbidden to
354 receive the existing lease, then the server will look in the list of
355 address pools for the network segment to which the client is attached
356 for a lease that is not in use and that the client is permitted to
357 have. It looks through each pool declaration in sequence (all
359 declarations that appear outside of pool declarations are grouped into
360 a single pool with no permit list). If the permit list for the pool
361 allows the client to be allocated an address from that pool, the pool
362 is examined to see if there is an address available. If so, then the
363 client is tentatively assigned that address. Otherwise, the next
364 pool is tested. If no addresses are found that can be assigned to
365 the client, no response is sent to the client.
367 If an address is found that the client is permitted to have, and that
368 has never been assigned to any client before, the address is
369 immediately allocated to the client. If the address is available for
370 allocation but has been previously assigned to a different client, the
371 server will keep looking in hopes of finding an address that has never
372 before been assigned to a client.
374 The DHCP server generates the list of available IP addresses from a
375 hash table. This means that the addresses are not sorted in any
376 particular order, and so it is not possible to predict the order in
377 which the DHCP server will allocate IP addresses. Users of previous
378 versions of the ISC DHCP server may have become accustomed to the DHCP
379 server allocating IP addresses in ascending order, but this is no
380 longer possible, and there is no way to configure this behavior with
381 version 3 of the ISC DHCP server.
382 .SH IP ADDRESS CONFLICT PREVENTION
383 The DHCP server checks IP addresses to see if they are in use before
384 allocating them to clients. It does this by sending an ICMP Echo
385 request message to the IP address being allocated. If no ICMP Echo
386 reply is received within a second, the address is assumed to be free.
387 This is only done for leases that have been specified in range
388 statements, and only when the lease is thought by the DHCP server to
389 be free - i.e., the DHCP server or its failover peer has not listed
392 If a response is received to an ICMP Echo request, the DHCP server
393 assumes that there is a configuration error - the IP address is in use
394 by some host on the network that is not a DHCP client. It marks the
395 address as abandoned, and will not assign it to clients.
397 If a DHCP client tries to get an IP address, but none are available,
398 but there are abandoned IP addresses, then the DHCP server will
399 attempt to reclaim an abandoned IP address. It marks one IP address
400 as free, and then does the same ICMP Echo request check described
401 previously. If there is no answer to the ICMP Echo request, the
402 address is assigned to the client.
404 The DHCP server does not cycle through abandoned IP addresses if the
405 first IP address it tries to reclaim is free. Rather, when the next
406 DHCPDISCOVER comes in from the client, it will attempt a new
407 allocation using the same method described here, and will typically
408 try a new IP address.
410 This version of the ISC DHCP server supports the DHCP failover
411 protocol as documented in draft-ietf-dhc-failover-07.txt. This is
412 not a final protocol document, and we have not done interoperability
413 testing with other vendors' implementations of this protocol, so you
414 must not assume that this implementation conforms to the standard.
415 If you wish to use the failover protocol, make sure that both failover
416 peers are running the same version of the ISC DHCP server.
418 The failover protocol allows two DHCP servers (and no more than two)
419 to share a common address pool. Each server will have about half of
420 the available IP addresses in the pool at any given time for
421 allocation. If one server fails, the other server will continue to
422 renew leases out of the pool, and will allocate new addresses out of
423 the roughly half of available addresses that it had when
424 communications with the other server were lost.
426 It is possible during a prolonged failure to tell the remaining server
427 that the other server is down, in which case the remaining server will
428 (over time) reclaim all the addresses the other server had available
429 for allocation, and begin to reuse them. This is called putting the
430 server into the PARTNER-DOWN state.
432 You can put the server into the PARTNER-DOWN state either by using the
434 command or by stopping the server, editing the last peer state
435 declaration in the lease file, and restarting the server. If you use
436 this last method, be sure to leave the date and time of the start of
440 .B failover peer "\fIname\fB" state {
441 .B my state partner-down;
442 .B peer state \fIstate\fB at \fIdate\fB;
446 When the other server comes back online, it should automatically
447 detect that it has been offline and request a complete update from the
448 server that was running in the PARTNER-DOWN state, and then both
449 servers will resume processing together.
451 It is possible to get into a dangerous situation: if you put one
452 server into the PARTNER-DOWN state, and then *that* server goes down,
453 and the other server comes back up, the other server will not know
454 that the first server was in the PARTNER-DOWN state, and may issue
455 addresses previously issued by the other server to different clients,
456 resulting in IP address conflicts. Before putting a server into
457 PARTNER-DOWN state, therefore, make
459 that the other server will not restart automatically.
461 The failover protocol defines a primary server role and a secondary
462 server role. There are some differences in how primaries and
463 secondaries act, but most of the differences simply have to do with
464 providing a way for each peer to behave in the opposite way from the
465 other. So one server must be configured as primary, and the other
466 must be configured as secondary, and it doesn't matter too much which
469 When a server starts that has not previously communicated with its
470 failover peer, it must establish communications with its failover peer
471 and synchronize with it before it can serve clients. This can happen
472 either because you have just configured your DHCP servers to perform
473 failover for the first time, or because one of your failover servers
474 has failed catastrophically and lost its database.
476 The initial recovery process is designed to ensure that when one
477 failover peer loses its database and then resynchronizes, any leases
478 that the failed server gave out before it failed will be honored.
479 When the failed server starts up, it notices that it has no saved
480 failover state, and attempts to contact its peer.
482 When it has established contact, it asks the peer for a complete copy
483 its peer's lease database. The peer then sends its complete database,
484 and sends a message indicating that it is done. The failed server
485 then waits until MCLT has passed, and once MCLT has passed both
486 servers make the transition back into normal operation. This waiting
487 period ensures that any leases the failed server may have given out
488 while out of contact with its partner will have expired.
490 While the failed server is recovering, its partner remains in the
491 partner-down state, which means that it is serving all clients. The
492 failed server provides no service at all to DHCP clients until it has
493 made the transition into normal operation.
495 In the case where both servers detect that they have never before
496 communicated with their partner, they both come up in this recovery
497 state and follow the procedure we have just described. In this case,
498 no service will be provided to DHCP clients until MCLT has expired.
499 .SH CONFIGURING FAILOVER
500 In order to configure failover, you need to write a peer declaration
501 that configures the failover protocol, and you need to write peer
502 references in each pool declaration for which you want to do
503 failover. You do not have to do failover for all pools on a given
504 network segment. You must not tell one server it's doing failover
505 on a particular address pool and tell the other it is not. You must
506 not have any common address pools on which you are not doing
507 failover. A pool declaration that uses failover would look like this:
512 deny dynamic bootp clients;
513 \fIpool specific parameters\fR
517 Dynamic BOOTP leases are not compatible with failover, and, as such,
518 you need to disallow BOOTP in pools that you are using failover for.
520 The server currently does very little sanity checking, so if you
521 configure it wrong, it will just fail in odd ways. I would recommend
522 therefore that you either do failover or don't do failover, but don't
523 do any mixed pools. Also, use the same master configuration file for
524 both servers, and have a separate file that contains the peer
525 declaration and includes the master file. This will help you to avoid
526 configuration mismatches. As our implementation evolves, this will
527 become less of a problem. A basic sample dhcpd.conf file for a
528 primary server might look like this:
531 failover peer "foo" {
533 address anthrax.rc.vix.com;
535 peer address trantor.rc.vix.com;
537 max-response-delay 60;
538 max-unacked-updates 10;
541 load balance max seconds 3;
544 include "/etc/dhcpd.master";
547 The statements in the peer declaration are as follows:
556 [ \fBprimary\fR | \fBsecondary\fR ]\fB;\fR
558 This determines whether the server is primary or secondary, as
559 described earlier under DHCP FAILOVER.
567 .B address \fIaddress\fR\fB;\fR
569 The \fBaddress\fR statement declares the IP address or DNS name on which the
570 server should listen for connections from its failover peer, and also the
571 value to use for the DHCP Failover Protocol server identifier. Because this
572 value is used as an identifier, it may not be omitted.
580 .B peer address \fIaddress\fR\fB;\fR
582 The \fBpeer address\fR statement declares the IP address or DNS name to
583 which the server should connect to reach its failover peer for failover
592 .B port \fIport-number\fR\fB;\fR
594 The \fBport\fR statement declares the TCP port on which the server
595 should listen for connections from its failover peer. This statement
596 may not currently be omitted, because the failover protocol does not
597 yet have a reserved TCP port number.
605 .B peer port \fIport-number\fR\fB;\fR
607 The \fBpeer port\fR statement declares the TCP port to which the
608 server should connect to reach its failover peer for failover
609 messages. This statement may not be omitted because the failover
610 protocol does not yet have a reserved TCP port number. The port
611 number declared in the \fBpeer port\fR statement may be the same as
612 the port number declared in the \fBport\fR statement.
616 .I max-response-delay
620 .B max-response-delay \fIseconds\fR\fB;\fR
622 The \fBmax-response-delay\fR statement tells the DHCP server how
623 many seconds may pass without receiving a message from its failover
624 peer before it assumes that connection has failed. This number
625 should be small enough that a transient network failure that breaks
626 the connection will not result in the servers being out of
627 communication for a long time, but large enough that the server isn't
628 constantly making and breaking connections. This parameter must be
633 .I max-unacked-updates
637 .B max-unacked-updates \fIcount\fR\fB;\fR
639 The \fBmax-unacked-updates\fR statement tells the DHCP server how
640 many BNDUPD messages it can send before it receives a BNDACK
641 from the failover peer. We don't have enough operational experience
642 to say what a good value for this is, but 10 seems to work. This
643 parameter must be specified.
651 .B mclt \fIseconds\fR\fB;\fR
653 The \fBmclt\fR statement defines the Maximum Client Lead Time. It
654 must be specified on the primary, and may not be specified on the
655 secondary. This is the length of time for which a lease may be
656 renewed by either failover peer without contacting the other. The
657 longer you set this, the longer it will take for the running server to
658 recover IP addresses after moving into PARTNER-DOWN state. The
659 shorter you set it, the more load your servers will experience when
660 they are not communicating. A value of something like 3600 is
661 probably reasonable, but again bear in mind that we have no real
662 operational experience with this.
670 .B split \fIindex\fR\fB;\fR
672 The split statement specifies the split between the primary and
673 secondary for the purposes of load balancing. Whenever a client
674 makes a DHCP request, the DHCP server runs a hash on the client
675 identification. If the hash comes out to less than the split value,
676 the primary answers. If it comes out to equal to or more than the
677 split, the secondary answers. The only meaningful value is 128, and can
678 only be configured on the primary.
686 .B hba \fIcolon-separated-hex-list\fB;\fR
688 The hba statement specifies the split between the primary and
689 secondary as a bitmap rather than a cutoff, which theoretically allows
690 for finer-grained control. In practice, there is probably no need
691 for such fine-grained control, however. An example hba statement:
694 hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
695 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00;
698 This is equivalent to a \fBsplit 128;\fR statement. You must only have
699 \fBsplit\fR or \fBhba\fR defined, never both. For most cases, the
700 fine-grained control that \fBhba\fR offers isn't necessary, and \fBsplit\fR
701 should be used. As such, the use of \fBhba\fR is deprecated.
705 .I load balance max seconds
709 .B load balance max seconds \fIseconds\fR\fB;\fR
711 This statement allows you to configure a cutoff after which load
712 balancing is disabled. The cutoff is based on the number of seconds
713 since the client sent its first DHCPDISCOVER or DHCPREQUEST message,
714 and only works with clients that correctly implement the \fIsecs\fR
715 field - fortunately most clients do. We recommend setting this to
716 something like 3 or 5. The effect of this is that if one of the
717 failover peers gets into a state where it is responding to failover
718 messages but not responding to some client requests, the other
719 failover peer will take over its client load automatically as the
723 Clients can be separated into classes, and treated differently
724 depending on what class they are in. This separation can be done
725 either with a conditional statement, or with a match statement within
726 the class declaration. It is possible to specify a limit on the
727 total number of clients within a particular class or subclass that may
728 hold leases at one time, and it is possible to specify automatic
729 subclassing based on the contents of the client packet.
731 To add clients to classes based on conditional evaluation, you can
732 specify a matching expression in the class statement:
735 class "ras-clients" {
736 match if substring (option dhcp-client-identifier, 1, 3) = "RAS";
740 Note that whether you use matching expressions or add statements (or
741 both) to classify clients, you must always write a class declaration
742 for any class that you use. If there will be no match statement and
743 no in-scope statements for a class, the declaration should look like
747 class "ras-clients" {
752 In addition to classes, it is possible to declare subclasses. A
753 subclass is a class with the same name as a regular class, but with a
754 specific submatch expression which is hashed for quick matching.
755 This is essentially a speed hack - the main difference between five
756 classes with match expressions and one class with five subclasses is
757 that it will be quicker to find the subclasses. Subclasses work as
761 class "allocation-class-1" {
762 match pick-first-value (option dhcp-client-identifier, hardware);
765 class "allocation-class-2" {
766 match pick-first-value (option dhcp-client-identifier, hardware);
769 subclass "allocation-class-1" 1:8:0:2b:4c:39:ad;
770 subclass "allocation-class-2" 1:8:0:2b:a9:cc:e3;
771 subclass "allocation-class-1" 1:0:0:c4:aa:29:44;
773 subnet 10.0.0.0 netmask 255.255.255.0 {
775 allow members of "allocation-class-1";
776 range 10.0.0.11 10.0.0.50;
779 allow members of "allocation-class-2";
780 range 10.0.0.51 10.0.0.100;
785 The data following the class name in the subclass declaration is a
786 constant value to use in matching the match expression for the class.
787 When class matching is done, the server will evaluate the match
788 expression and then look the result up in the hash table. If it
789 finds a match, the client is considered a member of both the class and
792 Subclasses can be declared with or without scope. In the above
793 example, the sole purpose of the subclass is to allow some clients
794 access to one address pool, while other clients are given access to
795 the other pool, so these subclasses are declared without scopes. If
796 part of the purpose of the subclass were to define different parameter
797 values for some clients, you might want to declare some subclasses
800 In the above example, if you had a single client that needed some
801 configuration parameters, while most didn't, you might write the
802 following subclass declaration for that client:
805 subclass "allocation-class-2" 1:08:00:2b:a1:11:31 {
806 option root-path "samsara:/var/diskless/alphapc";
807 filename "/tftpboot/netbsd.alphapc-diskless";
811 In this example, we've used subclassing as a way to control address
812 allocation on a per-client basis. However, it's also possible to use
813 subclassing in ways that are not specific to clients - for example, to
814 use the value of the vendor-class-identifier option to determine what
815 values to send in the vendor-encapsulated-options option. An example
816 of this is shown under the VENDOR ENCAPSULATED OPTIONS head in the
819 .SH PER-CLASS LIMITS ON DYNAMIC ADDRESS ALLOCATION
821 You may specify a limit to the number of clients in a class that can
822 be assigned leases. The effect of this will be to make it difficult
823 for a new client in a class to get an address. Once a class with
824 such a limit has reached its limit, the only way a new client in that
825 class can get a lease is for an existing client to relinquish its
826 lease, either by letting it expire, or by sending a DHCPRELEASE
827 packet. Classes with lease limits are specified as follows:
835 This will produce a class in which a maximum of four members may hold
839 It is possible to declare a
840 .I spawning class\fR.
841 A spawning class is a class that automatically produces subclasses
842 based on what the client sends. The reason that spawning classes
843 were created was to make it possible to create lease-limited classes
844 on the fly. The envisioned application is a cable-modem environment
845 where the ISP wishes to provide clients at a particular site with more
846 than one IP address, but does not wish to provide such clients with
847 their own subnet, nor give them an unlimited number of IP addresses
848 from the network segment to which they are connected.
850 Many cable modem head-end systems can be configured to add a Relay
851 Agent Information option to DHCP packets when relaying them to the
852 DHCP server. These systems typically add a circuit ID or remote ID
853 option that uniquely identifies the customer site. To take advantage
854 of this, you can write a class declaration as follows:
858 spawn with option agent.circuit-id;
863 Now whenever a request comes in from a customer site, the circuit ID
864 option will be checked against the class's hash table. If a subclass
865 is found that matches the circuit ID, the client will be classified in
866 that subclass and treated accordingly. If no subclass is found
867 matching the circuit ID, a new one will be created and logged in the
869 file, and the client will be classified in this new class. Once the
870 client has been classified, it will be treated according to the rules
871 of the class, including, in this case, being subject to the per-site
872 limit of four leases.
874 The use of the subclass spawning mechanism is not restricted to relay
875 agent options - this particular example is given only because it is a
876 fairly straightforward one.
877 .SH COMBINING MATCH, MATCH IF AND SPAWN WITH
879 In some cases, it may be useful to use one expression to assign a
880 client to a particular class, and a second expression to put it into a
881 subclass of that class. This can be done by combining the \fBmatch
882 if\fR and \fBspawn with\fR statements, or the \fBmatch if\fR and
883 \fBmatch\fR statements. For example:
886 class "jr-cable-modems" {
887 match if option dhcp-vendor-identifier = "jrcm";
888 spawn with option agent.circuit-id;
892 class "dv-dsl-modems" {
893 match if option dhcp-vendor-identifier = "dvdsl";
894 spawn with option agent.circuit-id;
899 This allows you to have two classes that both have the same \fBspawn
900 with\fR expression without getting the clients in the two classes
901 confused with each other.
902 .SH DYNAMIC DNS UPDATES
904 The DHCP server has the ability to dynamically update the Domain Name
905 System. Within the configuration files, you can define how you want
906 the Domain Name System to be updated. These updates are RFC 2136
907 compliant so any DNS server supporting RFC 2136 should be able to
908 accept updates from the DHCP server.
910 Two DNS update schemes are currently implemented, and another is
911 planned. The two that are currently available are the ad-hoc DNS
912 update mode and the interim DHCP-DNS interaction draft update mode.
913 If and when the DHCP-DNS interaction draft and the DHCID draft make it
914 through the IETF standards process, there will be a third mode, which
915 will be the standard DNS update method. The DHCP server must be
916 configured to use one of the two currently-supported methods, or not
917 to do dns updates. This can be done with the
919 configuration parameter.
920 .SH THE AD-HOC DNS UPDATE SCHEME
921 The ad-hoc Dynamic DNS update scheme is
926 In future releases of the ISC DHCP server, this scheme will not likely be
927 available. The interim scheme works, allows for failover, and should now be
928 used. The following description is left here for informational purposes
931 The ad-hoc Dynamic DNS update scheme implemented in this version of
932 the ISC DHCP server is a prototype design, which does not
933 have much to do with the standard update method that is being
934 standardized in the IETF DHC working group, but rather implements some
935 very basic, yet useful, update capabilities. This mode
939 because it does not account for the possibility of two different DHCP
940 servers updating the same set of DNS records.
942 For the ad-hoc DNS update method, the client's FQDN is derived in two
943 parts. First, the hostname is determined. Then, the domain name is
944 determined, and appended to the hostname.
946 The DHCP server determines the client's hostname by first looking for
947 a \fIddns-hostname\fR configuration option, and using that if it is
948 present. If no such option is present, the server looks for a
949 valid hostname in the FQDN option sent by the client. If one is
950 found, it is used; otherwise, if the client sent a host-name option,
951 that is used. Otherwise, if there is a host declaration that applies
952 to the client, the name from that declaration will be used. If none
953 of these applies, the server will not have a hostname for the client,
954 and will not be able to do a DNS update.
956 The domain name is determined based strictly on the server
957 configuration, not on what the client sends. First, if there is a
959 configuration option, it is used. Second, if there is a
960 \fIdomain-name\fR option configured, that is used. Otherwise, the
961 server will not do the DNS update.
963 The client's fully-qualified domain name, derived as we have
964 described, is used as the name on which an "A" record will be stored.
965 The A record will contain the IP address that the client was assigned
966 in its lease. If there is already an A record with the same name in
967 the DNS server, no update of either the A or PTR records will occur -
968 this prevents a client from claiming that its hostname is the name of
969 some network server. For example, if you have a fileserver called
970 "fs.sneedville.edu", and the client claims its hostname is "fs", no
971 DNS update will be done for that client, and an error message will be
974 If the A record update succeeds, a PTR record update for the assigned
975 IP address will be done, pointing to the A record. This update is
976 unconditional - it will be done even if another PTR record of the same
977 name exists. Since the IP address has been assigned to the DHCP
978 server, this should be safe.
980 Please note that the current implementation assumes clients only have
981 a single network interface. A client with two network interfaces
982 will see unpredictable behavior. This is considered a bug, and will
983 be fixed in a later release. It may be helpful to enable the
984 .I one-lease-per-client
985 parameter so that roaming clients do not trigger this same behavior.
987 The DHCP protocol normally involves a four-packet exchange - first the
988 client sends a DHCPDISCOVER message, then the server sends a
989 DHCPOFFER, then the client sends a DHCPREQUEST, then the server sends
990 a DHCPACK. In the current version of the server, the server will do
991 a DNS update after it has received the DHCPREQUEST, and before it has
992 sent the DHCPACK. It only sends the DNS update if it has not sent
993 one for the client's address before, in order to minimize the impact
996 When the client's lease expires, the DHCP server (if it is operating
997 at the time, or when next it operates) will remove the client's A and
998 PTR records from the DNS database. If the client releases its lease
999 by sending a DHCPRELEASE message, the server will likewise remove the
1001 .SH THE INTERIM DNS UPDATE SCHEME
1002 The interim DNS update scheme operates mostly according to several
1003 drafts that are being considered by the IETF and are expected to
1004 become standards, but are not yet standards, and may not be
1005 standardized exactly as currently proposed. These are:
1009 draft-ietf-dhc-ddns-resolution-??.txt
1010 draft-ietf-dhc-fqdn-option-??.txt
1011 draft-ietf-dnsext-dhcid-rr-??.txt
1014 Because our implementation is slightly different than the standard, we
1015 will briefly document the operation of this update style here.
1017 The first point to understand about this style of DNS update is that
1018 unlike the ad-hoc style, the DHCP server does not necessarily
1019 always update both the A and the PTR records. The FQDN option
1020 includes a flag which, when sent by the client, indicates that the
1021 client wishes to update its own A record. In that case, the server
1022 can be configured either to honor the client's intentions or ignore
1023 them. This is done with the statement \fIallow client-updates;\fR or
1024 the statement \fIignore client-updates;\fR. By default, client
1025 updates are allowed.
1027 If the server is configured to allow client updates, then if the
1028 client sends a fully-qualified domain name in the FQDN option, the
1029 server will use that name the client sent in the FQDN option to update
1030 the PTR record. For example, let us say that the client is a visitor
1031 from the "radish.org" domain, whose hostname is "jschmoe". The
1032 server is for the "example.org" domain. The DHCP client indicates in
1033 the FQDN option that its FQDN is "jschmoe.radish.org.". It also
1034 indicates that it wants to update its own A record. The DHCP server
1035 therefore does not attempt to set up an A record for the client, but
1036 does set up a PTR record for the IP address that it assigns the
1037 client, pointing at jschmoe.radish.org. Once the DHCP client has an
1038 IP address, it can update its own A record, assuming that the
1039 "radish.org" DNS server will allow it to do so.
1041 If the server is configured not to allow client updates, or if the
1042 client doesn't want to do its own update, the server will simply
1043 choose a name for the client from either the fqdn option (if present)
1044 or the hostname option (if present). It will use its own
1045 domain name for the client, just as in the ad-hoc update scheme.
1046 It will then update both the A and PTR record, using the name that it
1047 chose for the client. If the client sends a fully-qualified domain
1048 name in the fqdn option, the server uses only the leftmost part of the
1049 domain name - in the example above, "jschmoe" instead of
1050 "jschmoe.radish.org".
1053 .I use-host-decl-names
1054 configuration option is enabled, then the host declaration's
1056 will be used in place of the
1058 option, and the same rules will apply as described above.
1060 The other difference between the ad-hoc scheme and the interim
1061 scheme is that with the interim scheme, a method is used that
1062 allows more than one DHCP server to update the DNS database without
1063 accidentally deleting A records that shouldn't be deleted nor failing
1064 to add A records that should be added. The scheme works as follows:
1066 When the DHCP server issues a client a new lease, it creates a text
1067 string that is an MD5 hash over the DHCP client's identification (see
1068 draft-ietf-dnsext-dhcid-rr-??.txt for details). The update adds an A
1069 record with the name the server chose and a TXT record containing the
1070 hashed identifier string (hashid). If this update succeeds, the
1073 If the update fails because the A record already exists, then the DHCP
1074 server attempts to add the A record with the prerequisite that there
1075 must be a TXT record in the same name as the new A record, and that
1076 TXT record's contents must be equal to hashid. If this update
1077 succeeds, then the client has its A record and PTR record. If it
1078 fails, then the name the client has been assigned (or requested) is in
1079 use, and can't be used by the client. At this point the DHCP server
1080 gives up trying to do a DNS update for the client until the client
1083 The interim DNS update scheme is called interim for two reasons.
1084 First, it does not quite follow the drafts. The current versions of
1085 the drafts call for a new DHCID RRtype, but this is not yet
1086 available. The interim DNS update scheme uses a TXT record
1087 instead. Also, the existing ddns-resolution draft calls for the DHCP
1088 server to put a DHCID RR on the PTR record, but the \fIinterim\fR
1089 update method does not do this. It is our position that this is not
1090 useful, and we are working with the author in hopes of removing it
1091 from the next version of the draft, or better understanding why it is
1094 In addition to these differences, the server also does not update very
1095 aggressively. Because each DNS update involves a round trip to the
1096 DNS server, there is a cost associated with doing updates even if they
1097 do not actually modify the DNS database. So the DHCP server tracks
1098 whether or not it has updated the record in the past (this information
1099 is stored on the lease) and does not attempt to update records that it
1100 thinks it has already updated.
1102 This can lead to cases where the DHCP server adds a record, and then
1103 the record is deleted through some other mechanism, but the server
1104 never again updates the DNS because it thinks the data is already
1105 there. In this case the data can be removed from the lease through
1106 operator intervention, and once this has been done, the DNS will be
1107 updated the next time the client renews.
1108 .SH DYNAMIC DNS UPDATE SECURITY
1110 When you set your DNS server up to allow updates from the DHCP server,
1111 you may be exposing it to unauthorized updates. To avoid this, you
1112 should use TSIG signatures - a method of cryptographically signing
1113 updates using a shared secret key. As long as you protect the
1114 secrecy of this key, your updates should also be secure. Note,
1115 however, that the DHCP protocol itself provides no security, and that
1116 clients can therefore provide information to the DHCP server which the
1117 DHCP server will then use in its updates, with the constraints
1118 described previously.
1120 The DNS server must be configured to allow updates for any zone that
1121 the DHCP server will be updating. For example, let us say that
1122 clients in the sneedville.edu domain will be assigned addresses on the
1123 10.10.17.0/24 subnet. In that case, you will need a key declaration
1124 for the TSIG key you will be using, and also two zone declarations -
1125 one for the zone containing A records that will be updates and one for
1126 the zone containing PTR records - for ISC BIND, something like this:
1130 algorithm HMAC-MD5.SIG-ALG.REG.INT;
1131 secret pRP5FapFoJ95JEL06sv4PQ==;
1134 zone "example.org" {
1136 file "example.org.db";
1137 allow-update { key DHCP_UPDATER; };
1140 zone "17.10.10.in-addr.arpa" {
1143 allow-update { key DHCP_UPDATER; };
1147 You will also have to configure your DHCP server to do updates to
1148 these zones. To do so, you need to add something like this to your
1153 algorithm HMAC-MD5.SIG-ALG.REG.INT;
1154 secret pRP5FapFoJ95JEL06sv4PQ==;
1162 zone 17.127.10.in-addr.arpa. {
1168 The \fIprimary\fR statement specifies the IP address of the name
1169 server whose zone information is to be updated.
1171 Note that the zone declarations have to correspond to authority
1172 records in your name server - in the above example, there must be an
1173 SOA record for "example.org." and for "17.10.10.in-addr.arpa.". For
1174 example, if there were a subdomain "foo.example.org" with no separate
1175 SOA, you could not write a zone declaration for "foo.example.org."
1176 Also keep in mind that zone names in your DHCP configuration should end in a
1177 "."; this is the preferred syntax. If you do not end your zone name in a
1178 ".", the DHCP server will figure it out. Also note that in the DHCP
1179 configuration, zone names are not encapsulated in quotes where there are in
1180 the DNS configuration.
1182 You should choose your own secret key, of course. The ISC BIND 8 and
1183 9 distributions come with a program for generating secret keys called
1184 dnssec-keygen. The version that comes with BIND 9 is likely to produce a
1185 substantially more random key, so we recommend you use that one even
1186 if you are not using BIND 9 as your DNS server. If you are using BIND 9's
1187 dnssec-keygen, the above key would be created as follows:
1190 dnssec-keygen -a HMAC-MD5 -b 128 -n USER DHCP_UPDATER
1193 If you are using the BIND 8 dnskeygen program, the following command will
1194 generate a key as seen above:
1197 dnskeygen -H 128 -u -c -n DHCP_UPDATER
1200 You may wish to enable logging of DNS updates on your DNS server.
1201 To do so, you might write a logging statement like the following:
1205 channel update_debug {
1206 file "/var/log/update-debug.log";
1212 channel security_info {
1213 file "/var/log/named-auth.info";
1220 category update { update_debug; };
1221 category security { security_info; };
1225 You must create the /var/log/named-auth.info and
1226 /var/log/update-debug.log files before starting the name server. For
1227 more information on configuring ISC BIND, consult the documentation
1228 that accompanies it.
1229 .SH REFERENCE: EVENTS
1231 There are three kinds of events that can happen regarding a lease, and
1232 it is possible to declare statements that occur when any of these
1233 events happen. These events are the commit event, when the server
1234 has made a commitment of a certain lease to a client, the release
1235 event, when the client has released the server from its commitment,
1236 and the expiry event, when the commitment expires.
1238 To declare a set of statements to execute when an event happens, you
1239 must use the \fBon\fR statement, followed by the name of the event,
1240 followed by a series of statements to execute when the event happens,
1241 enclosed in braces. Events are used to implement DNS
1242 updates, so you should not define your own event handlers if you are
1243 using the built-in DNS update mechanism.
1245 The built-in version of the DNS update mechanism is in a text
1246 string towards the top of server/dhcpd.c. If you want to use events
1247 for things other than DNS updates, and you also want DNS updates, you
1248 will have to start out by copying this code into your dhcpd.conf file
1250 .SH REFERENCE: DECLARATIONS
1257 \fBinclude\fR \fI"filename"\fR\fB;\fR
1260 The \fIinclude\fR statement is used to read in a named file, and process
1261 the contents of that file as though it were entered in place of the
1269 \fBshared-network\fR \fIname\fR \fB{\fR
1270 [ \fIparameters\fR ]
1271 [ \fIdeclarations\fR ]
1275 The \fIshared-network\fR statement is used to inform the DHCP server
1276 that some IP subnets actually share the same physical network. Any
1277 subnets in a shared network should be declared within a
1278 \fIshared-network\fR statement. Parameters specified in the
1279 \fIshared-network\fR statement will be used when booting clients on
1280 those subnets unless parameters provided at the subnet or host level
1281 override them. If any subnet in a shared network has addresses
1282 available for dynamic allocation, those addresses are collected into a
1283 common pool for that shared network and assigned to clients as needed.
1284 There is no way to distinguish on which subnet of a shared network a
1288 should be the name of the shared network. This name is used when
1289 printing debugging messages, so it should be descriptive for the
1290 shared network. The name may have the syntax of a valid domain name
1291 (although it will never be used as such), or it may be any arbitrary
1292 name, enclosed in quotes.
1299 \fBsubnet\fR \fIsubnet-number\fR \fBnetmask\fR \fInetmask\fR \fB{\fR
1300 [ \fIparameters\fR ]
1301 [ \fIdeclarations\fR ]
1305 The \fIsubnet\fR statement is used to provide dhcpd with enough
1306 information to tell whether or not an IP address is on that subnet.
1307 It may also be used to provide subnet-specific parameters and to
1308 specify what addresses may be dynamically allocated to clients booting
1309 on that subnet. Such addresses are specified using the \fIrange\fR
1314 should be an IP address or domain name which resolves to the subnet
1315 number of the subnet being described. The
1317 should be an IP address or domain name which resolves to the subnet mask
1318 of the subnet being described. The subnet number, together with the
1319 netmask, are sufficient to determine whether any given IP address is
1320 on the specified subnet.
1322 Although a netmask must be given with every subnet declaration, it is
1323 recommended that if there is any variance in subnet masks at a site, a
1324 subnet-mask option statement be used in each subnet declaration to set
1325 the desired subnet mask, since any subnet-mask option statement will
1326 override the subnet mask declared in the subnet statement.
1333 .B range\fR [ \fBdynamic-bootp\fR ] \fIlow-address\fR [ \fIhigh-address\fR]\fB;\fR
1336 For any subnet on which addresses will be assigned dynamically, there
1337 must be at least one \fIrange\fR statement. The range statement
1338 gives the lowest and highest IP addresses in a range. All IP
1339 addresses in the range should be in the subnet in which the
1340 \fIrange\fR statement is declared. The \fIdynamic-bootp\fR flag may
1341 be specified if addresses in the specified range may be dynamically
1342 assigned to BOOTP clients as well as DHCP clients. When specifying a
1343 single address, \fIhigh-address\fR can be omitted.
1350 \fBhost\fR \fIhostname\fR {
1351 [ \fIparameters\fR ]
1352 [ \fIdeclarations\fR ]
1358 declaration provides a scope in which to provide configuration information about
1359 a specific client, and also provides a way to assign a client a fixed address.
1360 The host declaration provides a way for the DHCP server to identify a DHCP or
1361 BOOTP client, and also a way to assign the client a static IP address.
1363 If it is desirable to be able to boot a DHCP or BOOTP client on more than one
1364 subnet with fixed addresses, more than one address may be specified in the
1366 declaration, or more than one
1368 statement may be specified matching the same client.
1370 If client-specific boot parameters must change based on the network
1371 to which the client is attached, then multiple
1373 declarations should be used. The
1375 declarations will only match a client if one of their
1377 statements is viable on the subnet (or shared network) where the client is
1378 attached. Conversely, for a
1380 declaration to match a client being allocated a dynamic address, it must not
1383 statements. You may therefore need a mixture of
1385 declarations for any given client...some having
1387 statements, others without.
1390 should be a name identifying the host. If a \fIhostname\fR option is
1391 not specified for the host, \fIhostname\fR is used.
1393 \fIHost\fR declarations are matched to actual DHCP or BOOTP clients
1394 by matching the \fRdhcp-client-identifier\fR option specified in the
1395 \fIhost\fR declaration to the one supplied by the client, or, if the
1396 \fIhost\fR declaration or the client does not provide a
1397 \fRdhcp-client-identifier\fR option, by matching the \fIhardware\fR
1398 parameter in the \fIhost\fR declaration to the network hardware
1399 address supplied by the client. BOOTP clients do not normally
1400 provide a \fIdhcp-client-identifier\fR, so the hardware address must
1401 be used for all clients that may boot using the BOOTP protocol.
1403 Please be aware that
1405 the \fIdhcp-client-identifier\fR option and the hardware address can be
1406 used to match a host declaration. For example, it is not possible to match
1407 a host declaration to a \fIhost-name\fR option. This is because the
1408 host-name option cannot be guaranteed to be unique for any given client,
1409 whereas both the hardware address and \fIdhcp-client-identifier\fR option
1410 are at least theoretically guaranteed to be unique to a given client.
1418 [ \fIparameters\fR ]
1419 [ \fIdeclarations\fR ]
1423 The group statement is used simply to apply one or more parameters to
1424 a group of declarations. It can be used to group hosts, shared
1425 networks, subnets, or even other groups.
1426 .SH REFERENCE: ALLOW AND DENY
1431 statements can be used to control the response of the DHCP server to
1432 various sorts of requests. The allow and deny keywords actually have
1433 different meanings depending on the context. In a pool context, these
1434 keywords can be used to set up access lists for address allocation
1435 pools. In other contexts, the keywords simply control general server
1436 behavior with respect to clients based on scope. In a non-pool
1439 keyword can be used in place of the
1441 keyword to prevent logging of denied requests.
1443 .SH ALLOW DENY AND IGNORE IN SCOPE
1444 The following usages of allow and deny will work in any scope,
1445 although it is not recommended that they be used in pool
1452 \fBallow unknown-clients;\fR
1453 \fBdeny unknown-clients;\fR
1454 \fBignore unknown-clients;\fR
1456 The \fBunknown-clients\fR flag is used to tell dhcpd whether
1457 or not to dynamically assign addresses to unknown clients. Dynamic
1458 address assignment to unknown clients is \fBallow\fRed by default.
1459 An unknown client is simply a client that has no host declaration.
1461 The use of this option is now \fIdeprecated\fR. If you are trying to
1462 restrict access on your network to known clients, you should use \fBdeny
1463 unknown-clients;\fR inside of your address pool, as described under the
1464 heading ALLOW AND DENY WITHIN POOL DECLARATIONS.
1474 The \fBbootp\fR flag is used to tell dhcpd whether
1475 or not to respond to bootp queries. Bootp queries are \fBallow\fRed
1478 This option does not satisfy the requirement of failover peers for denying
1479 dynamic bootp clients. The \fBdeny dynamic bootp clients;\fR option should
1480 be used instead. See the ALLOW AND DENY WITHIN POOL DECLARATIONS section
1481 of this man page for more details.
1487 \fBallow booting;\fR
1489 \fBignore booting;\fR
1491 The \fBbooting\fR flag is used to tell dhcpd whether or not to respond
1492 to queries from a particular client. This keyword only has meaning
1493 when it appears in a host declaration. By default, booting is
1494 \fBallow\fRed, but if it is disabled for a particular client, then
1495 that client will not be able to get an address from the DHCP server.
1501 \fBallow duplicates;\fR
1502 \fBdeny duplicates;\fR
1504 Host declarations can match client messages based on the DHCP Client
1505 Identifier option or based on the client's network hardware type and
1506 MAC address. If the MAC address is used, the host declaration will
1507 match any client with that MAC address - even clients with different
1508 client identifiers. This doesn't normally happen, but is possible
1509 when one computer has more than one operating system installed on it -
1510 for example, Microsoft Windows and NetBSD or Linux.
1512 The \fBduplicates\fR flag tells the DHCP server that if a request is
1513 received from a client that matches the MAC address of a host
1514 declaration, any other leases matching that MAC address should be
1515 discarded by the server, even if the UID is not the same. This is a
1516 violation of the DHCP protocol, but can prevent clients whose client
1517 identifiers change regularly from holding many leases at the same time.
1518 By default, duplicates are \fBallow\fRed.
1524 \fBallow declines;\fR
1525 \fBdeny declines;\fR
1526 \fBignore declines;\fR
1528 The DHCPDECLINE message is used by DHCP clients to indicate that the
1529 lease the server has offered is not valid. When the server receives
1530 a DHCPDECLINE for a particular address, it normally abandons that
1531 address, assuming that some unauthorized system is using it.
1532 Unfortunately, a malicious or buggy client can, using DHCPDECLINE
1533 messages, completely exhaust the DHCP server's allocation pool. The
1534 server will reclaim these leases, but while the client is running
1535 through the pool, it may cause serious thrashing in the DNS, and it
1536 will also cause the DHCP server to forget old DHCP client address
1539 The \fBdeclines\fR flag tells the DHCP server whether or not to honor
1540 DHCPDECLINE messages. If it is set to \fBdeny\fR or \fBignore\fR in
1541 a particular scope, the DHCP server will not respond to DHCPDECLINE
1548 \fBallow client-updates;\fR
1549 \fBdeny client-updates;\fR
1551 The \fBclient-updates\fR flag tells the DHCP server whether or not to
1552 honor the client's intention to do its own update of its A record.
1553 This is only relevant when doing \fIinterim\fR DNS updates. See the
1554 documentation under the heading THE INTERIM DNS UPDATE SCHEME for
1556 .SH ALLOW AND DENY WITHIN POOL DECLARATIONS
1558 The uses of the allow and deny keywords shown in the previous section
1559 work pretty much the same way whether the client is sending a
1560 DHCPDISCOVER or a DHCPREQUEST message - an address will be allocated
1561 to the client (either the old address it's requesting, or a new
1562 address) and then that address will be tested to see if it's okay to
1563 let the client have it. If the client requested it, and it's not
1564 okay, the server will send a DHCPNAK message. Otherwise, the server
1565 will simply not respond to the client. If it is okay to give the
1566 address to the client, the server will send a DHCPACK message.
1568 The primary motivation behind pool declarations is to have address
1569 allocation pools whose allocation policies are different. A client
1570 may be denied access to one pool, but allowed access to another pool
1571 on the same network segment. In order for this to work, access
1572 control has to be done during address allocation, not after address
1575 When a DHCPREQUEST message is processed, address allocation simply
1576 consists of looking up the address the client is requesting and seeing
1577 if it's still available for the client. If it is, then the DHCP
1578 server checks both the address pool permit lists and the relevant
1579 in-scope allow and deny statements to see if it's okay to give the
1580 lease to the client. In the case of a DHCPDISCOVER message, the
1581 allocation process is done as described previously in the ADDRESS
1584 When declaring permit lists for address allocation pools, the
1585 following syntaxes are recognized following the allow or deny keywords:
1587 \fBknown-clients;\fR
1589 If specified, this statement either allows or prevents allocation from
1590 this pool to any client that has a host declaration (i.e., is known).
1591 A client is known if it has a host declaration in \fIany\fR scope, not
1592 just the current scope.
1594 \fBunknown-clients;\fR
1596 If specified, this statement either allows or prevents allocation from
1597 this pool to any client that has no host declaration (i.e., is not
1600 \fBmembers of "\fRclass\fB";\fR
1602 If specified, this statement either allows or prevents allocation from
1603 this pool to any client that is a member of the named class.
1605 \fBdynamic bootp clients;\fR
1607 If specified, this statement either allows or prevents allocation from
1608 this pool to any bootp client.
1610 \fBauthenticated clients;\fR
1612 If specified, this statement either allows or prevents allocation from
1613 this pool to any client that has been authenticated using the DHCP
1614 authentication protocol. This is not yet supported.
1616 \fBunauthenticated clients;\fR
1618 If specified, this statement either allows or prevents allocation from
1619 this pool to any client that has not been authenticated using the DHCP
1620 authentication protocol. This is not yet supported.
1624 If specified, this statement either allows or prevents allocation from
1625 this pool to all clients. This can be used when you want to write a
1626 pool declaration for some reason, but hold it in reserve, or when you
1627 want to renumber your network quickly, and thus want the server to
1628 force all clients that have been allocated addresses from this pool to
1629 obtain new addresses immediately when they next renew.
1630 .SH REFERENCE: PARAMETERS
1636 .B always-broadcast \fIflag\fR\fB;\fR
1638 The DHCP and BOOTP protocols both require DHCP and BOOTP clients to
1639 set the broadcast bit in the flags field of the BOOTP message header.
1640 Unfortunately, some DHCP and BOOTP clients do not do this, and
1641 therefore may not receive responses from the DHCP server. The DHCP
1642 server can be made to always broadcast its responses to clients by
1643 setting this flag to 'on' for the relevant scope; relevant scopes would be
1644 inside a conditional statement, as a parameter for a class, or as a parameter
1645 for a host declaration. To avoid creating excess broadcast traffic on your
1646 network, we recommend that you restrict the use of this option to as few
1647 clients as possible. For example, the Microsoft DHCP client is known not
1648 to have this problem, as are the OpenTransport and ISC DHCP clients.
1652 .I always-reply-rfc1048
1656 .B always-reply-rfc1048 \fIflag\fR\fB;\fR
1658 Some BOOTP clients expect RFC1048-style responses, but do not follow
1659 RFC1048 when sending their requests. You can tell that a client is
1660 having this problem if it is not getting the options you have
1661 configured for it and if you see in the server log the message
1662 "(non-rfc1048)" printed with each BOOTREQUEST that is logged.
1664 If you want to send rfc1048 options to such a client, you can set the
1665 .B always-reply-rfc1048
1666 option in that client's host declaration, and the DHCP server will
1667 respond with an RFC-1048-style vendor options field. This flag can
1668 be set in any scope, and will affect all clients covered by that
1679 .B not authoritative;
1681 The DHCP server will normally assume that the configuration
1682 information about a given network segment is not known to be correct
1683 and is not authoritative. This is so that if a naive user installs a
1684 DHCP server not fully understanding how to configure it, it does not
1685 send spurious DHCPNAK messages to clients that have obtained addresses
1686 from a legitimate DHCP server on the network.
1688 Network administrators setting up authoritative DHCP servers for their
1689 networks should always write \fBauthoritative;\fR at the top of their
1690 configuration file to indicate that the DHCP server \fIshould\fR send
1691 DHCPNAK messages to misconfigured clients. If this is not done,
1692 clients will be unable to get a correct IP address after changing
1693 subnets until their old lease has expired, which could take quite a
1696 Usually, writing \fBauthoritative;\fR at the top level of the file
1697 should be sufficient. However, if a DHCP server is to be set up so
1698 that it is aware of some networks for which it is authoritative and
1699 some networks for which it is not, it may be more appropriate to
1700 declare authority on a per-network-segment basis.
1702 Note that the most specific scope for which the concept of authority
1703 makes any sense is the physical network segment - either a
1704 shared-network statement or a subnet statement that is not contained
1705 within a shared-network statement. It is not meaningful to specify
1706 that the server is authoritative for some subnets within a shared
1707 network, but not authoritative for others, nor is it meaningful to
1708 specify that the server is authoritative for some host declarations
1712 The \fIboot-unknown-clients\fR statement
1715 .B boot-unknown-clients \fIflag\fB;\fR
1717 If the \fIboot-unknown-clients\fR statement is present and has a value
1718 of \fIfalse\fR or \fIoff\fR, then clients for which there is no
1720 declaration will not be allowed to obtain IP addresses. If this
1721 statement is not present or has a value of \fItrue\fR or \fIon\fR,
1722 then clients without host declarations will be allowed to obtain IP
1723 addresses, as long as those addresses are not restricted by
1725 and \fIdeny\fR statements within their \fIpool\fR declarations.
1728 The \fIddns-hostname\fR statement
1731 .B ddns-hostname \fIname\fB;\fR
1733 The \fIname\fR parameter should be the hostname that will be used in
1734 setting up the client's A and PTR records. If no ddns-hostname is
1735 specified in scope, then the server will derive the hostname
1736 automatically, using an algorithm that varies for each of the
1737 different update methods.
1740 The \fIddns-domainname\fR statement
1743 .B ddns-domainname \fIname\fB;\fR
1745 The \fIname\fR parameter should be the domain name that will be
1746 appended to the client's hostname to form a fully-qualified
1750 The \fIddns-rev-domainname\fR statement
1753 .B ddns-rev-domainname \fIname\fB;\fR
1754 The \fIname\fR parameter should be the domain name that will be
1755 appended to the client's reversed IP address to produce a name for use
1756 in the client's PTR record. By default, this is "in-addr.arpa.", but
1757 the default can be overridden here.
1759 The reversed IP address to which this domain name is appended is
1760 always the IP address of the client, in dotted quad notation, reversed
1761 - for example, if the IP address assigned to the client is
1762 10.17.92.74, then the reversed IP address is 74.92.17.10. So a
1763 client with that IP address would, by default, be given a PTR record
1764 of 10.17.92.74.in-addr.arpa.
1767 The \fIddns-update-style\fR parameter
1770 .B ddns-update-style \fIstyle\fB;\fR
1774 parameter must be one of \fBad-hoc\fR, \fBinterim\fR or \fBnone\fR.
1775 The \fIddns-update-style\fR statement is only meaningful in the outer
1776 scope - it is evaluated once after reading the dhcpd.conf file, rather
1777 than each time a client is assigned an IP address, so there is no way
1778 to use different DNS update styles for different clients.
1786 \fBddns-updates \fIflag\fR\fB;\fR
1788 The \fIddns-updates\fR parameter controls whether or not the server will
1789 attempt to do a DNS update when a lease is confirmed. Set this to \fIoff\fR
1790 if the server should not attempt to do updates within a certain scope.
1791 The \fIddns-updates\fR parameter is on by default. To disable DNS
1792 updates in all scopes, it is preferable to use the
1793 \fIddns-update-style\fR statement, setting the style to \fInone\fR.
1797 .I default-lease-time
1801 .B default-lease-time \fItime\fR\fB;\fR
1804 should be the length in seconds that will be assigned to a lease if
1805 the client requesting the lease does not ask for a specific expiration
1810 .I do-forward-updates
1814 .B do-forward-updates \fIflag\fB;\fR
1816 The \fIdo-forward-updates\fR statement instructs the DHCP server as
1817 to whether it should attempt to update a DHCP client's A record
1818 when the client acquires or renews a lease. This statement has no
1819 effect unless DNS updates are enabled and \fBddns-update-style\fR is
1820 set to \fBinterim\fR. Forward updates are enabled by default. If
1821 this statement is used to disable forward updates, the DHCP server
1822 will never attempt to update the client's A record, and will only ever
1823 attempt to update the client's PTR record if the client supplies an
1824 FQDN that should be placed in the PTR record using the fqdn option.
1825 If forward updates are enabled, the DHCP server will still honor the
1826 setting of the \fBclient-updates\fR flag.
1830 .I dynamic-bootp-lease-cutoff
1834 .B dynamic-bootp-lease-cutoff \fIdate\fB;\fR
1836 The \fIdynamic-bootp-lease-cutoff\fR statement sets the ending time
1837 for all leases assigned dynamically to BOOTP clients. Because BOOTP
1838 clients do not have any way of renewing leases, and don't know that
1839 their leases could expire, by default dhcpd assigns infinite leases
1840 to all BOOTP clients. However, it may make sense in some situations
1841 to set a cutoff date for all BOOTP leases - for example, the end of a
1842 school term, or the time at night when a facility is closed and all
1843 machines are required to be powered off.
1846 should be the date on which all assigned BOOTP leases will end. The
1847 date is specified in the form:
1850 W YYYY/MM/DD HH:MM:SS
1852 W is the day of the week expressed as a number
1853 from zero (Sunday) to six (Saturday). YYYY is the year, including the
1854 century. MM is the month expressed as a number from 1 to 12. DD is
1855 the day of the month, counting from 1. HH is the hour, from zero to
1856 23. MM is the minute and SS is the second. The time is always in
1857 Coordinated Universal Time (UTC), not local time.
1861 .I dynamic-bootp-lease-length
1865 .B dynamic-bootp-lease-length\fR \fIlength\fR\fB;\fR
1867 The \fIdynamic-bootp-lease-length\fR statement is used to set the
1868 length of leases dynamically assigned to BOOTP clients. At some
1869 sites, it may be possible to assume that a lease is no longer in
1870 use if its holder has not used BOOTP or DHCP to get its address within
1871 a certain time period. The period is specified in \fIlength\fR as a
1872 number of seconds. If a client reboots using BOOTP during the
1873 timeout period, the lease duration is reset to \fIlength\fR, so a
1874 BOOTP client that boots frequently enough will never lose its lease.
1875 Needless to say, this parameter should be adjusted with extreme
1884 .B filename\fR \fB"\fR\fIfilename\fR\fB";\fR
1886 The \fIfilename\fR statement can be used to specify the name of the
1887 initial boot file which is to be loaded by a client. The
1889 should be a filename recognizable to whatever file transfer protocol
1890 the client can be expected to use to load the file.
1898 .B fixed-address address\fR [\fB,\fR \fIaddress\fR ... ]\fB;\fR
1900 The \fIfixed-address\fR declaration is used to assign one or more fixed
1901 IP addresses to a client. It should only appear in a \fIhost\fR
1902 declaration. If more than one address is supplied, then when the
1903 client boots, it will be assigned the address that corresponds to the
1904 network on which it is booting. If none of the addresses in the
1905 \fIfixed-address\fR statement are valid for the network to which the client
1906 is connected, that client will not match the \fIhost\fR declaration
1907 containing that \fIfixed-address\fR declaration. Each \fIaddress\fR
1908 in the \fIfixed-address\fR declaration should be either an IP address or
1909 a domain name that resolves to one or more IP addresses.
1913 .I get-lease-hostnames
1917 .B get-lease-hostnames\fR \fIflag\fR\fB;\fR
1919 The \fIget-lease-hostnames\fR statement is used to tell dhcpd whether
1920 or not to look up the domain name corresponding to the IP address of
1921 each address in the lease pool and use that address for the DHCP
1922 \fIhostname\fR option. If \fIflag\fR is true, then this lookup is
1923 done for all addresses in the current scope. By default, or if
1924 \fIflag\fR is false, no lookups are done.
1932 .B hardware \fIhardware-type hardware-address\fB;\fR
1934 In order for a BOOTP client to be recognized, its network hardware
1935 address must be declared using a \fIhardware\fR clause in the
1939 must be the name of a physical hardware interface type. Currently,
1944 types are recognized, although support for a
1946 hardware type (and others) would also be desirable.
1949 should be a set of hexadecimal octets (numbers from 0 through ff)
1950 separated by colons. The \fIhardware\fR statement may also be used
1959 .B lease-file-name \fIname\fB;\fR
1962 should be the name of the DHCP server's lease file. By default, this
1963 is DBDIR/dhcpd.leases. This statement \fBmust\fR appear in the outer
1964 scope of the configuration file - if it appears in some other scope,
1965 it will have no effect.
1973 .B local-port \fIport\fB;\fR
1975 This statement causes the DHCP server to listen for DHCP requests on
1976 the UDP port specified in \fIport\fR, rather than on port 67.
1984 .B local-address \fIaddress\fB;\fR
1986 This statement causes the DHCP server to listen for DHCP requests sent
1987 to the specified \fIaddress\fR, rather than requests sent to all addresses.
1988 Since serving directly attached DHCP clients implies that the server must
1989 respond to requests sent to the all-ones IP address, this option cannot be
1990 used if clients are on directly attached networks...it is only realistically
1991 useful for a server whose only clients are reached via unicasts, such as via
1994 Note: This statement is only effective if the server was compiled using
1995 the USE_SOCKETS #define statement, which is default on a small number of
1996 operating systems, and must be explicitly chosen at compile-time for all
1997 others. You can be sure if your server is compiled with USE_SOCKETS if
1998 you see lines of this format at startup:
2000 Listening on Socket/eth0
2002 Note also that since this bind()s all DHCP sockets to the specified
2003 address, that only one address may be supported in a daemon at a given
2012 .B log-facility \fIfacility\fB;\fR
2014 This statement causes the DHCP server to do all of its logging on the
2015 specified log facility once the dhcpd.conf file has been read. By
2016 default the DHCP server logs to the daemon facility. Possible log
2017 facilities include auth, authpriv, cron, daemon, ftp, kern, lpr, mail,
2018 mark, news, ntp, security, syslog, user, uucp, and local0 through
2019 local7. Not all of these facilities are available on all systems,
2020 and there may be other facilities available on other systems.
2022 In addition to setting this value, you may need to modify your
2024 file to configure logging of the DHCP server. For example, you might
2025 add a line like this:
2028 local7.debug /var/log/dhcpd.log
2031 The syntax of the \fIsyslog.conf\fR file may be different on some
2032 operating systems - consult the \fIsyslog.conf\fR manual page to be
2033 sure. To get syslog to start logging to the new file, you must first
2034 create the file with correct ownership and permissions (usually, the
2035 same owner and permissions of your /var/log/messages or
2036 /usr/adm/messages file should be fine) and send a SIGHUP to syslogd.
2037 Some systems support log rollover using a shell script or program
2038 called newsyslog or logrotate, and you may be able to configure this
2039 as well so that your log file doesn't grow uncontrollably.
2041 Because the \fIlog-facility\fR setting is controlled by the dhcpd.conf
2042 file, log messages printed while parsing the dhcpd.conf file or before
2043 parsing it are logged to the default log facility. To prevent this,
2044 see the README file included with this distribution, which describes
2045 how to change the default log facility. When this parameter is used,
2046 the DHCP server prints its startup message a second time after parsing
2047 the configuration file, so that the log will be as complete as
2056 .B max-lease-time \fItime\fR\fB;\fR
2059 should be the maximum length in seconds that will be assigned to a
2060 lease. The only exception to this is that Dynamic BOOTP lease
2061 lengths, which are not specified by the client, are not limited by
2070 .B min-lease-time \fItime\fR\fB;\fR
2073 should be the minimum length in seconds that will be assigned to a
2082 .B min-secs \fIseconds\fR\fB;\fR
2085 should be the minimum number of seconds since a client began trying to
2086 acquire a new lease before the DHCP server will respond to its request.
2087 The number of seconds is based on what the client reports, and the maximum
2088 value that the client can report is 255 seconds. Generally, setting this
2089 to one will result in the DHCP server not responding to the client's first
2090 request, but always responding to its second request.
2093 to set up a secondary DHCP server which never offers an address to a client
2094 until the primary server has been given a chance to do so. If the primary
2095 server is down, the client will bind to the secondary server, but otherwise
2096 clients should always bind to the primary. Note that this does not, by
2097 itself, permit a primary server and a secondary server to share a pool of
2098 dynamically-allocatable addresses.
2106 .B next-server\fR \fIserver-name\fR\fB;\fR
2108 The \fInext-server\fR statement is used to specify the host address of
2109 the server from which the initial boot file (specified in the
2110 \fIfilename\fR statement) is to be loaded. \fIServer-name\fR should
2111 be a numeric IP address or a domain name.
2119 .B omapi-port\fR \fIport\fR\fB;\fR
2121 The \fIomapi-port\fR statement causes the DHCP server to listen for
2122 OMAPI connections on the specified port. This statement is required
2123 to enable the OMAPI protocol, which is used to examine and modify the
2124 state of the DHCP server as it is running.
2128 .I one-lease-per-client
2132 .B one-lease-per-client \fIflag\fR\fB;\fR
2134 If this flag is enabled, whenever a client sends a DHCPREQUEST for a
2135 particular lease, the server will automatically free any other leases
2136 the client holds. This presumes that when the client sends a
2137 DHCPREQUEST, it has forgotten any lease not mentioned in the
2138 DHCPREQUEST - i.e., the client has only a single network interface
2140 it does not remember leases it's holding on networks to which it is
2141 not currently attached. Neither of these assumptions are guaranteed
2142 or provable, so we urge caution in the use of this statement.
2154 should be the name of the DHCP server's process ID file. This is the
2155 file in which the DHCP server's process ID is stored when the server
2156 starts. By default, this is RUNDIR/dhcpd.pid. Like the
2157 lease-file-name statement, this statement must appear in the outer scope
2158 of the configuration file.
2169 When the DHCP server is considering dynamically allocating an IP
2170 address to a client, it first sends an ICMP Echo request (a \fIping\fR)
2171 to the address being assigned. It waits for a second, and if no
2172 ICMP Echo response has been heard, it assigns the address. If a
2173 response \fIis\fR heard, the lease is abandoned, and the server does
2174 not respond to the client.
2176 This \fIping check\fR introduces a default one-second delay in responding
2177 to DHCPDISCOVER messages, which can be a problem for some clients. The
2178 default delay of one second may be configured using the ping-timeout
2179 parameter. The ping-check configuration parameter can be used to control
2180 checking - if its value is false, no ping check is done.
2189 .I seconds\fR\fB;\fR
2191 If the DHCP server determined it should send an ICMP echo request (a
2192 \fIping\fR) because the ping-check statement is true, ping-timeout allows
2193 you to configure how many seconds the DHCP server should wait for an
2194 ICMP Echo response to be heard, if no ICMP Echo response has been received
2195 before the timeout expires, it assigns the address. If a response \fIis\fR
2196 heard, the lease is abandoned, and the server does not respond to the client.
2197 If no value is set, ping-timeout defaults to 1 second.
2201 .I server-identifier
2205 .B server-identifier \fIhostname\fR\fB;\fR
2207 The server-identifier statement can be used to define the value that
2208 is sent in the DHCP Server Identifier option for a given scope. The
2209 value specified \fBmust\fR be an IP address for the DHCP server, and
2210 must be reachable by all clients served by a particular scope.
2212 The use of the server-identifier statement is not recommended - the only
2213 reason to use it is to force a value other than the default value to be
2214 sent on occasions where the default value would be incorrect. The default
2215 value is the first IP address associated with the physical network interface
2216 on which the request arrived.
2218 The usual case where the
2219 \fIserver-identifier\fR statement needs to be sent is when a physical
2220 interface has more than one IP address, and the one being sent by default
2221 isn't appropriate for some or all clients served by that interface.
2222 Another common case is when an alias is defined for the purpose of
2223 having a consistent IP address for the DHCP server, and it is desired
2224 that the clients use this IP address when contacting the server.
2226 Supplying a value for the dhcp-server-identifier option is equivalent
2227 to using the server-identifier statement.
2235 .B server-name "\fIname\fB";\fR
2237 The \fIserver-name\fR statement can be used to inform the client of
2238 the name of the server from which it is booting. \fIName\fR should
2239 be the name that will be provided to the client.
2243 .I site-option-space
2247 .B site-option-space "\fIname\fB";\fR
2249 The \fIsite-option-space\fR statement can be used to determine from
2250 what option space site-local options will be taken. This can be used
2251 in much the same way as the \fIvendor-option-space\fR statement.
2252 Site-local options in DHCP are those options whose numeric codes are
2253 greater than 128. These options are intended for site-specific
2254 uses, but are frequently used by vendors of embedded hardware that
2255 contains DHCP clients. Because site-specific options are allocated
2256 on an ad hoc basis, it is quite possible that one vendor's DHCP client
2257 might use the same option code that another vendor's client uses, for
2258 different purposes. The \fIsite-option-space\fR option can be used
2259 to assign a different set of site-specific options for each such
2260 vendor, using conditional evaluation (see \fBdhcp-eval (5)\fR for
2265 .I stash-agent-options
2269 .B stash-agent-options \fIflag\fB;\fR
2271 If the \fIstash-agent-options\fR parameter is true for a given client,
2272 the server will record the relay agent information options sent during
2273 the client's initial DHCPREQUEST message when the client was in the
2274 SELECTING state and behave as if those options are included in all
2275 subsequent DHCPREQUEST messages sent in the RENEWING state. This
2276 works around a problem with relay agent information options, which is
2277 that they usually not appear in DHCPREQUEST messages sent by the
2278 client in the RENEWING state, because such messages are unicast
2279 directly to the server and not sent through a relay agent.
2283 .I update-optimization
2287 .B update-optimization \fIflag\fB;\fR
2289 If the \fIupdate-optimization\fR parameter is false for a given client,
2290 the server will attempt a DNS update for that client each time the
2291 client renews its lease, rather than only attempting an update when it
2292 appears to be necessary. This will allow the DNS to heal from
2293 database inconsistencies more easily, but the cost is that the DHCP
2294 server must do many more DNS updates. We recommend leaving this option
2295 enabled, which is the default. This option only affects the behavior of
2296 the interim DNS update scheme, and has no effect on the ad-hoc DNS update
2297 scheme. If this parameter is not specified, or is true, the DHCP server
2298 will only update when the client information changes, the client gets a
2299 different lease, or the client's lease expires.
2303 .I update-static-leases
2307 .B update-static-leases \fIflag\fB;\fR
2309 The \fIupdate-static-leases\fR flag, if enabled, causes the DHCP
2310 server to do DNS updates for clients even if those clients are being
2311 assigned their IP address using a \fIfixed-address\fR statement - that
2312 is, the client is being given a static assignment. This can only
2313 work with the \fIinterim\fR DNS update scheme. It is not
2314 recommended because the DHCP server has no way to tell that the update
2315 has been done, and therefore will not delete the record when it is not
2316 in use. Also, the server must attempt the update each time the
2317 client renews its lease, which could have a significant performance
2318 impact in environments that place heavy demands on the DHCP server.
2322 .I use-host-decl-names
2326 .B use-host-decl-names \fIflag\fB;\fR
2328 If the \fIuse-host-decl-names\fR parameter is true in a given scope,
2329 then for every host declaration within that scope, the name provided
2330 for the host declaration will be supplied to the client as its
2331 hostname. So, for example,
2335 use-host-decl-names on;
2338 hardware ethernet 08:00:2b:4c:29:32;
2339 fixed-address joe.fugue.com;
2346 hardware ethernet 08:00:2b:4c:29:32;
2347 fixed-address joe.fugue.com;
2348 option host-name "joe";
2352 An \fIoption host-name\fR statement within a host declaration will
2353 override the use of the name in the host declaration.
2355 It should be noted here that most DHCP clients completely ignore the
2356 host-name option sent by the DHCP server, and there is no way to
2357 configure them not to do this. So you generally have a choice of
2358 either not having any hostname to client IP address mapping that the
2359 client will recognize, or doing DNS updates. It is beyond
2360 the scope of this document to describe how to make this
2365 .I use-lease-addr-for-default-route
2369 .B use-lease-addr-for-default-route \fIflag\fR\fB;\fR
2371 If the \fIuse-lease-addr-for-default-route\fR parameter is true in a
2372 given scope, then instead of sending the value specified in the
2373 routers option (or sending no value at all), the IP address of the
2374 lease being assigned is sent to the client. This supposedly causes
2375 Win95 machines to ARP for all IP addresses, which can be helpful if
2376 your router is configured for proxy ARP. The use of this feature is
2377 not recommended, because it won't work for many DHCP clients.
2381 .I vendor-option-space
2385 .B vendor-option-space \fIstring\fR\fB;\fR
2387 The \fIvendor-option-space\fR parameter determines from what option
2388 space vendor options are taken. The use of this configuration
2389 parameter is illustrated in the \fBdhcp-options(5)\fR manual page, in
2390 the \fIVENDOR ENCAPSULATED OPTIONS\fR section.
2392 .SH SETTING PARAMETER VALUES USING EXPRESSIONS
2393 Sometimes it's helpful to be able to set the value of a DHCP server
2394 parameter based on some value that the client has sent. To do this,
2395 you can use expression evaluation. The
2397 manual page describes how to write expressions. To assign the result
2398 of an evaluation to an option, define the option as follows:
2401 \fImy-parameter \fB= \fIexpression \fB;\fR
2407 ddns-hostname = binary-to-ascii (16, 8, "-",
2408 substring (hardware, 1, 6));
2410 .SH REFERENCE: OPTION STATEMENTS
2411 DHCP option statements are documented in the
2414 .SH REFERENCE: EXPRESSIONS
2415 Expressions used in DHCP option statements and elsewhere are
2420 dhcpd(8), dhcpd.leases(5), dhcp-options(5), dhcp-eval(5), RFC2132, RFC2131.
2423 was written by Ted Lemon
2424 under a contract with Vixie Labs. Funding
2425 for this project was provided by Internet Systems Consortium.
2426 Information about Internet Systems Consortium can be found at
2427 .B http://www.isc.org.