3b9e0e2
.\"	$Id: dhclient.conf.5,v 1.17.84.2 2007/05/23 23:30:32 each Exp $
3b9e0e2
.\"
3b9e0e2
.\" Copyright (c) 2004,2007 by Internet Systems Consortium, Inc. ("ISC")
3b9e0e2
.\" Copyright (c) 1996-2003 by Internet Software Consortium
3b9e0e2
.\"
3b9e0e2
.\" Permission to use, copy, modify, and distribute this software for any
3b9e0e2
.\" purpose with or without fee is hereby granted, provided that the above
3b9e0e2
.\" copyright notice and this permission notice appear in all copies.
3b9e0e2
.\"
3b9e0e2
.\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
3b9e0e2
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
3b9e0e2
.\" MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
3b9e0e2
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3b9e0e2
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
3b9e0e2
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
3b9e0e2
.\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3b9e0e2
.\"
3b9e0e2
.\"   Internet Systems Consortium, Inc.
3b9e0e2
.\"   950 Charter Street
3b9e0e2
.\"   Redwood City, CA 94063
3b9e0e2
.\"   <info@isc.org>
3b9e0e2
.\"   http://www.isc.org/
3b9e0e2
.\"
3b9e0e2
.\" This software has been written for Internet Software Consortium
3b9e0e2
.\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc.
3b9e0e2
.\" To learn more about Internet Software Consortium, see
3b9e0e2
.\" ``http://www.isc.org/''.  To learn more about Vixie Enterprises,
3b9e0e2
.\" see ``http://www.vix.com''.   To learn more about Nominum, Inc., see
3b9e0e2
.\" ``http://www.nominum.com''.
3b9e0e2
.\"
3b9e0e2
.\" $Id: dhclient.conf.5,v 1.17.84.2 2007/05/23 23:30:32 each Exp $
3b9e0e2
.\"
3b9e0e2
.TH dhclient.conf 5
3b9e0e2
.SH NAME
3b9e0e2
dhclient.conf - DHCP client configuration file
3b9e0e2
.SH DESCRIPTION
3b9e0e2
The dhclient.conf file contains configuration information for
3b9e0e2
.IR dhclient,
3b9e0e2
the Internet Systems Consortium DHCP Client.
3b9e0e2
.PP
3b9e0e2
The dhclient.conf file is a free-form ASCII text file.   It is parsed by
3b9e0e2
the recursive-descent parser built into dhclient.   The file may contain
3b9e0e2
extra tabs and newlines for formatting purposes.  Keywords in the file
3b9e0e2
are case-insensitive.   Comments may be placed anywhere within the
3b9e0e2
file (except within quotes).   Comments begin with the # character and
3b9e0e2
end at the end of the line.
3b9e0e2
.PP
3b9e0e2
The dhclient.conf file can be used to configure the behaviour of the
3b9e0e2
client in a wide variety of ways: protocol timing, information
3b9e0e2
requested from the server, information required of the server,
3b9e0e2
defaults to use if the server does not provide certain information,
3b9e0e2
values with which to override information provided by the server, or
3b9e0e2
values to prepend or append to information provided by the server.
3b9e0e2
The configuration file can also be preinitialized with addresses to
3b9e0e2
use on networks that don't have DHCP servers.
3b9e0e2
.SH PROTOCOL TIMING
3b9e0e2
The timing behaviour of the client need not be configured by the user.
3b9e0e2
If no timing configuration is provided by the user, a fairly
3b9e0e2
reasonable timing behaviour will be used by default - one which
3b9e0e2
results in fairly timely updates without placing an inordinate load on
3b9e0e2
the server.
3b9e0e2
.PP
3b9e0e2
The following statements can be used to adjust the timing behaviour of
3b9e0e2
the DHCP client if required, however:
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B timeout
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
.B timeout
3b9e0e2
.I time
3b9e0e2
.B ;
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.I timeout
3b9e0e2
statement determines the amount of time that must pass between the
3b9e0e2
time that the client begins to try to determine its address and the
3b9e0e2
time that it decides that it's not going to be able to contact a
3b9e0e2
server.   By default, this timeout is sixty seconds.   After the
3b9e0e2
timeout has passed, if there are any static leases defined in the
3b9e0e2
configuration file, or any leases remaining in the lease database that
3b9e0e2
have not yet expired, the client will loop through these leases
3b9e0e2
attempting to validate them, and if it finds one that appears to be
3b9e0e2
valid, it will use that lease's address.   If there are no valid
3b9e0e2
static leases or unexpired leases in the lease database, the client
3b9e0e2
will restart the protocol after the defined retry interval.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B retry
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBretry \fItime\fR\fB;\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.I retry
3b9e0e2
statement determines the time that must pass after the client has
3b9e0e2
determined that there is no DHCP server present before it tries again
3b9e0e2
to contact a DHCP server.   By default, this is five minutes.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B select-timeout
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBselect-timeout \fItime\fR\fB;\fR
3b9e0e2
.PP
3b9e0e2
It is possible (some might say desirable) for there to be more than
3b9e0e2
one DHCP server serving any given network.   In this case, it is
3b9e0e2
possible that a client may be sent more than one offer in response to
3b9e0e2
its initial lease discovery message.   It may be that one of these
3b9e0e2
offers is preferable to the other (e.g., one offer may have the
3b9e0e2
address the client previously used, and the other may not).
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.I select-timeout
3b9e0e2
is the time after the client sends its first lease discovery request
3b9e0e2
at which it stops waiting for offers from servers, assuming that it
3b9e0e2
has received at least one such offer.   If no offers have been
3b9e0e2
received by the time the
3b9e0e2
.I select-timeout
3b9e0e2
has expired, the client will accept the first offer that arrives.
3b9e0e2
.PP
3b9e0e2
By default, the select-timeout is zero seconds - that is, the client
3b9e0e2
will take the first offer it sees.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B reboot
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBreboot \fItime\fR\fB;\fR
3b9e0e2
.PP
3b9e0e2
When the client is restarted, it first tries to reacquire the last
3b9e0e2
address it had.   This is called the INIT-REBOOT state.   If it is
3b9e0e2
still attached to the same network it was attached to when it last
3b9e0e2
ran, this is the quickest way to get started.   The
3b9e0e2
.I reboot
3b9e0e2
statement sets the time that must elapse after the client first tries
3b9e0e2
to reacquire its old address before it gives up and tries to discover
3b9e0e2
a new address.   By default, the reboot timeout is ten seconds.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B backoff-cutoff
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBbackoff-cutoff \fItime\fR\fB;\fR
3b9e0e2
.PP
3b9e0e2
The client uses an exponential backoff algorithm with some randomness,
3b9e0e2
so that if many clients try to configure themselves at the same time,
3b9e0e2
they will not make their requests in lockstep.   The
3b9e0e2
.I backoff-cutoff
3b9e0e2
statement determines the maximum amount of time that the client is
3b9e0e2
allowed to back off, the actual value will be evaluated randomly between
3b9e0e2
1/2 to 1 1/2 times the \fItime\fR specified.   It defaults to two minutes.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B initial-interval
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBinitial-interval \fItime\fR\fB;\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.I initial-interval
3b9e0e2
statement sets the amount of time between the first attempt to reach a
3b9e0e2
server and the second attempt to reach a server.  Each time a message
3b9e0e2
is sent, the interval between messages is incremented by twice the
3b9e0e2
current interval multiplied by a random number between zero and one.
3b9e0e2
If it is greater than the backoff-cutoff amount, it is set to that
3b9e0e2
amount.  It defaults to ten seconds.
3b9e0e2
.SH LEASE REQUIREMENTS AND REQUESTS
3b9e0e2
The DHCP protocol allows the client to request that the server send it
3b9e0e2
specific information, and not send it other information that it is not
3b9e0e2
prepared to accept.   The protocol also allows the client to reject
3b9e0e2
offers from servers if they don't contain information the client
3b9e0e2
needs, or if the information provided is not satisfactory.
3b9e0e2
.PP
3b9e0e2
There is a variety of data contained in offers that DHCP servers send
3b9e0e2
to DHCP clients.  The data that can be specifically requested is what
3b9e0e2
are called \fIDHCP Options\fR.  DHCP Options are defined in
3b9e0e2
 \fBdhcp-options(5)\fR.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B request
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBrequest [ \fIoption\fR ] [\fB,\fI ... \fIoption\fR ]\fB;\fR
3b9e0e2
.PP
3b9e0e2
The request statement causes the client to request that any server
3b9e0e2
responding to the client send the client its values for the specified
3b9e0e2
options.   Only the option names should be specified in the request
3b9e0e2
statement - not option parameters.   By default, the DHCP server
3b9e0e2
requests the subnet-mask, broadcast-address, time-offset, routers,
3b9e0e2
domain-name, domain-name-servers, host-name, nis-domain, nis-servers,
3b9e0e2
and ntp-servers options.
3b9e0e2
.PP
3b9e0e2
In some cases, it may be desirable to send no parameter request list
3b9e0e2
at all.   To do this, simply write the request statement but specify
3b9e0e2
no parameters:
3b9e0e2
.PP
3b9e0e2
.nf
3b9e0e2
	request;
3b9e0e2
.fi
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B require
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBrequire [ \fIoption\fR ] [\fB,\fI ... \fIoption ]\fB;\fR
3b9e0e2
.PP
3b9e0e2
The require statement lists options that must be sent in order for an
3b9e0e2
offer to be accepted.   Offers that do not contain all the listed
3b9e0e2
options will be ignored.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B send
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBsend { [ \fIoption declaration\fR ]
3b9e0e2
[\fB,\fI ... \fIoption declaration\fR ]\fB}\fR
3b9e0e2
.PP
3b9e0e2
The send statement causes the client to send the specified options to
3b9e0e2
the server with the specified values.  These are full option
3b9e0e2
declarations as described in \fBdhcp-options(5)\fR.  Options that are
3b9e0e2
always sent in the DHCP protocol should not be specified here, except
3b9e0e2
that the client can specify a \fBrequested-lease-time\fR option other
3b9e0e2
than the default requested lease time, which is two hours.  The other
3b9e0e2
obvious use for this statement is to send information to the server
3b9e0e2
that will allow it to differentiate between this client and other
3b9e0e2
clients or kinds of clients.
3b9e0e2
.SH DYNAMIC DNS
3b9e0e2
The client now has some very limited support for doing DNS updates
3b9e0e2
when a lease is acquired.   This is prototypical, and probably doesn't
3b9e0e2
do what you want.   It also only works if you happen to have control
3b9e0e2
over your DNS server, which isn't very likely.
3b9e0e2
.PP
3b9e0e2
To make it work, you have to declare a key and zone as in the DHCP
3b9e0e2
server (see \fBdhcpd.conf\fR(5) for details).   You also need to
3b9e0e2
configure the fqdn option on the client, as follows:
3b9e0e2
.PP
3b9e0e2
.nf
3b9e0e2
  send fqdn.fqdn "grosse.fugue.com.";
3b9e0e2
  send fqdn.encoded on;
3b9e0e2
  send fqdn.server-update off;
3b9e0e2
.fi
3b9e0e2
.PP
3b9e0e2
The \fIfqdn.fqdn\fR option \fBMUST\fR be a fully-qualified domain
3b9e0e2
name.   You \fBMUST\fR define a zone statement for the zone to be
3b9e0e2
updated.   The \fIfqdn.encoded\fR option may need to be set to
3b9e0e2
\fIon\fR or \fIoff\fR, depending on the DHCP server you are using.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B do-forward-updates
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBdo-forward-updates [ \fIflag\fR ] \fB;\fR
3b9e0e2
.PP
3b9e0e2
If you want to do DNS updates in the DHCP client
3b9e0e2
script (see \fBdhclient-script(8)\fR) rather than having the
3b9e0e2
DHCP client do the update directly (for example, if you want to
3b9e0e2
use SIG(0) authentication, which is not supported directly by the
3b9e0e2
DHCP client, you can instruct the client not to do the update using
3b9e0e2
the \fBdo-forward-updates\fR statement.   \fIFlag\fR should be \fBtrue\fR
3b9e0e2
if you want the DHCP client to do the update, and \fBfalse\fR if
3b9e0e2
you don't want the DHCP client to do the update.   By default, the DHCP
3b9e0e2
client will do the DNS update.
3b9e0e2
.SH OPTION MODIFIERS
3b9e0e2
In some cases, a client may receive option data from the server which
3b9e0e2
is not really appropriate for that client, or may not receive
3b9e0e2
information that it needs, and for which a useful default value
3b9e0e2
exists.   It may also receive information which is useful, but which
3b9e0e2
needs to be supplemented with local information.   To handle these
3b9e0e2
needs, several option modifiers are available.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B default
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBdefault [ \fIoption declaration\fR ] \fB;\fR
3b9e0e2
.PP
3b9e0e2
If for some option the client should use the value supplied by
3b9e0e2
the server, but needs to use some default value if no value was supplied
3b9e0e2
by the server, these values can be defined in the
3b9e0e2
.B default
3b9e0e2
statement.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B supersede
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBsupersede [ \fIoption declaration\fR ] \fB;\fR
3b9e0e2
.PP
3b9e0e2
If for some option the client should always use a locally-configured
3b9e0e2
value or values rather than whatever is supplied by the server, these
3b9e0e2
values can be defined in the 
3b9e0e2
.B supersede
3b9e0e2
statement.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B prepend
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBprepend [ \fIoption declaration\fR ] \fB;\fR
3b9e0e2
.PP
3b9e0e2
If for some set of options the client should use a value you
3b9e0e2
supply, and then use the values supplied by
3b9e0e2
the server, if any, these values can be defined in the
3b9e0e2
.B prepend
3b9e0e2
statement.   The
3b9e0e2
.B prepend
3b9e0e2
statement can only be used for options which
3b9e0e2
allow more than one value to be given.   This restriction is not
3b9e0e2
enforced - if you ignore it, the behaviour will be unpredictable.
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B append
3b9e0e2
.I statement
3b9e0e2
.PP
3b9e0e2
 \fBappend [ \fIoption declaration\fR ] \fB;\fR
3b9e0e2
.PP
3b9e0e2
If for some set of options the client should first use the values
3b9e0e2
supplied by the server, if any, and then use values you supply, these
3b9e0e2
values can be defined in the
3b9e0e2
.B append
3b9e0e2
statement.   The
3b9e0e2
.B append
3b9e0e2
statement can only be used for options which
3b9e0e2
allow more than one value to be given.   This restriction is not
3b9e0e2
enforced - if you ignore it, the behaviour will be unpredictable.
3b9e0e2
.SH LEASE DECLARATIONS
3b9e0e2
.PP
3b9e0e2
.I The
3b9e0e2
.B lease
3b9e0e2
.I declaration
3b9e0e2
.PP
3b9e0e2
 \fBlease {\fR \fIlease-declaration\fR [ ... \fIlease-declaration ] \fB}\fR
3b9e0e2
.PP
3b9e0e2
The DHCP client may decide after some period of time (see \fBPROTOCOL
3b9e0e2
TIMING\fR) that it is not going to succeed in contacting a
3b9e0e2
server.   At that time, it consults its own database of old leases and
3b9e0e2
tests each one that has not yet timed out by pinging the listed router
3b9e0e2
for that lease to see if that lease could work.   It is possible to
3b9e0e2
define one or more \fIfixed\fR leases in the client configuration file
3b9e0e2
for networks where there is no DHCP or BOOTP service, so that the
3b9e0e2
client can still automatically configure its address.   This is done
3b9e0e2
with the
3b9e0e2
.B lease
3b9e0e2
statement.
3b9e0e2
.PP
3b9e0e2
NOTE: the lease statement is also used in the dhclient.leases file in
3b9e0e2
order to record leases that have been received from DHCP servers.
3b9e0e2
Some of the syntax for leases as described below is only needed in the
3b9e0e2
dhclient.leases file.   Such syntax is documented here for
3b9e0e2
completeness.
3b9e0e2
.PP
3b9e0e2
A lease statement consists of the lease keyword, followed by a left
3b9e0e2
curly brace, followed by one or more lease declaration statements,
3b9e0e2
followed by a right curly brace.   The following lease declarations
3b9e0e2
are possible:
3b9e0e2
.PP
3b9e0e2
 \fBbootp;\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B bootp
3b9e0e2
statement is used to indicate that the lease was acquired using the
3b9e0e2
BOOTP protocol rather than the DHCP protocol.   It is never necessary
3b9e0e2
to specify this in the client configuration file.   The client uses
3b9e0e2
this syntax in its lease database file.
3b9e0e2
.PP
3b9e0e2
 \fBinterface\fR \fB"\fR\fIstring\fR\fB";\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B interface
3b9e0e2
lease statement is used to indicate the interface on which the lease
3b9e0e2
is valid.   If set, this lease will only be tried on a particular
3b9e0e2
interface.   When the client receives a lease from a server, it always
3b9e0e2
records the interface number on which it received that lease.
3b9e0e2
If predefined leases are specified in the dhclient.conf file, the
3b9e0e2
interface should also be specified, although this is not required.
3b9e0e2
.PP
3b9e0e2
 \fBfixed-address\fR \fIip-address\fR\fB;\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B fixed-address
3b9e0e2
statement is used to set the ip address of a particular lease.   This
3b9e0e2
is required for all lease statements.   The IP address must be
3b9e0e2
specified as a dotted quad (e.g., 12.34.56.78).
3b9e0e2
.PP
3b9e0e2
 \fBfilename "\fR\fIstring\fR\fB";\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B filename
3b9e0e2
statement specifies the name of the boot filename to use.   This is
3b9e0e2
not used by the standard client configuration script, but is included
3b9e0e2
for completeness.
3b9e0e2
.PP
3b9e0e2
 \fBserver-name "\fR\fIstring\fR\fB";\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B server-name
3b9e0e2
statement specifies the name of the boot server name to use.   This is
3b9e0e2
also not used by the standard client configuration script.
3b9e0e2
.PP
3b9e0e2
 \fBoption\fR \fIoption-declaration\fR\fB;\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B option
3b9e0e2
statement is used to specify the value of an option supplied by the
3b9e0e2
server, or, in the case of predefined leases declared in
3b9e0e2
dhclient.conf, the value that the user wishes the client configuration
3b9e0e2
script to use if the predefined lease is used.
3b9e0e2
.PP
3b9e0e2
 \fBscript "\fIscript-name\fB";\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B script
3b9e0e2
statement is used to specify the pathname of the dhcp client
3b9e0e2
configuration script.  This script is used by the dhcp client to set
3b9e0e2
each interface's initial configuration prior to requesting an address,
3b9e0e2
to test the address once it has been offered, and to set the
3b9e0e2
interface's final configuration once a lease has been acquired.   If
3b9e0e2
no lease is acquired, the script is used to test predefined leases, if
3b9e0e2
any, and also called once if no valid lease can be identified.   For
3b9e0e2
more information, see
3b9e0e2
.B dhclient-script(8).
3b9e0e2
.PP
3b9e0e2
 \fBvendor option space "\fIname\fB";\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B vendor option space
3b9e0e2
statement is used to specify which option space should be used for
3b9e0e2
decoding the vendor-encapsulate-options option if one is received.
3b9e0e2
The \fIdhcp-vendor-identifier\fR can be used to request a specific
3b9e0e2
class of vendor options from the server.   See
3b9e0e2
.B dhcp-options(5)
3b9e0e2
for details.
3b9e0e2
.PP
3b9e0e2
 \fBmedium "\fImedia setup\fB";\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B medium
3b9e0e2
statement can be used on systems where network interfaces cannot
3b9e0e2
automatically determine the type of network to which they are
3b9e0e2
connected.  The media setup string is a system-dependent parameter
3b9e0e2
which is passed to the dhcp client configuration script when
3b9e0e2
initializing the interface.  On Unix and Unix-like systems, the
3b9e0e2
argument is passed on the ifconfig command line when configuring the
3b9e0e2
interface.
3b9e0e2
.PP
3b9e0e2
The dhcp client automatically declares this parameter if it uses a
3b9e0e2
media type (see the
3b9e0e2
.B media
3b9e0e2
statement) when configuring the interface in order to obtain a lease.
3b9e0e2
This statement should be used in predefined leases only if the network
3b9e0e2
interface requires media type configuration.
3b9e0e2
.PP
3b9e0e2
 \fBrenew\fR \fIdate\fB;\fR
3b9e0e2
.PP
3b9e0e2
 \fBrebind\fR \fIdate\fB;\fR
3b9e0e2
.PP
3b9e0e2
 \fBexpire\fR \fIdate\fB;\fR
3b9e0e2
.PP
3b9e0e2
The \fBrenew\fR statement defines the time at which the dhcp client
3b9e0e2
should begin trying to contact its server to renew a lease that it is
3b9e0e2
using.   The \fBrebind\fR statement defines the time at which the dhcp
3b9e0e2
client should begin to try to contact \fIany\fR dhcp server in order
3b9e0e2
to renew its lease.   The \fBexpire\fR statement defines the time at
3b9e0e2
which the dhcp client must stop using a lease if it has not been able
3b9e0e2
to contact a server in order to renew it.
3b9e0e2
.PP
3b9e0e2
These declarations are automatically set in leases acquired by the
3b9e0e2
DHCP client, but must also be configured in predefined leases - a
3b9e0e2
predefined lease whose expiry time has passed will not be used by the
3b9e0e2
DHCP client.
3b9e0e2
.PP
3b9e0e2
Dates are specified as follows:
3b9e0e2
.PP
3b9e0e2
 \fI<weekday> <year>\fB/\fI<month>\fB/\fI<day>
3b9e0e2
<hour>\fB:\fI<minute>\fB:\fI<second>\fR
3b9e0e2
.PP
3b9e0e2
The weekday is present to make it easy for a human to tell when a
3b9e0e2
lease expires - it's specified as a number from zero to six, with zero
3b9e0e2
being Sunday.  When declaring a predefined lease, it can always be
3b9e0e2
specified as zero.  The year is specified with the century, so it
3b9e0e2
should generally be four digits except for really long leases.  The
3b9e0e2
month is specified as a number starting with 1 for January.  The day
3b9e0e2
of the month is likewise specified starting with 1.  The hour is a
3b9e0e2
number between 0 and 23, the minute a number between 0 and 59, and the
3b9e0e2
second also a number between 0 and 59.
3b9e0e2
.SH ALIAS DECLARATIONS
3b9e0e2
 \fBalias { \fI declarations ... \fB}\fR
3b9e0e2
.PP
3b9e0e2
Some DHCP clients running TCP/IP roaming protocols may require that in
3b9e0e2
addition to the lease they may acquire via DHCP, their interface also
3b9e0e2
be configured with a predefined IP alias so that they can have a
3b9e0e2
permanent IP address even while roaming.   The Internet Systems
3b9e0e2
Consortium DHCP client doesn't support roaming with fixed addresses
3b9e0e2
directly, but in order to facilitate such experimentation, the dhcp
3b9e0e2
client can be set up to configure an IP alias using the
3b9e0e2
.B alias
3b9e0e2
declaration.
3b9e0e2
.PP
3b9e0e2
The alias declaration resembles a lease declaration, except that
3b9e0e2
options other than the subnet-mask option are ignored by the standard
3b9e0e2
client configuration script, and expiry times are ignored.  A typical
3b9e0e2
alias declaration includes an interface declaration, a fixed-address
3b9e0e2
declaration for the IP alias address, and a subnet-mask option
3b9e0e2
declaration.   A medium statement should never be included in an alias
3b9e0e2
declaration.
3b9e0e2
.SH OTHER DECLARATIONS
3b9e0e2
 \fBreject \fIcidr-ip-address\fR [\fB,\fR \fI...\fB \fIcidr-ip-address\fR ] \fB;\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B reject
3b9e0e2
statement causes the DHCP client to reject offers from
3b9e0e2
servers whose server identifier matches any of the specified hosts or
3b9e0e2
subnets.  This can be used to avoid being configured by rogue or
3b9e0e2
misconfigured dhcp servers, although it should be a last resort -
3b9e0e2
better to track down the bad DHCP server and fix it.
3b9e0e2
.PP
3b9e0e2
The \fIcidr-ip-address\fR configuration type is of the
3b9e0e2
form \fIip-address\fR[\fB/\fIprefixlen\fR], where \fIip-address\fR is a
3b9e0e2
dotted quad IP address, and \fRprefixlen\fR is the CIDR prefix length of
3b9e0e2
the subnet, counting the number of significant bits in the netmask starting
3b9e0e2
from the leftmost end.  Example configuration syntax:
3b9e0e2
.PP
3b9e0e2
 \fIreject\fR 192.168.0.0\fB/\fR16\fB,\fR 10.0.0.5\fB;\fR
3b9e0e2
.PP
3b9e0e2
The above example would cause offers from any server identifier in the
3b9e0e2
entire RFC 1918 "Class C" network 192.168.0.0/16, or the specific
3b9e0e2
single address 10.0.0.5, to be rejected.
3b9e0e2
.PP
3b9e0e2
 \fBinterface "\fIname\fB" { \fIdeclarations ... \fB }
3b9e0e2
.PP
3b9e0e2
A client with more than one network interface may require different
3b9e0e2
behaviour depending on which interface is being configured.   All
3b9e0e2
timing parameters and declarations other than lease and alias
3b9e0e2
declarations can be enclosed in an interface declaration, and those
3b9e0e2
parameters will then be used only for the interface that matches the
3b9e0e2
specified name.   Interfaces for which there is no interface
3b9e0e2
declaration will use the parameters declared outside of any interface
3b9e0e2
declaration, or the default settings.
3b9e0e2
.PP
3b9e0e2
.B Note well:
3b9e0e2
ISC dhclient only maintains one list of interfaces, which is either
3b9e0e2
determined at startup from command line arguments, or otherwise is
3b9e0e2
autodetected.  If you supplied the list of interfaces on the command
3b9e0e2
line, this configuration clause will add the named interface to the
3b9e0e2
list in such a way that will cause it to be configured by DHCP.  Which
3b9e0e2
may not be the result you had intended.  This is an undesirable side
3b9e0e2
effect that will be addressed in a future release.
3b9e0e2
.PP
3b9e0e2
 \fBpseudo "\fIname\fR" "\fIreal-name\fB" { \fIdeclarations ... \fB }
3b9e0e2
.PP
3b9e0e2
Under some circumstances it can be useful to declare a pseudo-interface 
3b9e0e2
and have the DHCP client acquire a configuration for that interface.
3b9e0e2
Each interface that the DHCP client is supporting normally has a DHCP
3b9e0e2
client state machine running on it to acquire and maintain its lease.
3b9e0e2
A pseudo-interface is just another state machine running on the
3b9e0e2
interface named \fIreal-name\fR, with its own lease and its own
3b9e0e2
state.   If you use this feature, you must provide a client identifier
3b9e0e2
for both the pseudo-interface and the actual interface, and the two
3b9e0e2
identifiers must be different.   You must also provide a separate
3b9e0e2
client script for the pseudo-interface to do what you want with the IP
3b9e0e2
address.   For example:
3b9e0e2
.PP
3b9e0e2
.nf
3b9e0e2
	interface "ep0" {
3b9e0e2
		send dhcp-client-identifier "my-client-ep0";
3b9e0e2
	}
3b9e0e2
	pseudo "secondary" "ep0" {
3b9e0e2
		send dhcp-client-identifier "my-client-ep0-secondary";
3b9e0e2
		script "/etc/dhclient-secondary";
3b9e0e2
	}
3b9e0e2
.fi
3b9e0e2
.PP
3b9e0e2
The client script for the pseudo-interface should not configure the
3b9e0e2
interface up or down - essentially, all it needs to handle are the
3b9e0e2
states where a lease has been acquired or renewed, and the states
3b9e0e2
where a lease has expired.   See \fBdhclient-script(8)\fR for more
3b9e0e2
information.
3b9e0e2
.PP
3b9e0e2
 \fBmedia "\fImedia setup\fB"\fI [ \fB, "\fImedia setup\fB", \fI... ]\fB;\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B media
3b9e0e2
statement defines one or more media configuration parameters which may
3b9e0e2
be tried while attempting to acquire an IP address.   The dhcp client
3b9e0e2
will cycle through each media setup string on the list, configuring
3b9e0e2
the interface using that setup and attempting to boot, and then trying
3b9e0e2
the next one.   This can be used for network interfaces which aren't
3b9e0e2
capable of sensing the media type unaided - whichever media type
3b9e0e2
succeeds in getting a request to the server and hearing the reply is
3b9e0e2
probably right (no guarantees).
3b9e0e2
.PP
3b9e0e2
The media setup is only used for the initial phase of address
3b9e0e2
acquisition (the DHCPDISCOVER and DHCPOFFER packets).   Once an
3b9e0e2
address has been acquired, the dhcp client will record it in its lease
3b9e0e2
database and will record the media type used to acquire the address.
3b9e0e2
Whenever the client tries to renew the lease, it will use that same
3b9e0e2
media type.   The lease must expire before the client will go back to
3b9e0e2
cycling through media types.
3b9e0e2
.PP
3b9e0e2
 \fBbootp-broadcast-always;\fR
3b9e0e2
.PP
3b9e0e2
The
3b9e0e2
.B bootp-broadcast-always
3b9e0e2
statement instructs dhclient to always set the bootp broadcast flag in
3b9e0e2
request packets, so that servers will always broadcast replies.
3b9e0e2
This is equivalent to supplying the dhclient -B argument, and has
3b9e0e2
the same effect as specifying 'always-broadcast' in the server's dhcpd.conf.
3b9e0e2
This option is provided as an extension to enable dhclient to work
3b9e0e2
on IBM s390 Linux guests.
3b9e0e2
.PP
3b9e0e2
.SH SAMPLE
3b9e0e2
The following configuration file is used on a laptop running NetBSD
3b9e0e2
1.3.   The laptop has an IP alias of 192.5.5.213, and has one
3b9e0e2
interface, ep0 (a 3com 3C589C).   Booting intervals have been
3b9e0e2
shortened somewhat from the default, because the client is known to
3b9e0e2
spend most of its time on networks with little DHCP activity.   The
3b9e0e2
laptop does roam to multiple networks.
3b9e0e2
3b9e0e2
.nf
3b9e0e2
3b9e0e2
timeout 60;
3b9e0e2
retry 60;
3b9e0e2
reboot 10;
3b9e0e2
select-timeout 5;
3b9e0e2
initial-interval 2;
3b9e0e2
reject 192.33.137.209;
3b9e0e2
3b9e0e2
interface "ep0" {
3b9e0e2
    send host-name "andare.fugue.com";
3b9e0e2
    send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
3b9e0e2
    send dhcp-lease-time 3600;
3b9e0e2
    supersede domain-name "fugue.com rc.vix.com home.vix.com";
3b9e0e2
    prepend domain-name-servers 127.0.0.1;
3b9e0e2
    request subnet-mask, broadcast-address, time-offset, routers,
3b9e0e2
	    domain-name, domain-name-servers, host-name;
3b9e0e2
    require subnet-mask, domain-name-servers;
3b9e0e2
    script "CLIENTBINDIR/dhclient-script";
3b9e0e2
    media "media 10baseT/UTP", "media 10base2/BNC";
3b9e0e2
}
3b9e0e2
3b9e0e2
alias {
3b9e0e2
  interface "ep0";
3b9e0e2
  fixed-address 192.5.5.213;
3b9e0e2
  option subnet-mask 255.255.255.255;
3b9e0e2
}
3b9e0e2
.fi
3b9e0e2
This is a very complicated dhclient.conf file - in general, yours
3b9e0e2
should be much simpler.   In many cases, it's sufficient to just
3b9e0e2
create an empty dhclient.conf file - the defaults are usually fine.
3b9e0e2
.SH SEE ALSO
3b9e0e2
dhcp-options(5), dhcp-eval(5), dhclient.leases(5), dhcpd(8), dhcpd.conf(5),
3b9e0e2
RFC2132, RFC2131.
3b9e0e2
.SH AUTHOR
3b9e0e2
.B dhclient(8)
3b9e0e2
was written by Ted Lemon
3b9e0e2
under a contract with Vixie Labs.   Funding
3b9e0e2
for this project was provided by Internet Systems Consortium.
3b9e0e2
Information about Internet Systems Consortium can be found at
3b9e0e2
.B http://www.isc.org.