1 .\" $Id: dhclient.conf.5,v 1.1.1.1 2005/12/07 10:50:31 sonic_amiga Exp $
3 .\" Copyright (c) 2004 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 Software Consortium
25 .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
26 .\" To learn more about Internet Software 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''.
32 dhclient.conf - DHCP client configuration file
34 The dhclient.conf file contains configuration information for
36 the Internet Systems Consortium DHCP Client.
38 The dhclient.conf file is a free-form ASCII text file. It is parsed by
39 the recursive-descent parser built into dhclient. The file may contain
40 extra tabs and newlines for formatting purposes. Keywords in the file
41 are case-insensitive. Comments may be placed anywhere within the
42 file (except within quotes). Comments begin with the # character and
43 end at the end of the line.
45 The dhclient.conf file can be used to configure the behaviour of the
46 client in a wide variety of ways: protocol timing, information
47 requested from the server, information required of the server,
48 defaults to use if the server does not provide certain information,
49 values with which to override information provided by the server, or
50 values to prepend or append to information provided by the server.
51 The configuration file can also be preinitialized with addresses to
52 use on networks that don't have DHCP servers.
54 The timing behaviour of the client need not be configured by the user.
55 If no timing configuration is provided by the user, a fairly
56 reasonable timing behaviour will be used by default - one which
57 results in fairly timely updates without placing an inordinate load on
60 The following statements can be used to adjust the timing behaviour of
61 the DHCP client if required, however:
73 statement determines the amount of time that must pass between the
74 time that the client begins to try to determine its address and the
75 time that it decides that it's not going to be able to contact a
76 server. By default, this timeout is sixty seconds. After the
77 timeout has passed, if there are any static leases defined in the
78 configuration file, or any leases remaining in the lease database that
79 have not yet expired, the client will loop through these leases
80 attempting to validate them, and if it finds one that appears to be
81 valid, it will use that lease's address. If there are no valid
82 static leases or unexpired leases in the lease database, the client
83 will restart the protocol after the defined retry interval.
89 \fBretry \fItime\fR\fB;\fR
93 statement determines the time that must pass after the client has
94 determined that there is no DHCP server present before it tries again
95 to contact a DHCP server. By default, this is five minutes.
101 \fBselect-timeout \fItime\fR\fB;\fR
103 It is possible (some might say desirable) for there to be more than
104 one DHCP server serving any given network. In this case, it is
105 possible that a client may be sent more than one offer in response to
106 its initial lease discovery message. It may be that one of these
107 offers is preferable to the other (e.g., one offer may have the
108 address the client previously used, and the other may not).
112 is the time after the client sends its first lease discovery request
113 at which it stops waiting for offers from servers, assuming that it
114 has received at least one such offer. If no offers have been
115 received by the time the
117 has expired, the client will accept the first offer that arrives.
119 By default, the select-timeout is zero seconds - that is, the client
120 will take the first offer it sees.
126 \fBreboot \fItime\fR\fB;\fR
128 When the client is restarted, it first tries to reacquire the last
129 address it had. This is called the INIT-REBOOT state. If it is
130 still attached to the same network it was attached to when it last
131 ran, this is the quickest way to get started. The
133 statement sets the time that must elapse after the client first tries
134 to reacquire its old address before it gives up and tries to discover
135 a new address. By default, the reboot timeout is ten seconds.
141 \fBbackoff-cutoff \fItime\fR\fB;\fR
143 The client uses an exponential backoff algorithm with some randomness,
144 so that if many clients try to configure themselves at the same time,
145 they will not make their requests in lockstep. The
147 statement determines the maximum amount of time that the client is
148 allowed to back off, the actual value will be evaluated randomly between
149 1/2 to 1 1/2 times the \fItime\fR specified. It defaults to two minutes.
155 \fBinitial-interval \fItime\fR\fB;\fR
159 statement sets the amount of time between the first attempt to reach a
160 server and the second attempt to reach a server. Each time a message
161 is sent, the interval between messages is incremented by twice the
162 current interval multiplied by a random number between zero and one.
163 If it is greater than the backoff-cutoff amount, it is set to that
164 amount. It defaults to ten seconds.
165 .SH LEASE REQUIREMENTS AND REQUESTS
166 The DHCP protocol allows the client to request that the server send it
167 specific information, and not send it other information that it is not
168 prepared to accept. The protocol also allows the client to reject
169 offers from servers if they don't contain information the client
170 needs, or if the information provided is not satisfactory.
172 There is a variety of data contained in offers that DHCP servers send
173 to DHCP clients. The data that can be specifically requested is what
174 are called \fIDHCP Options\fR. DHCP Options are defined in
175 \fBdhcp-options(5)\fR.
181 \fBrequest [ \fIoption\fR ] [\fB,\fI ... \fIoption\fR ]\fB;\fR
183 The request statement causes the client to request that any server
184 responding to the client send the client its values for the specified
185 options. Only the option names should be specified in the request
186 statement - not option parameters. By default, the DHCP server
187 requests the subnet-mask, broadcast-address, time-offset, routers,
188 domain-name, domain-name-servers and host-name options.
190 In some cases, it may be desirable to send no parameter request list
191 at all. To do this, simply write the request statement but specify
202 \fBrequire [ \fIoption\fR ] [\fB,\fI ... \fIoption ]\fB;\fR
204 The require statement lists options that must be sent in order for an
205 offer to be accepted. Offers that do not contain all the listed
206 options will be ignored.
212 \fBsend { [ \fIoption declaration\fR ]
213 [\fB,\fI ... \fIoption declaration\fR ]\fB}\fR
215 The send statement causes the client to send the specified options to
216 the server with the specified values. These are full option
217 declarations as described in \fBdhcp-options(5)\fR. Options that are
218 always sent in the DHCP protocol should not be specified here, except
219 that the client can specify a \fBrequested-lease-time\fR option other
220 than the default requested lease time, which is two hours. The other
221 obvious use for this statement is to send information to the server
222 that will allow it to differentiate between this client and other
223 clients or kinds of clients.
225 The client now has some very limited support for doing DNS updates
226 when a lease is acquired. This is prototypical, and probably doesn't
227 do what you want. It also only works if you happen to have control
228 over your DNS server, which isn't very likely.
230 To make it work, you have to declare a key and zone as in the DHCP
231 server (see \fBdhcpd.conf\fR(5) for details). You also need to
232 configure the fqdn option on the client, as follows:
235 send fqdn.fqdn "grosse.fugue.com.";
236 send fqdn.encoded on;
237 send fqdn.server-update off;
240 The \fIfqdn.fqdn\fR option \fBMUST\fR be a fully-qualified domain
241 name. You \fBMUST\fR define a zone statement for the zone to be
242 updated. The \fIfqdn.encoded\fR option may need to be set to
243 \fIon\fR or \fIoff\fR, depending on the DHCP server you are using.
246 .B do-forward-updates
249 \fBdo-forward-updates [ \fIflag\fR ] \fB;\fR
251 If you want to do DNS updates in the DHCP client
252 script (see \fBdhclient-script(8)\fR) rather than having the
253 DHCP client do the update directly (for example, if you want to
254 use SIG(0) authentication, which is not supported directly by the
255 DHCP client, you can instruct the client not to do the update using
256 the \fBdo-forward-updates\fR statement. \fIFlag\fR should be \fBtrue\fR
257 if you want the DHCP client to do the update, and \fBfalse\fR if
258 you don't want the DHCP client to do the update. By default, the DHCP
259 client will do the DNS update.
261 In some cases, a client may receive option data from the server which
262 is not really appropriate for that client, or may not receive
263 information that it needs, and for which a useful default value
264 exists. It may also receive information which is useful, but which
265 needs to be supplemented with local information. To handle these
266 needs, several option modifiers are available.
272 \fBdefault [ \fIoption declaration\fR ] \fB;\fR
274 If for some option the client should use the value supplied by
275 the server, but needs to use some default value if no value was supplied
276 by the server, these values can be defined in the
284 \fBsupersede [ \fIoption declaration\fR ] \fB;\fR
286 If for some option the client should always use a locally-configured
287 value or values rather than whatever is supplied by the server, these
288 values can be defined in the
296 \fBprepend [ \fIoption declaration\fR ] \fB;\fR
298 If for some set of options the client should use a value you
299 supply, and then use the values supplied by
300 the server, if any, these values can be defined in the
304 statement can only be used for options which
305 allow more than one value to be given. This restriction is not
306 enforced - if you ignore it, the behaviour will be unpredictable.
312 \fBappend [ \fIoption declaration\fR ] \fB;\fR
314 If for some set of options the client should first use the values
315 supplied by the server, if any, and then use values you supply, these
316 values can be defined in the
320 statement can only be used for options which
321 allow more than one value to be given. This restriction is not
322 enforced - if you ignore it, the behaviour will be unpredictable.
323 .SH LEASE DECLARATIONS
329 \fBlease {\fR \fIlease-declaration\fR [ ... \fIlease-declaration ] \fB}\fR
331 The DHCP client may decide after some period of time (see \fBPROTOCOL
332 TIMING\fR) that it is not going to succeed in contacting a
333 server. At that time, it consults its own database of old leases and
334 tests each one that has not yet timed out by pinging the listed router
335 for that lease to see if that lease could work. It is possible to
336 define one or more \fIfixed\fR leases in the client configuration file
337 for networks where there is no DHCP or BOOTP service, so that the
338 client can still automatically configure its address. This is done
343 NOTE: the lease statement is also used in the dhclient.leases file in
344 order to record leases that have been received from DHCP servers.
345 Some of the syntax for leases as described below is only needed in the
346 dhclient.leases file. Such syntax is documented here for
349 A lease statement consists of the lease keyword, followed by a left
350 curly brace, followed by one or more lease declaration statements,
351 followed by a right curly brace. The following lease declarations
358 statement is used to indicate that the lease was acquired using the
359 BOOTP protocol rather than the DHCP protocol. It is never necessary
360 to specify this in the client configuration file. The client uses
361 this syntax in its lease database file.
363 \fBinterface\fR \fB"\fR\fIstring\fR\fB";\fR
367 lease statement is used to indicate the interface on which the lease
368 is valid. If set, this lease will only be tried on a particular
369 interface. When the client receives a lease from a server, it always
370 records the interface number on which it received that lease.
371 If predefined leases are specified in the dhclient.conf file, the
372 interface should also be specified, although this is not required.
374 \fBfixed-address\fR \fIip-address\fR\fB;\fR
378 statement is used to set the ip address of a particular lease. This
379 is required for all lease statements. The IP address must be
380 specified as a dotted quad (e.g., 12.34.56.78).
382 \fBfilename "\fR\fIstring\fR\fB";\fR
386 statement specifies the name of the boot filename to use. This is
387 not used by the standard client configuration script, but is included
390 \fBserver-name "\fR\fIstring\fR\fB";\fR
394 statement specifies the name of the boot server name to use. This is
395 also not used by the standard client configuration script.
397 \fBoption\fR \fIoption-declaration\fR\fB;\fR
401 statement is used to specify the value of an option supplied by the
402 server, or, in the case of predefined leases declared in
403 dhclient.conf, the value that the user wishes the client configuration
404 script to use if the predefined lease is used.
406 \fBscript "\fIscript-name\fB";\fR
410 statement is used to specify the pathname of the dhcp client
411 configuration script. This script is used by the dhcp client to set
412 each interface's initial configuration prior to requesting an address,
413 to test the address once it has been offered, and to set the
414 interface's final configuration once a lease has been acquired. If
415 no lease is acquired, the script is used to test predefined leases, if
416 any, and also called once if no valid lease can be identified. For
417 more information, see
418 .B dhclient-script(8).
420 \fBvendor option space "\fIname\fB";\fR
423 .B vendor option space
424 statement is used to specify which option space should be used for
425 decoding the vendor-encapsulate-options option if one is received.
426 The \fIdhcp-vendor-identifier\fR can be used to request a specific
427 class of vendor options from the server. See
431 \fBmedium "\fImedia setup\fB";\fR
435 statement can be used on systems where network interfaces cannot
436 automatically determine the type of network to which they are
437 connected. The media setup string is a system-dependent parameter
438 which is passed to the dhcp client configuration script when
439 initializing the interface. On Unix and Unix-like systems, the
440 argument is passed on the ifconfig command line when configuring the
443 The dhcp client automatically declares this parameter if it uses a
446 statement) when configuring the interface in order to obtain a lease.
447 This statement should be used in predefined leases only if the network
448 interface requires media type configuration.
450 \fBrenew\fR \fIdate\fB;\fR
452 \fBrebind\fR \fIdate\fB;\fR
454 \fBexpire\fR \fIdate\fB;\fR
456 The \fBrenew\fR statement defines the time at which the dhcp client
457 should begin trying to contact its server to renew a lease that it is
458 using. The \fBrebind\fR statement defines the time at which the dhcp
459 client should begin to try to contact \fIany\fR dhcp server in order
460 to renew its lease. The \fBexpire\fR statement defines the time at
461 which the dhcp client must stop using a lease if it has not been able
462 to contact a server in order to renew it.
464 These declarations are automatically set in leases acquired by the
465 DHCP client, but must also be configured in predefined leases - a
466 predefined lease whose expiry time has passed will not be used by the
469 Dates are specified as follows:
471 \fI<weekday> <year>\fB/\fI<month>\fB/\fI<day>
472 <hour>\fB:\fI<minute>\fB:\fI<second>\fR
474 The weekday is present to make it easy for a human to tell when a
475 lease expires - it's specified as a number from zero to six, with zero
476 being Sunday. When declaring a predefined lease, it can always be
477 specified as zero. The year is specified with the century, so it
478 should generally be four digits except for really long leases. The
479 month is specified as a number starting with 1 for January. The day
480 of the month is likewise specified starting with 1. The hour is a
481 number between 0 and 23, the minute a number between 0 and 59, and the
482 second also a number between 0 and 59.
483 .SH ALIAS DECLARATIONS
484 \fBalias { \fI declarations ... \fB}\fR
486 Some DHCP clients running TCP/IP roaming protocols may require that in
487 addition to the lease they may acquire via DHCP, their interface also
488 be configured with a predefined IP alias so that they can have a
489 permanent IP address even while roaming. The Internet Systems
490 Consortium DHCP client doesn't support roaming with fixed addresses
491 directly, but in order to facilitate such experimentation, the dhcp
492 client can be set up to configure an IP alias using the
496 The alias declaration resembles a lease declaration, except that
497 options other than the subnet-mask option are ignored by the standard
498 client configuration script, and expiry times are ignored. A typical
499 alias declaration includes an interface declaration, a fixed-address
500 declaration for the IP alias address, and a subnet-mask option
501 declaration. A medium statement should never be included in an alias
503 .SH OTHER DECLARATIONS
504 \fBreject \fIip-address\fB;\fR
508 statement causes the DHCP client to reject offers from
509 servers who use the specified address as a server identifier. This
510 can be used to avoid being configured by rogue or misconfigured dhcp
511 servers, although it should be a last resort - better to track down
512 the bad DHCP server and fix it.
514 \fBinterface "\fIname\fB" { \fIdeclarations ... \fB }
516 A client with more than one network interface may require different
517 behaviour depending on which interface is being configured. All
518 timing parameters and declarations other than lease and alias
519 declarations can be enclosed in an interface declaration, and those
520 parameters will then be used only for the interface that matches the
521 specified name. Interfaces for which there is no interface
522 declaration will use the parameters declared outside of any interface
523 declaration, or the default settings.
526 ISC dhclient only maintains one list of interfaces, which is either
527 determined at startup from command line arguments, or otherwise is
528 autodetected. If you supplied the list of interfaces on the command
529 line, this configuration clause will add the named interface to the
530 list in such a way that will cause it to be configured by DHCP. Which
531 may not be the result you had intended. This is an undesirable side
532 effect that will be addressed in a future release.
534 \fBpseudo "\fIname\fR" "\fIreal-name\fB" { \fIdeclarations ... \fB }
536 Under some circumstances it can be useful to declare a pseudo-interface
537 and have the DHCP client acquire a configuration for that interface.
538 Each interface that the DHCP client is supporting normally has a DHCP
539 client state machine running on it to acquire and maintain its lease.
540 A pseudo-interface is just another state machine running on the
541 interface named \fIreal-name\fR, with its own lease and its own
542 state. If you use this feature, you must provide a client identifier
543 for both the pseudo-interface and the actual interface, and the two
544 identifiers must be different. You must also provide a separate
545 client script for the pseudo-interface to do what you want with the IP
546 address. For example:
550 send dhcp-client-identifier "my-client-ep0";
552 pseudo "secondary" "ep0" {
553 send dhcp-client-identifier "my-client-ep0-secondary";
554 script "/etc/dhclient-secondary";
558 The client script for the pseudo-interface should not configure the
559 interface up or down - essentially, all it needs to handle are the
560 states where a lease has been acquired or renewed, and the states
561 where a lease has expired. See \fBdhclient-script(8)\fR for more
564 \fBmedia "\fImedia setup\fB"\fI [ \fB, "\fImedia setup\fB", \fI... ]\fB;\fR
568 statement defines one or more media configuration parameters which may
569 be tried while attempting to acquire an IP address. The dhcp client
570 will cycle through each media setup string on the list, configuring
571 the interface using that setup and attempting to boot, and then trying
572 the next one. This can be used for network interfaces which aren't
573 capable of sensing the media type unaided - whichever media type
574 succeeds in getting a request to the server and hearing the reply is
575 probably right (no guarantees).
577 The media setup is only used for the initial phase of address
578 acquisition (the DHCPDISCOVER and DHCPOFFER packets). Once an
579 address has been acquired, the dhcp client will record it in its lease
580 database and will record the media type used to acquire the address.
581 Whenever the client tries to renew the lease, it will use that same
582 media type. The lease must expire before the client will go back to
583 cycling through media types.
585 The following configuration file is used on a laptop running NetBSD
586 1.3. The laptop has an IP alias of 192.5.5.213, and has one
587 interface, ep0 (a 3com 3C589C). Booting intervals have been
588 shortened somewhat from the default, because the client is known to
589 spend most of its time on networks with little DHCP activity. The
590 laptop does roam to multiple networks.
599 reject 192.33.137.209;
602 send host-name "andare.fugue.com";
603 send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
604 send dhcp-lease-time 3600;
605 supersede domain-name "fugue.com rc.vix.com home.vix.com";
606 prepend domain-name-servers 127.0.0.1;
607 request subnet-mask, broadcast-address, time-offset, routers,
608 domain-name, domain-name-servers, host-name;
609 require subnet-mask, domain-name-servers;
610 script "CLIENTBINDIR/dhclient-script";
611 media "media 10baseT/UTP", "media 10base2/BNC";
616 fixed-address 192.5.5.213;
617 option subnet-mask 255.255.255.255;
620 This is a very complicated dhclient.conf file - in general, yours
621 should be much simpler. In many cases, it's sufficient to just
622 create an empty dhclient.conf file - the defaults are usually fine.
624 dhcp-options(5), dhclient.leases(5), dhcpd(8), dhcpd.conf(5), RFC2132,
628 was written by Ted Lemon
629 under a contract with Vixie Labs. Funding
630 for this project was provided by Internet Systems Consortium.
631 Information about Internet Systems Consortium can be found at
632 .B http://www.isc.org.