The timeout statement determines the amount of time that must pass between the time that the client begins to try to determine its address and the time that it decides that it is not going to be able to contact a server. By default, this timeout is sixty seconds. After the timeout has passed, if there are any static leases defined in the configuration file, or any leases remaining in the lease database that have not yet expired, the client will loop through these leases attempting to validate them, and if it finds one that appears to be valid, it will use that leases address. If there are no valid static leases or unexpired leases in the lease database, the client will restart the protocol after the defined retry interval.
retry time;
The retry statement determines the time that must pass after the client has determined that there is no DHCP server present before it tries again to contact a DHCP server. By default, this is five minutes.
select-timeout time;
It is possible (some might say desirable) for there to be more than one DHCP server serving any given network. In this case, it is possible that a client may be sent more than one offer in response to its initial lease discovery message. It may be that one of these offers is preferable to the other (e.g., one offer may have the address the client previously used, and the other may not).
The select-timeout is the time after the client sends its first lease discovery request at which it stops waiting for offers from servers, assuming that it has received at least one such offer. If no offers have been received by the time the select-timeout has expired, the client will accept the first offer that arrives.
By default, the select-timeout is zero seconds - that is, the client will take the first offer it sees.
reboot time;
When the client is restarted, it first tries to reacquire the last address it had. This is called the INIT-REBOOT state. If it is still attached to the same network it was attached to when it last ran, this is the quickest way to get started. The reboot statement sets the time that must elapse after the client first tries to reacquire its old address before it gives up and tries to discover a new address. By default, the reboot timeout is ten seconds.
backoff-cutoff time;
The client uses an exponential backoff algorithm with some randomness, so that if many clients try to configure themselves at the same time, they will not make their requests in lockstep. The backoff-cutoff statement determines the maximum amount of time that the client is allowed to back off. It defaults to two minutes.
initial-interval time;
The initial-interval statement sets the amount of time between the first attempt to reach a server and the second attempt to reach a server. Each time a message is sent, the interval between messages is incremented by twice the current interval multiplied by a random number between zero and one. If it is greater than the backoff-cutoff amount, it is set to that amount. It defaults to ten seconds.
The request statement causes the client to request that any server responding to the client send the client its values for the specified options. Only the option names should be specified in the request statement - not option parameters.
require[option[,...option]];
The require statement lists options that must be sent in order for an offer to be accepted. Offers that do not contain all the listed options will be ignored.
The send statement causes the client to send the specified options to the server with the specified values. These are full option declarations as described in dhcp-options(5). Options that are always sent in the DHCP protocol should not be specified here, except that the client can specify a dhcp-lease-time option other than the default requested lease time, which is two hours. The other obvious use for this statement is to send information to the server that will allow it to differentiate between this client and other clients or kinds of clients.
If for some set of options the client should use the value supplied by the server, but needs to use some default value if no value was supplied by the server, these values can be defined in the default statement.
If for some set of options the client should always use its own value rather than any value supplied by the server, these values can be defined in the supersede statement.
If for some set of options the client should use a value you supply, and then use the values supplied by the server, if any, these values can be defined in the prepend statement. The prepend statement can only be used for options which allow more than one value to be given. This restriction is not enforced - if violated, the results are unpredictable.
If for some set of options the client should first use the values supplied by the server, if any, and then use values you supply, these values can be defined in the append statement. The append statement can only be used for options which allow more than one value to be given. This restriction is not enforced - if you ignore it, the behaviour will be unpredictable.
The bootp statement is used to indicate that the lease was acquired using the BOOTP protocol rather than the DHCP protocol. It is never necessary to specify this in the client configuration file. The client uses this syntax in its lease database file.
interface"string";
The interface lease statement is used to indicate the interface on which the lease is valid. If set, this lease will only be tried on a particular interface. When the client receives a lease from a server, it always records the interface number on which it received that lease. If predefined leases are specified in the dhclient.conf file, the interface should also be specified, although this is not required.
fixed-address ip-address;
The fixed-address statement is used to set the IP address of a particular lease. This is required for all lease statements. The IP address must be specified as a dotted quad (e.g., 12.34.56.78).
filename"string";
The filename statement specifies the name of the boot filename to use. This is not used by the standard client configuration script, but is included for completeness.
server-name"string";
The server-name statement specifies the name of the boot server name to use. This is also not used by the standard client configuration script.
option option-declaration;
The option statement is used to specify the value of an option supplied by the server, or, in the case of predefined leases declared in dhclient.conf, the value that the user wishes the client configuration script to use if the predefined lease is used.
script"script-name";
The script statement is used to specify the pathname of the DHCP client configuration script. This script is used by the DHCP client to set each interfaces initial configuration prior to requesting an address, to test the address once it has been offered, and to set the interfaces final configuration once a lease has been acquired. If no lease is acquired, the script is used to test predefined leases, if any, and also called once if no valid lease can be identified. For more information, see dhclient.leases(5).
medium""media setup"";
The medium statement can be used on systems where network interfaces cannot automatically determine the type of network to which they are connected. The "media setup" string is a system-dependent parameter which is passed to the DHCP client configuration script when initializing the interface. On Unix and Unix Ns -like systems, the argument is passed on the ifconfig(8) command line when configuring the interface.
The DHCP client automatically declares this parameter if it used a media type (see the media statement) when configuring the interface in order to obtain a lease. This statement should be used in predefined leases only if the network interface requires media type configuration.
renew date; rebind date; expire date;
The renew statement defines the time at which the DHCP client should begin trying to contact its server to renew a lease that it is using. The rebind statement defines the time at which the DHCP client should begin to try to contact any DHCP server in order to renew its lease. The expire statement defines the time at which the DHCP client must stop using a lease if it has not been able to contact a server in order to renew it.
These declarations are automatically set in leases acquired by the DHCP client, but must also be configured in predefined leases - a predefined lease whose expiry time has passed will not be used by the DHCP client.
Dates are specified as follows:
<weekday>
.Sm off
<year> / <month> / <day>
<hour>: <minute>: <second>
.Sm on
The weekday is present to make it easy for a human to tell when a lease expires - it is specified as a number from zero to six, with zero being Sunday. When declaring a predefined lease, it can always be specified as zero. The year is specified with the century, so it should generally be four digits except for really long leases. The month is specified as a number starting with 1 for January. The day of the month is likewise specified starting with 1. The hour is a number between 0 and 23, the minute a number between 0 and 59, and the second also a number between 0 and 59.
The reject statement causes the DHCP client to reject offers from servers who use the specified address as a server identifier. This can be used to avoid being configured by rogue or misconfigured DHCP servers, although it should be a last resort - better to track down the bad DHCP server and fix it.
interface"name{ declarations ... }"
A client with more than one network interface may require different behaviour depending on which interface is being configured. All timing parameters and declarations other than lease and alias declarations can be enclosed in an interface declaration, and those parameters will then be used only for the interface that matches the specified name. Interfaces for which there is no interface declaration will use the parameters declared outside of any interface declaration, or the default settings.
media""media setup"[,""mediasetup",...]"";
The media statement defines one or more media configuration parameters which may be tried while attempting to acquire an IP address. The DHCP client will cycle through each media setup string on the list, configuring the interface using that setup and attempting to boot, and then trying the next one. This can be used for network interfaces which are not capable of sensing the media type unaided - whichever media type succeeds in getting a request to the server and hearing the reply is probably right (no guarantees).
The media setup is only used for the initial phase of address acquisition (the DHCPDISCOVER and DHCPOFFER packets). Once an address has been acquired, the DHCP client will record it in its lease database and will record the media type used to acquire the address. Whenever the client tries to renew the lease, it will use that same media type. The lease must expire before the client will go back to cycling through media types.