head 1.10; access; symbols cjep_sun2x:1.10.0.14 cjep_sun2x-base:1.10 cjep_staticlib_x-base1:1.10 cjep_staticlib_x:1.10.0.12 cjep_staticlib_x-base:1.10 phil-wifi-20200421:1.10 phil-wifi-20200411:1.10 phil-wifi-20200406:1.10 pgoyette-compat-merge-20190127:1.10 pgoyette-compat-20190127:1.10 pgoyette-compat-20190118:1.10 pgoyette-compat-1226:1.10 pgoyette-compat-1126:1.10 pgoyette-compat-1020:1.10 pgoyette-compat-0930:1.10 pgoyette-compat-0906:1.10 pgoyette-compat-0728:1.10 pgoyette-compat-0625:1.10 pgoyette-compat-0521:1.10 pgoyette-compat-0502:1.10 pgoyette-compat-0422:1.10 pgoyette-compat-0415:1.10 pgoyette-compat-0407:1.10 pgoyette-compat-0330:1.10 pgoyette-compat-0322:1.10 pgoyette-compat-0315:1.10 pgoyette-compat:1.10.0.10 pgoyette-compat-base:1.10 prg-localcount2-base3:1.10 prg-localcount2-base2:1.10 prg-localcount2-base1:1.10 prg-localcount2:1.10.0.8 prg-localcount2-base:1.10 pgoyette-localcount-20170426:1.10 bouyer-socketcan-base1:1.10 pgoyette-localcount-20170320:1.10 bouyer-socketcan:1.10.0.6 bouyer-socketcan-base:1.10 pgoyette-localcount-20170107:1.10 pgoyette-localcount-20161104:1.10 localcount-20160914:1.10 pgoyette-localcount-20160806:1.10 pgoyette-localcount-20160726:1.10 pgoyette-localcount:1.10.0.4 pgoyette-localcount-base:1.10 netbsd-5-2-3-RELEASE:1.8 netbsd-5-1-5-RELEASE:1.8 netbsd-6-0-6-RELEASE:1.9 netbsd-6-1-5-RELEASE:1.9 yamt-pagecache-base9:1.10 yamt-pagecache-tag8:1.9 netbsd-6-1-4-RELEASE:1.9 netbsd-6-0-5-RELEASE:1.9 tls-earlyentropy:1.10.0.2 tls-earlyentropy-base:1.10 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.10 riastradh-drm2-base3:1.10 netbsd-6-1-3-RELEASE:1.9 netbsd-6-0-4-RELEASE:1.9 netbsd-5-2-2-RELEASE:1.8 netbsd-5-1-4-RELEASE:1.8 netbsd-6-1-2-RELEASE:1.9 netbsd-6-0-3-RELEASE:1.9 netbsd-5-2-1-RELEASE:1.8 netbsd-5-1-3-RELEASE:1.8 netbsd-6-1-1-RELEASE:1.9 netbsd-6-1:1.9.0.22 netbsd-6-0-2-RELEASE:1.9 netbsd-6-1-RELEASE:1.9 khorben-n900:1.9.0.20 netbsd-6-1-RC4:1.9 netbsd-6-1-RC3:1.9 agc-symver:1.9.0.18 agc-symver-base:1.9 netbsd-6-1-RC2:1.9 netbsd-6-1-RC1:1.9 yamt-pagecache-base8:1.9 netbsd-5-2:1.8.0.38 netbsd-6-0-1-RELEASE:1.9 yamt-pagecache-base7:1.9 netbsd-5-2-RELEASE:1.8 netbsd-5-2-RC1:1.8 matt-nb6-plus-nbase:1.9 yamt-pagecache-base6:1.9 netbsd-6-0:1.9.0.14 netbsd-6-0-RELEASE:1.9 netbsd-6-0-RC2:1.9 tls-maxphys:1.9.0.12 tls-maxphys-base:1.10 matt-nb6-plus:1.9.0.10 matt-nb6-plus-base:1.9 netbsd-6-0-RC1:1.9 yamt-pagecache-base5:1.9 yamt-pagecache-base4:1.9 netbsd-6:1.9.0.8 netbsd-6-base:1.9 netbsd-5-1-2-RELEASE:1.8 netbsd-5-1-1-RELEASE:1.8 yamt-pagecache-base3:1.9 yamt-pagecache-base2:1.9 yamt-pagecache:1.9.0.6 yamt-pagecache-base:1.9 cherry-xenmp:1.9.0.4 cherry-xenmp-base:1.9 bouyer-quota2-nbase:1.9 bouyer-quota2:1.9.0.2 bouyer-quota2-base:1.9 matt-mips64-premerge-20101231:1.9 matt-nb5-mips64-premerge-20101231:1.8 matt-nb5-pq3:1.8.0.36 matt-nb5-pq3-base:1.8 netbsd-5-1:1.8.0.34 netbsd-5-1-RELEASE:1.8 netbsd-5-1-RC4:1.8 matt-nb5-mips64-k15:1.8 netbsd-5-1-RC3:1.8 netbsd-5-1-RC2:1.8 netbsd-5-1-RC1:1.8 netbsd-5-0-2-RELEASE:1.8 matt-nb5-mips64-premerge-20091211:1.8 matt-premerge-20091211:1.8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.8 matt-nb4-mips64-k7-u2a-k9b:1.8 matt-nb5-mips64-u1-k1-k5:1.8 matt-nb5-mips64:1.8.0.32 netbsd-5-0-1-RELEASE:1.8 jym-xensuspend-nbase:1.8 netbsd-5-0:1.8.0.30 netbsd-5-0-RELEASE:1.8 netbsd-5-0-RC4:1.8 netbsd-5-0-RC3:1.8 netbsd-5-0-RC2:1.8 jym-xensuspend:1.8.0.28 jym-xensuspend-base:1.8 netbsd-5-0-RC1:1.8 netbsd-5:1.8.0.26 netbsd-5-base:1.8 matt-mips64-base2:1.8 matt-mips64:1.8.0.24 mjf-devfs2:1.8.0.22 mjf-devfs2-base:1.8 netbsd-4-0-1-RELEASE:1.8 wrstuden-revivesa-base-3:1.8 wrstuden-revivesa-base-2:1.8 wrstuden-fixsa-newbase:1.8 wrstuden-revivesa-base-1:1.8 yamt-pf42-base4:1.8 yamt-pf42-base3:1.8 hpcarm-cleanup-nbase:1.8 yamt-pf42-baseX:1.8 yamt-pf42-base2:1.8 wrstuden-revivesa:1.8.0.20 wrstuden-revivesa-base:1.8 yamt-pf42:1.8.0.18 yamt-pf42-base:1.8 keiichi-mipv6:1.8.0.16 keiichi-mipv6-base:1.8 matt-armv6-nbase:1.8 matt-armv6-prevmlocking:1.8 wrstuden-fixsa-base-1:1.8 netbsd-4-0:1.8.0.14 netbsd-4-0-RELEASE:1.8 cube-autoconf:1.8.0.12 cube-autoconf-base:1.8 netbsd-4-0-RC5:1.8 netbsd-4-0-RC4:1.8 netbsd-4-0-RC3:1.8 netbsd-4-0-RC2:1.8 netbsd-4-0-RC1:1.8 matt-armv6:1.8.0.10 matt-armv6-base:1.8 matt-mips64-base:1.8 hpcarm-cleanup:1.8.0.8 hpcarm-cleanup-base:1.8 netbsd-3-1-1-RELEASE:1.7 netbsd-3-0-3-RELEASE:1.7 wrstuden-fixsa:1.8.0.6 wrstuden-fixsa-base:1.8 abandoned-netbsd-4-base:1.8 abandoned-netbsd-4:1.8.0.2 netbsd-3-1:1.7.0.6 netbsd-3-1-RELEASE:1.7 netbsd-3-0-2-RELEASE:1.7 netbsd-3-1-RC4:1.7 netbsd-3-1-RC3:1.7 netbsd-3-1-RC2:1.7 netbsd-3-1-RC1:1.7 netbsd-4:1.8.0.4 netbsd-4-base:1.8 netbsd-3-0-1-RELEASE:1.7 netbsd-3-0:1.7.0.4 netbsd-3-0-RELEASE:1.7 netbsd-3-0-RC6:1.7 netbsd-3-0-RC5:1.7 netbsd-3-0-RC4:1.7 netbsd-3-0-RC3:1.7 netbsd-3-0-RC2:1.7 netbsd-3-0-RC1:1.7 netbsd-2-0-3-RELEASE:1.6 netbsd-2-1:1.6.0.6 netbsd-2-1-RELEASE:1.6 netbsd-2-1-RC6:1.6 netbsd-2-1-RC5:1.6 netbsd-2-1-RC4:1.6 netbsd-2-1-RC3:1.6 netbsd-2-1-RC2:1.6 netbsd-2-1-RC1:1.6 ISC_V3-0-3_CORRECT:1.1.1.5 ISC_V3-0-3:1.1.1.4 netbsd-2-0-2-RELEASE:1.6 netbsd-3:1.7.0.2 netbsd-3-base:1.7 netbsd-2-0-1-RELEASE:1.6 netbsd-2:1.6.0.4 netbsd-2-base:1.6 netbsd-2-0-RELEASE:1.6 netbsd-2-0-RC5:1.6 netbsd-2-0-RC4:1.6 netbsd-2-0-RC3:1.6 netbsd-2-0-RC2:1.6 netbsd-2-0-RC1:1.6 netbsd-2-0:1.6.0.2 netbsd-2-0-base:1.6 netbsd-1-6-PATCH002-RELEASE:1.2.4.1 netbsd-1-6-PATCH002:1.2.4.1 netbsd-1-6-PATCH002-RC4:1.2.4.1 netbsd-1-6-PATCH002-RC3:1.2.4.1 netbsd-1-6-PATCH002-RC2:1.2.4.1 netbsd-1-6-PATCH002-RC1:1.2.4.1 netbsd-1-6-PATCH001:1.2 netbsd-1-6-PATCH001-RELEASE:1.2 netbsd-1-6-PATCH001-RC3:1.2 ISC_V3-0-1RC11:1.1.1.3 netbsd-1-6-PATCH001-RC2:1.2 netbsd-1-6-PATCH001-RC1:1.2 fvdl_fs64_base:1.3 netbsd-1-6-RELEASE:1.2 netbsd-1-6-RC3:1.2 netbsd-1-6-RC2:1.2 netbsd-1-6-RC1:1.2 ISC_V3-0-1RC9:1.1.1.2 netbsd-1-6:1.2.0.4 netbsd-1-6-base:1.2 netbsd-1-5-PATCH003:1.2.2.2 netbsd-1-5-PATCH002:1.2.2.2 netbsd-1-5:1.2.0.2 ISC_V3RC10:1.1.1.1 ISC:1.1.1; locks; strict; comment @.\" @; 1.10 date 2013.06.20.18.39.14; author christos; state dead; branches; next 1.9; commitid pK1JFBYZBf2ESnUw; 1.9 date 2010.02.17.01.17.36; author snj; state Exp; branches 1.9.6.1 1.9.12.1; next 1.8; 1.8 date 2005.08.11.17.13.21; author drochner; state Exp; branches; next 1.7; 1.7 date 2004.03.30.20.05.01; author mellon; state Exp; branches; next 1.6; 1.6 date 2003.03.31.17.31.19; author perry; state Exp; branches; next 1.5; 1.5 date 2003.03.31.11.36.22; author wiz; state Exp; branches; next 1.4; 1.4 date 2003.02.18.17.08.39; author drochner; state Exp; branches; next 1.3; 1.3 date 2002.06.11.14.00.00; author drochner; state Exp; branches; next 1.2; 1.2 date 2001.08.03.13.34.09; author drochner; state Exp; branches 1.2.2.1 1.2.4.1; next 1.1; 1.1 date 2001.08.03.11.35.31; author drochner; state Exp; branches 1.1.1.1; next ; 1.9.6.1 date 2014.05.22.11.26.59; author yamt; state dead; branches; next ; commitid IOnR4fgXMZvMGwBx; 1.9.12.1 date 2013.06.23.06.26.15; author tls; state dead; branches; next ; commitid OnlO1cBgtQRcIHUw; 1.2.2.1 date 2001.08.03.13.34.09; author tv; state dead; branches; next 1.2.2.2; 1.2.2.2 date 2001.08.16.18.46.54; author tv; state Exp; branches; next ; 1.2.4.1 date 2003.10.27.04.41.52; author jmc; state Exp; branches; next ; 1.1.1.1 date 2001.08.03.11.35.31; author drochner; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2002.06.11.12.24.35; author drochner; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2003.02.18.16.37.55; author drochner; state Exp; branches; next 1.1.1.4; 1.1.1.4 date 2005.08.11.16.54.23; author drochner; state Exp; branches; next 1.1.1.5; 1.1.1.5 date 2005.08.11.17.03.00; author drochner; state Exp; branches; next ; desc @@ 1.10 log @buy ancient code @ text @.\" $Id: dhclient.conf.5,v 1.9 2010/02/17 01:17:36 snj Exp $ .\" .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") .\" Copyright (c) 1996-2003 by Internet Software Consortium .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" Internet Systems Consortium, Inc. .\" 950 Charter Street .\" Redwood City, CA 94063 .\" .\" http://www.isc.org/ .\" .\" This software has been written for Internet Software Consortium .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc. .\" To learn more about Internet Software Consortium, see .\" ``http://www.isc.org/''. To learn more about Vixie Enterprises, .\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see .\" ``http://www.nominum.com''. .TH dhclient.conf 5 .SH NAME dhclient.conf - DHCP client configuration file .SH DESCRIPTION The dhclient.conf file contains configuration information for .IR dhclient, the Internet Systems Consortium DHCP Client. .PP The dhclient.conf file is a free-form ASCII text file. It is parsed by the recursive-descent parser built into dhclient. The file may contain extra tabs and newlines for formatting purposes. Keywords in the file are case-insensitive. Comments may be placed anywhere within the file (except within quotes). Comments begin with the # character and end at the end of the line. .PP The dhclient.conf file can be used to configure the behavior of the client in a wide variety of ways: protocol timing, information requested from the server, information required of the server, defaults to use if the server does not provide certain information, values with which to override information provided by the server, or values to prepend or append to information provided by the server. The configuration file can also be preinitialized with addresses to use on networks that don't have DHCP servers. .SH PROTOCOL TIMING The timing behavior of the client need not be configured by the user. If no timing configuration is provided by the user, a fairly reasonable timing behavior will be used by default - one which results in fairly timely updates without placing an inordinate load on the server. .PP The following statements can be used to adjust the timing behavior of the DHCP client if required, however: .PP .I The .B timeout .I statement .PP .B timeout .I time .B ; .PP The .I 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's 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 lease's 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. .PP .I The .B retry .I statement .PP \fBretry \fItime\fR\fB;\fR .PP The .I 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. .PP .I The .B select-timeout .I statement .PP \fBselect-timeout \fItime\fR\fB;\fR .PP 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). .PP The .I 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 .I select-timeout has expired, the client will accept the first offer that arrives. .PP By default, the select-timeout is zero seconds - that is, the client will take the first offer it sees. .PP .I The .B reboot .I statement .PP \fBreboot \fItime\fR\fB;\fR .PP 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 .I 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. .PP .I The .B backoff-cutoff .I statement .PP \fBbackoff-cutoff \fItime\fR\fB;\fR .PP 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 lock-step. The .I backoff-cutoff statement determines the maximum amount of time that the client is allowed to back off, the actual value will be evaluated randomly between 1/2 to 1 1/2 times the \fItime\fR specified. It defaults to two minutes. .PP .I The .B initial-interval .I statement .PP \fBinitial-interval \fItime\fR\fB;\fR .PP The .I 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. .SH LEASE REQUIREMENTS AND REQUESTS The DHCP protocol allows the client to request that the server send it specific information, and not send it other information that it is not prepared to accept. The protocol also allows the client to reject offers from servers if they don't contain information the client needs, or if the information provided is not satisfactory. .PP There is a variety of data contained in offers that DHCP servers send to DHCP clients. The data that can be specifically requested is what are called \fIDHCP Options\fR. DHCP Options are defined in \fBdhcp-options(5)\fR. .PP .I The .B request .I statement .PP \fBrequest \fR[ \fIoption\fR ] [\fB,\fI ... \fIoption\fR ]\fB;\fR .PP 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. By default, the DHCP client requests the subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers and host-name options. .PP In some cases, it may be desirable to send no parameter request list at all. To do this, simply write the request statement but specify no parameters: .PP .nf request; .fi .PP .I The .B require .I statement .PP \fBrequire \fR[ \fIoption\fR ] [\fB,\fI ... \fIoption ]\fB;\fR .PP 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. .PP .I The .B send .I statement .PP \fBsend { \fR[ \fIoption declaration\fR ] [\fB,\fI ... \fIoption declaration\fR ]\fB}\fR .PP 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 \fBdhcp-options(5)\fR. Options that are always sent in the DHCP protocol should not be specified here, except that the client can specify a \fBrequested-lease-time\fR 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. .SH DYNAMIC DNS The client now has some very limited support for doing DNS updates when a lease is acquired. This is prototypical, and probably doesn't do what you want. It also only works if you happen to have control over your DNS server, which isn't very likely. .PP To make it work, you have to declare a key and zone as in the DHCP server (see \fBdhcpd.conf\fR(5) for details). You also need to configure the fqdn option on the client, as follows: .PP .nf send fqdn.fqdn "grosse.fugue.com."; send fqdn.encoded on; send fqdn.server-update off; .fi .PP The \fIfqdn.fqdn\fR option \fBMUST\fR be a fully-qualified domain name. You \fBMUST\fR define a zone statement for the zone to be updated. The \fIfqdn.encoded\fR option may need to be set to \fIon\fR or \fIoff\fR, depending on the DHCP server you are using. .PP .I The .B do-forward-updates .I statement .PP \fBdo-forward-updates \fR[ \fIflag\fR ] \fB;\fR .PP If you want to do DNS updates in the DHCP client script (see \fBdhclient-script(8)\fR) rather than having the DHCP client do the update directly (for example, if you want to use SIG(0) authentication, which is not supported directly by the DHCP client, you can instruct the client not to do the update using the \fBdo-forward-updates\fR statement. \fIFlag\fR should be \fBtrue\fR if you want the DHCP client to do the update, and \fBfalse\fR if you don't want the DHCP client to do the update. By default, the DHCP client will do the DNS update. .PP .I The .B omapi port .I statement .PP \fBomapi port \fR[ \fIport\fR ] \fB;\fR .PP The \fBomapi port\fR statement causes the DHCP client to set up an OMAPI listener on the specified port. Only one such port should be specified. The OMAPI listener will be sensitive to connections from any IP address, so it is important to also set up an OMAPI key to protect the client from unauthorized changes. .PP .I The .B omapi key .I statement .PP \fBomapi key \fR[ \fI key-id \fR ] \fB;\fR .PP The \fBomapi key\fR statement causes the DHCP client to check any incoming OMAPI messages to make sure that they are signed by the specified key. If a message is not signed by this key, it is rejected with an "invalid key" error. .SH OPTION MODIFIERS In some cases, a client may receive option data from the server which is not really appropriate for that client, or may not receive information that it needs, and for which a useful default value exists. It may also receive information which is useful, but which needs to be supplemented with local information. To handle these needs, several option modifiers are available. .PP .I The .B default .I statement .PP \fBdefault \fR[ \fIoption declaration\fR ] \fB;\fR .PP If for some option 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 .B default statement. .PP .I The .B supersede .I statement .PP \fBsupersede \fR[ \fIoption declaration\fR ] \fB;\fR .PP If for some option the client should always use a locally-configured value or values rather than whatever is supplied by the server, these values can be defined in the .B supersede statement. .PP .I The .B prepend .I statement .PP \fBprepend \fR[ \fIoption declaration\fR ] \fB;\fR .PP 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 .B prepend statement. The .B prepend 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 behavior will be unpredictable. .PP .I The .B append .I statement .PP \fBappend \fR[ \fIoption declaration\fR ] \fB;\fR .PP 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 .B append statement. The .B 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 behavior will be unpredictable. .SH LEASE DECLARATIONS .PP .I The .B lease .I declaration .PP \fBlease {\fR \fIlease-declaration\fR \fR[ ... \fIlease-declaration ] \fB}\fR .PP The DHCP client may decide after some period of time (see \fBPROTOCOL TIMING\fR) that it is not going to succeed in contacting a server. At that time, it consults its own database of old leases and tests each one that has not yet timed out by pinging the listed router for that lease to see if that lease could work. It is possible to define one or more \fIfixed\fR leases in the client configuration file for networks where there is no DHCP or BOOTP service, so that the client can still automatically configure its address. This is done with the .B lease statement. .PP NOTE: the lease statement is also used in the dhclient.leases file in order to record leases that have been received from DHCP servers. Some of the syntax for leases as described below is only needed in the dhclient.leases file. Such syntax is documented here for completeness. .PP A lease statement consists of the lease keyword, followed by a left curly brace, followed by one or more lease declaration statements, followed by a right curly brace. The following lease declarations are possible: .PP \fBbootp;\fR .PP The .B 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. .PP \fBinterface\fR \fB"\fR\fIstring\fR\fB";\fR .PP The .B 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. .PP \fBfixed-address\fR \fIip-address\fR\fB;\fR .PP The .B 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). .PP \fBfilename "\fR\fIstring\fR\fB";\fR .PP The .B 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. .PP \fBserver-name "\fR\fIstring\fR\fB";\fR .PP The .B server-name statement specifies the name of the boot server name to use. This is also not used by the standard client configuration script. .PP \fBoption\fR \fIoption-declaration\fR\fB;\fR .PP The .B 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. .PP \fBscript "\fIscript-name\fB";\fR .PP The .B 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 interface's initial configuration prior to requesting an address, to test the address once it has been offered, and to set the interface's 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 .B dhclient-script(8). .PP \fBvendor option space "\fIname\fB";\fR .PP The .B vendor option space statement is used to specify which option space should be used for decoding the vendor-encapsulate-options option if one is received. The \fIdhcp-vendor-identifier\fR can be used to request a specific class of vendor options from the server. See .B dhcp-options(5) for details. .PP \fBmedium "\fImedia setup\fB";\fR .PP The .B 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-like systems, the argument is passed on the ifconfig command line when configuring the interface. .PP The dhcp client automatically declares this parameter if it uses a media type (see the .B 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. .PP \fBrenew\fR \fIdate\fB;\fR .PP \fBrebind\fR \fIdate\fB;\fR .PP \fBexpire\fR \fIdate\fB;\fR .PP The \fBrenew\fR 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 \fBrebind\fR statement defines the time at which the dhcp client should begin to try to contact \fIany\fR dhcp server in order to renew its lease. The \fBexpire\fR 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. .PP 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. .PP Dates are specified as follows: .PP \fI \fB/\fI\fB/\fI \fB:\fI\fB:\fI\fR .PP The weekday is present to make it easy for a human to tell when a lease expires - it's 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. .SH ALIAS DECLARATIONS \fBalias { \fI declarations ... \fB}\fR .PP Some DHCP clients running TCP/IP roaming protocols may require that in addition to the lease they may acquire via DHCP, their interface also be configured with a predefined IP alias so that they can have a permanent IP address even while roaming. The Internet Systems Consortium DHCP client doesn't support roaming with fixed addresses directly, but in order to facilitate such experimentation, the dhcp client can be set up to configure an IP alias using the .B alias declaration. .PP The alias declaration resembles a lease declaration, except that options other than the subnet-mask option are ignored by the standard client configuration script, and expiry times are ignored. A typical alias declaration includes an interface declaration, a fixed-address declaration for the IP alias address, and a subnet-mask option declaration. A medium statement should never be included in an alias declaration. .SH OTHER DECLARATIONS \fBreject \fIip-address\fB;\fR .PP The .B 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. .PP \fBinterface "\fIname\fB" { \fIdeclarations ... \fB } .PP A client with more than one network interface may require different behavior 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. .PP .B Note well: ISC dhclient only maintains one list of interfaces, which is either determined at startup from command line arguments, or otherwise is autodetected. If you supplied the list of interfaces on the command line, this configuration clause will add the named interface to the list in such a way that will cause it to be configured by DHCP. Which may not be the result you had intended. This is an undesirable side effect that will be addressed in a future release. .PP \fBpseudo "\fIname\fR" "\fIreal-name\fB" { \fIdeclarations ... \fB } .PP Under some circumstances it can be useful to declare a pseudo-interface and have the DHCP client acquire a configuration for that interface. Each interface that the DHCP client is supporting normally has a DHCP client state machine running on it to acquire and maintain its lease. A pseudo-interface is just another state machine running on the interface named \fIreal-name\fR, with its own lease and its own state. If you use this feature, you must provide a client identifier for both the pseudo-interface and the actual interface, and the two identifiers must be different. You must also provide a separate client script for the pseudo-interface to do what you want with the IP address. For example: .PP .nf interface "ep0" { send dhcp-client-identifier "my-client-ep0"; } pseudo "secondary" "ep0" { send dhcp-client-identifier "my-client-ep0-secondary"; script "/etc/dhclient-secondary"; } .fi .PP The client script for the pseudo-interface should not configure the interface up or down - essentially, all it needs to handle are the states where a lease has been acquired or renewed, and the states where a lease has expired. See \fBdhclient-script(8)\fR for more information. .PP \fBmedia "\fImedia setup\fB"\fI \fR[ \fB, "\fImedia setup\fB", \fI... ]\fB;\fR .PP The .B 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 aren't 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). .PP 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. .SH SAMPLE The following configuration file is used on a laptop running NetBSD 1.3. The laptop has an IP alias of 192.5.5.213, and has one interface, ep0 (a 3Com 3C589C). Booting intervals have been shortened somewhat from the default, because the client is known to spend most of its time on networks with little DHCP activity. The laptop does roam to multiple networks. .nf timeout 60; retry 60; reboot 10; select-timeout 5; initial-interval 2; reject 192.33.137.209; interface "ep0" { send host-name "andare.fugue.com"; send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; send dhcp-lease-time 3600; supersede domain-name "fugue.com rc.vix.com home.vix.com"; prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name; require subnet-mask, domain-name-servers; script "CLIENTBINDIR/dhclient-script"; media "media 10baseT/UTP", "media 10base2/BNC"; } alias { interface "ep0"; fixed-address 192.5.5.213; option subnet-mask 255.255.255.255; } .fi This is a very complicated dhclient.conf file - in general, yours should be much simpler. In many cases, it's sufficient to just create an empty dhclient.conf file - the defaults are usually fine. .SH SEE ALSO dhcp-options(5), dhclient.leases(5), dhcpd(8), dhcpd.conf(5), RFC2132, RFC2131. .SH AUTHOR .B dhclient(8) was written by Ted Lemon under a contract with Vixie Labs. Funding for this project was provided by Internet Systems Consortium. Information about Internet Systems Consortium can be found at .B http://www.isc.org. @ 1.9 log @Fix a thinko: the DHCP _client_ is doing the requesting. Reported by Anonymous in PR misc/39162. @ text @d1 1 a1 1 .\" $Id: dhclient.conf.5,v 1.8 2005/08/11 17:13:21 drochner Exp $ @ 1.9.6.1 log @sync with head. for a reference, the tree before this commit was tagged as yamt-pagecache-tag8. this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments") @ text @d1 1 a1 1 .\" $Id: dhclient.conf.5,v 1.9 2010/02/17 01:17:36 snj Exp $ @ 1.9.12.1 log @resync from head @ text @d1 1 a1 1 .\" $Id: dhclient.conf.5,v 1.9 2010/02/17 01:17:36 snj Exp $ @ 1.8 log @merge dhcp-3.0.3 @ text @d1 1 a1 1 .\" $Id: dhclient.conf.5,v 1.12.2.12 2005/06/16 19:40:13 dhankins Exp $ d186 1 a186 1 statement - not option parameters. By default, the DHCP server @ 1.7 log @Document omapi port and omapi key @ text @d1 1 a1 1 .\" dhclient.conf.5 d3 2 a4 4 .\" Copyright (c) 1996-2002 Internet Software Consortium. .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: d6 3 a8 8 .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of The Internet Software Consortium nor the names .\" of its contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. d10 7 a16 13 .\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. d18 7 a24 1 .\" This software has been written for the Internet Software Consortium d26 1 a26 1 .\" To learn more about the Internet Software Consortium, see a29 3 .\" .\" $Id: dhclient.conf.5,v 1.6 2003/03/31 17:31:19 perry Exp $ .\" d36 1 a36 1 the Internet Software Consortium DHCP Client. d148 2 a149 1 allowed to back off. It defaults to two minutes. d463 1 a463 1 argument is passed on the ifconfig command line when configuring te d512 1 a512 1 permanent IP address even while roaming. The Internet Software d548 9 d653 2 a654 2 for this project was provided by the Internet Software Consortium. Information about the Internet Software Consortium can be found at @ 1.6 log @Some spelling changes. Will feed back to Ted Lemon @ text @d38 1 a38 1 .\" $Id: dhclient.conf.5,v 1.5 2003/03/31 11:36:22 wiz Exp $ d190 1 a190 1 \fBrequest [ \fIoption\fR ] [\fB,\fI ... \fIoption\fR ]\fB;\fR d211 1 a211 1 \fBrequire [ \fIoption\fR ] [\fB,\fI ... \fIoption ]\fB;\fR d221 1 a221 1 \fBsend { [ \fIoption declaration\fR ] d258 1 a258 1 \fBdo-forward-updates [ \fIflag\fR ] \fB;\fR d269 23 d304 1 a304 1 \fBdefault [ \fIoption declaration\fR ] \fB;\fR d316 1 a316 1 \fBsupersede [ \fIoption declaration\fR ] \fB;\fR d328 1 a328 1 \fBprepend [ \fIoption declaration\fR ] \fB;\fR d344 1 a344 1 \fBappend [ \fIoption declaration\fR ] \fB;\fR d361 1 a361 1 \fBlease {\fR \fIlease-declaration\fR [ ... \fIlease-declaration ] \fB}\fR d587 1 a587 1 \fBmedia "\fImedia setup\fB"\fI [ \fB, "\fImedia setup\fB", \fI... ]\fB;\fR @ 1.5 log @3Com, not 3com. From jmc@@openbsd. @ text @d38 1 a38 1 .\" $Id: dhclient.conf.5,v 1.4 2003/02/18 17:08:39 drochner Exp $ d55 1 a55 1 The dhclient.conf file can be used to configure the behaviour of the d64 1 a64 1 The timing behaviour of the client need not be configured by the user. d66 1 a66 1 reasonable timing behaviour will be used by default - one which d70 1 a70 1 The following statements can be used to adjust the timing behaviour of d155 1 a155 1 they will not make their requests in lockstep. The d315 1 a315 1 enforced - if you ignore it, the behaviour will be unpredictable. d331 1 a331 1 enforced - if you ignore it, the behaviour will be unpredictable. d526 1 a526 1 behaviour depending on which interface is being configured. All @ 1.4 log @merge dhcp-3.0.1rc11 @ text @d38 1 a38 1 .\" $Id: dhclient.conf.5,v 1.12.2.8 2002/11/17 02:25:43 dhankins Exp $ d587 1 a587 1 interface, ep0 (a 3com 3C589C). Booting intervals have been @ 1.3 log @merge dhcp-3.0.1rc9 @ text @d3 1 a3 1 .\" Copyright (c) 1996-2001 Internet Software Consortium. d37 3 d255 1 a255 1 .B no-client-updates d258 1 a258 1 \fBno-client-updates [ \fIflag\fR ] \fB;\fR d265 3 a267 3 the \fBno-client-updates\fR statement. \fIFlag\fR should be \fBtrue\fR if you don't want the DHCP client to do the update, and \fBfalse\fR if you want the DHCP client to do the update. By default, the DHCP @ 1.2 log @pull in manpage adaptions / corrections from usr.sbin/dhcp @ text @d250 16 d338 1 a338 1 TIMING\fR) decide that it is not going to succeed in contacting a d449 1 a449 1 The dhcp client automatically declares this parameter if it used a d512 3 a514 1 The reject statement causes the DHCP client to reject offers from d575 1 a575 1 acquisition (the DHCPDISCOVER and DHCPOFFER packtes). Once an d607 1 a607 1 script "/etc/dhclient-script"; d625 1 a625 1 was written by Ted Lemon d629 1 a629 1 .B http://www.isc.org/isc. @ 1.2.2.1 log @file dhclient.conf.5 was added on branch netbsd-1-5 on 2001-08-16 18:46:54 +0000 @ text @d1 611 @ 1.2.2.2 log @Pullup [drochner]: dist/dhcp/* sync at 2001-August-16 Update dhcp to Version 3, Release Candidate 10. @ text @a0 611 .\" dhclient.conf.5 .\" .\" Copyright (c) 1996-2001 Internet Software Consortium. .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. Neither the name of The Internet Software Consortium nor the names .\" of its contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE .\" DISCLAIMED. IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" This software has been written for the Internet Software Consortium .\" by Ted Lemon in cooperation with Vixie Enterprises and Nominum, Inc. .\" To learn more about the Internet Software Consortium, see .\" ``http://www.isc.org/''. To learn more about Vixie Enterprises, .\" see ``http://www.vix.com''. To learn more about Nominum, Inc., see .\" ``http://www.nominum.com''. .TH dhclient.conf 5 .SH NAME dhclient.conf - DHCP client configuration file .SH DESCRIPTION The dhclient.conf file contains configuration information for .IR dhclient, the Internet Software Consortium DHCP Client. .PP The dhclient.conf file is a free-form ASCII text file. It is parsed by the recursive-descent parser built into dhclient. The file may contain extra tabs and newlines for formatting purposes. Keywords in the file are case-insensitive. Comments may be placed anywhere within the file (except within quotes). Comments begin with the # character and end at the end of the line. .PP The dhclient.conf file can be used to configure the behaviour of the client in a wide variety of ways: protocol timing, information requested from the server, information required of the server, defaults to use if the server does not provide certain information, values with which to override information provided by the server, or values to prepend or append to information provided by the server. The configuration file can also be preinitialized with addresses to use on networks that don't have DHCP servers. .SH PROTOCOL TIMING The timing behaviour of the client need not be configured by the user. If no timing configuration is provided by the user, a fairly reasonable timing behaviour will be used by default - one which results in fairly timely updates without placing an inordinate load on the server. .PP The following statements can be used to adjust the timing behaviour of the DHCP client if required, however: .PP .I The .B timeout .I statement .PP .B timeout .I time .B ; .PP The .I 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's 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 lease's 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. .PP .I The .B retry .I statement .PP \fBretry \fItime\fR\fB;\fR .PP The .I 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. .PP .I The .B select-timeout .I statement .PP \fBselect-timeout \fItime\fR\fB;\fR .PP 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). .PP The .I 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 .I select-timeout has expired, the client will accept the first offer that arrives. .PP By default, the select-timeout is zero seconds - that is, the client will take the first offer it sees. .PP .I The .B reboot .I statement .PP \fBreboot \fItime\fR\fB;\fR .PP 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 .I 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. .PP .I The .B backoff-cutoff .I statement .PP \fBbackoff-cutoff \fItime\fR\fB;\fR .PP 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 .I backoff-cutoff statement determines the maximum amount of time that the client is allowed to back off. It defaults to two minutes. .PP .I The .B initial-interval .I statement .PP \fBinitial-interval \fItime\fR\fB;\fR .PP The .I 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. .SH LEASE REQUIREMENTS AND REQUESTS The DHCP protocol allows the client to request that the server send it specific information, and not send it other information that it is not prepared to accept. The protocol also allows the client to reject offers from servers if they don't contain information the client needs, or if the information provided is not satisfactory. .PP There is a variety of data contained in offers that DHCP servers send to DHCP clients. The data that can be specifically requested is what are called \fIDHCP Options\fR. DHCP Options are defined in \fBdhcp-options(5)\fR. .PP .I The .B request .I statement .PP \fBrequest [ \fIoption\fR ] [\fB,\fI ... \fIoption\fR ]\fB;\fR .PP 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. By default, the DHCP server requests the subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers and host-name options. .PP In some cases, it may be desirable to send no parameter request list at all. To do this, simply write the request statement but specify no parameters: .PP .nf request; .fi .PP .I The .B require .I statement .PP \fBrequire [ \fIoption\fR ] [\fB,\fI ... \fIoption ]\fB;\fR .PP 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. .PP .I The .B send .I statement .PP \fBsend { [ \fIoption declaration\fR ] [\fB,\fI ... \fIoption declaration\fR ]\fB}\fR .PP 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 \fBdhcp-options(5)\fR. Options that are always sent in the DHCP protocol should not be specified here, except that the client can specify a \fBrequested-lease-time\fR 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. .SH DYNAMIC DNS The client now has some very limited support for doing DNS updates when a lease is acquired. This is prototypical, and probably doesn't do what you want. It also only works if you happen to have control over your DNS server, which isn't very likely. .PP To make it work, you have to declare a key and zone as in the DHCP server (see \fBdhcpd.conf\fR(5) for details). You also need to configure the fqdn option on the client, as follows: .PP .nf send fqdn.fqdn "grosse.fugue.com."; send fqdn.encoded on; send fqdn.server-update off; .fi .PP The \fIfqdn.fqdn\fR option \fBMUST\fR be a fully-qualified domain name. You \fBMUST\fR define a zone statement for the zone to be updated. The \fIfqdn.encoded\fR option may need to be set to \fIon\fR or \fIoff\fR, depending on the DHCP server you are using. .SH OPTION MODIFIERS In some cases, a client may receive option data from the server which is not really appropriate for that client, or may not receive information that it needs, and for which a useful default value exists. It may also receive information which is useful, but which needs to be supplemented with local information. To handle these needs, several option modifiers are available. .PP .I The .B default .I statement .PP \fBdefault [ \fIoption declaration\fR ] \fB;\fR .PP If for some option 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 .B default statement. .PP .I The .B supersede .I statement .PP \fBsupersede [ \fIoption declaration\fR ] \fB;\fR .PP If for some option the client should always use a locally-configured value or values rather than whatever is supplied by the server, these values can be defined in the .B supersede statement. .PP .I The .B prepend .I statement .PP \fBprepend [ \fIoption declaration\fR ] \fB;\fR .PP 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 .B prepend statement. The .B prepend 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. .PP .I The .B append .I statement .PP \fBappend [ \fIoption declaration\fR ] \fB;\fR .PP 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 .B append statement. The .B 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. .SH LEASE DECLARATIONS .PP .I The .B lease .I declaration .PP \fBlease {\fR \fIlease-declaration\fR [ ... \fIlease-declaration ] \fB}\fR .PP The DHCP client may decide after some period of time (see \fBPROTOCOL TIMING\fR) decide that it is not going to succeed in contacting a server. At that time, it consults its own database of old leases and tests each one that has not yet timed out by pinging the listed router for that lease to see if that lease could work. It is possible to define one or more \fIfixed\fR leases in the client configuration file for networks where there is no DHCP or BOOTP service, so that the client can still automatically configure its address. This is done with the .B lease statement. .PP NOTE: the lease statement is also used in the dhclient.leases file in order to record leases that have been received from DHCP servers. Some of the syntax for leases as described below is only needed in the dhclient.leases file. Such syntax is documented here for completeness. .PP A lease statement consists of the lease keyword, followed by a left curly brace, followed by one or more lease declaration statements, followed by a right curly brace. The following lease declarations are possible: .PP \fBbootp;\fR .PP The .B 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. .PP \fBinterface\fR \fB"\fR\fIstring\fR\fB";\fR .PP The .B 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. .PP \fBfixed-address\fR \fIip-address\fR\fB;\fR .PP The .B 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). .PP \fBfilename "\fR\fIstring\fR\fB";\fR .PP The .B 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. .PP \fBserver-name "\fR\fIstring\fR\fB";\fR .PP The .B server-name statement specifies the name of the boot server name to use. This is also not used by the standard client configuration script. .PP \fBoption\fR \fIoption-declaration\fR\fB;\fR .PP The .B 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. .PP \fBscript "\fIscript-name\fB";\fR .PP The .B 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 interface's initial configuration prior to requesting an address, to test the address once it has been offered, and to set the interface's 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 .B dhclient-script(8). .PP \fBvendor option space "\fIname\fB";\fR .PP The .B vendor option space statement is used to specify which option space should be used for decoding the vendor-encapsulate-options option if one is received. The \fIdhcp-vendor-identifier\fR can be used to request a specific class of vendor options from the server. See .B dhcp-options(5) for details. .PP \fBmedium "\fImedia setup\fB";\fR .PP The .B 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-like systems, the argument is passed on the ifconfig command line when configuring te interface. .PP The dhcp client automatically declares this parameter if it used a media type (see the .B 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. .PP \fBrenew\fR \fIdate\fB;\fR .PP \fBrebind\fR \fIdate\fB;\fR .PP \fBexpire\fR \fIdate\fB;\fR .PP The \fBrenew\fR 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 \fBrebind\fR statement defines the time at which the dhcp client should begin to try to contact \fIany\fR dhcp server in order to renew its lease. The \fBexpire\fR 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. .PP 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. .PP Dates are specified as follows: .PP \fI \fB/\fI\fB/\fI \fB:\fI\fB:\fI\fR .PP The weekday is present to make it easy for a human to tell when a lease expires - it's 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. .SH ALIAS DECLARATIONS \fBalias { \fI declarations ... \fB}\fR .PP Some DHCP clients running TCP/IP roaming protocols may require that in addition to the lease they may acquire via DHCP, their interface also be configured with a predefined IP alias so that they can have a permanent IP address even while roaming. The Internet Software Consortium DHCP client doesn't support roaming with fixed addresses directly, but in order to facilitate such experimentation, the dhcp client can be set up to configure an IP alias using the .B alias declaration. .PP The alias declaration resembles a lease declaration, except that options other than the subnet-mask option are ignored by the standard client configuration script, and expiry times are ignored. A typical alias declaration includes an interface declaration, a fixed-address declaration for the IP alias address, and a subnet-mask option declaration. A medium statement should never be included in an alias declaration. .SH OTHER DECLARATIONS \fBreject \fIip-address\fB;\fR .PP 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. .PP \fBinterface "\fIname\fB" { \fIdeclarations ... \fB } .PP 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. .PP \fBpseudo "\fIname\fR" "\fIreal-name\fB" { \fIdeclarations ... \fB } .PP Under some circumstances it can be useful to declare a pseudo-interface and have the DHCP client acquire a configuration for that interface. Each interface that the DHCP client is supporting normally has a DHCP client state machine running on it to acquire and maintain its lease. A pseudo-interface is just another state machine running on the interface named \fIreal-name\fR, with its own lease and its own state. If you use this feature, you must provide a client identifier for both the pseudo-interface and the actual interface, and the two identifiers must be different. You must also provide a separate client script for the pseudo-interface to do what you want with the IP address. For example: .PP .nf interface "ep0" { send dhcp-client-identifier "my-client-ep0"; } pseudo "secondary" "ep0" { send dhcp-client-identifier "my-client-ep0-secondary"; script "/etc/dhclient-secondary"; } .fi .PP The client script for the pseudo-interface should not configure the interface up or down - essentially, all it needs to handle are the states where a lease has been acquired or renewed, and the states where a lease has expired. See \fBdhclient-script(8)\fR for more information. .PP \fBmedia "\fImedia setup\fB"\fI [ \fB, "\fImedia setup\fB", \fI... ]\fB;\fR .PP The .B 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 aren't 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). .PP The media setup is only used for the initial phase of address acquisition (the DHCPDISCOVER and DHCPOFFER packtes). 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. .SH SAMPLE The following configuration file is used on a laptop running NetBSD 1.3. The laptop has an IP alias of 192.5.5.213, and has one interface, ep0 (a 3com 3C589C). Booting intervals have been shortened somewhat from the default, because the client is known to spend most of its time on networks with little DHCP activity. The laptop does roam to multiple networks. .nf timeout 60; retry 60; reboot 10; select-timeout 5; initial-interval 2; reject 192.33.137.209; interface "ep0" { send host-name "andare.fugue.com"; send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; send dhcp-lease-time 3600; supersede domain-name "fugue.com rc.vix.com home.vix.com"; prepend domain-name-servers 127.0.0.1; request subnet-mask, broadcast-address, time-offset, routers, domain-name, domain-name-servers, host-name; require subnet-mask, domain-name-servers; script "/etc/dhclient-script"; media "media 10baseT/UTP", "media 10base2/BNC"; } alias { interface "ep0"; fixed-address 192.5.5.213; option subnet-mask 255.255.255.255; } .fi This is a very complicated dhclient.conf file - in general, yours should be much simpler. In many cases, it's sufficient to just create an empty dhclient.conf file - the defaults are usually fine. .SH SEE ALSO dhcp-options(5), dhclient.leases(5), dhcpd(8), dhcpd.conf(5), RFC2132, RFC2131. .SH AUTHOR .B dhclient(8) was written by Ted Lemon under a contract with Vixie Labs. Funding for this project was provided by the Internet Software Consortium. Information about the Internet Software Consortium can be found at .B http://www.isc.org/isc. @ 1.2.4.1 log @Update dhcp to dhcp-3.0.1rc11 (requested by mellon in ticket #1537) @ text @d3 1 a3 1 .\" Copyright (c) 1996-2002 Internet Software Consortium. a36 3 .\" .\" $Id: dhclient.conf.5,v 1.6 2003/03/31 17:31:19 perry Exp $ .\" d52 1 a52 1 The dhclient.conf file can be used to configure the behavior of the d61 1 a61 1 The timing behavior of the client need not be configured by the user. d63 1 a63 1 reasonable timing behavior will be used by default - one which d67 1 a67 1 The following statements can be used to adjust the timing behavior of d152 1 a152 1 they will not make their requests in lock-step. The a249 16 .PP .I The .B do-forward-updates .I statement .PP \fBdo-forward-updates [ \fIflag\fR ] \fB;\fR .PP If you want to do DNS updates in the DHCP client script (see \fBdhclient-script(8)\fR) rather than having the DHCP client do the update directly (for example, if you want to use SIG(0) authentication, which is not supported directly by the DHCP client, you can instruct the client not to do the update using the \fBdo-forward-updates\fR statement. \fIFlag\fR should be \fBtrue\fR if you want the DHCP client to do the update, and \fBfalse\fR if you don't want the DHCP client to do the update. By default, the DHCP client will do the DNS update. d296 1 a296 1 enforced - if you ignore it, the behavior will be unpredictable. d312 1 a312 1 enforced - if you ignore it, the behavior will be unpredictable. d322 1 a322 1 TIMING\fR) that it is not going to succeed in contacting a d433 1 a433 1 The dhcp client automatically declares this parameter if it uses a d496 1 a496 3 The .B reject statement causes the DHCP client to reject offers from d505 1 a505 1 behavior depending on which interface is being configured. All d557 1 a557 1 acquisition (the DHCPDISCOVER and DHCPOFFER packets). Once an d566 1 a566 1 interface, ep0 (a 3Com 3C589C). Booting intervals have been d589 1 a589 1 script "CLIENTBINDIR/dhclient-script"; d607 1 a607 1 was written by Ted Lemon d611 1 a611 1 .B http://www.isc.org. @ 1.1 log @Initial revision @ text @d523 1 a523 1 identifiers must be different. You must also provide a seperate @ 1.1.1.1 log @import of ISC dhcp-3.0rc10 @ text @@ 1.1.1.2 log @import of ISC dhcp-3.0.1rc9 @ text @a249 16 .PP .I The .B no-client-updates .I statement .PP \fBno-client-updates [ \fIflag\fR ] \fB;\fR .PP If you want to do DNS updates in the DHCP client script (see \fBdhclient-script(8)\fR) rather than having the DHCP client do the update directly (for example, if you want to use SIG(0) authentication, which is not supported directly by the DHCP client, you can instruct the client not to do the update using the \fBno-client-updates\fR statement. \fIFlag\fR should be \fBtrue\fR if you don't want the DHCP client to do the update, and \fBfalse\fR if you want the DHCP client to do the update. By default, the DHCP client will do the DNS update. d322 1 a322 1 TIMING\fR) that it is not going to succeed in contacting a d433 1 a433 1 The dhcp client automatically declares this parameter if it uses a d496 1 a496 3 The .B reject statement causes the DHCP client to reject offers from d523 1 a523 1 identifiers must be different. You must also provide a separate d557 1 a557 1 acquisition (the DHCPDISCOVER and DHCPOFFER packets). Once an d589 1 a589 1 script "CLIENTBINDIR/dhclient-script"; d607 1 a607 1 was written by Ted Lemon d611 1 a611 1 .B http://www.isc.org. @ 1.1.1.3 log @import of ISC dhcp-3.0.1rc11 @ text @d3 1 a3 1 .\" Copyright (c) 1996-2002 Internet Software Consortium. a36 3 .\" .\" $Id: dhclient.conf.5,v 1.12.2.8 2002/11/17 02:25:43 dhankins Exp $ .\" d252 1 a252 1 .B do-forward-updates d255 1 a255 1 \fBdo-forward-updates [ \fIflag\fR ] \fB;\fR d262 3 a264 3 the \fBdo-forward-updates\fR statement. \fIFlag\fR should be \fBtrue\fR if you want the DHCP client to do the update, and \fBfalse\fR if you don't want the DHCP client to do the update. By default, the DHCP @ 1.1.1.4 log @import ISC dhcp-3.0.3 onto the vendor branch @ text @d1 1 a1 1 .\" $Id: dhclient.conf.5,v 1.12.2.12 2005/06/16 19:40:13 dhankins Exp $ d3 4 a6 2 .\" Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") .\" Copyright (c) 1996-2003 by Internet Software Consortium d8 8 a15 3 .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. d17 13 a29 7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. d31 1 a31 7 .\" Internet Systems Consortium, Inc. .\" 950 Charter Street .\" Redwood City, CA 94063 .\" .\" http://www.isc.org/ .\" .\" This software has been written for Internet Software Consortium d33 1 a33 1 .\" To learn more about Internet Software Consortium, see d37 3 d46 1 a46 1 the Internet Systems Consortium DHCP Client. d55 1 a55 1 The dhclient.conf file can be used to configure the behavior of the d64 1 a64 1 The timing behavior of the client need not be configured by the user. d66 1 a66 1 reasonable timing behavior will be used by default - one which d70 1 a70 1 The following statements can be used to adjust the timing behavior of d155 1 a155 1 they will not make their requests in lock-step. The d158 1 a158 2 allowed to back off, the actual value will be evaluated randomly between 1/2 to 1 1/2 times the \fItime\fR specified. It defaults to two minutes. d190 1 a190 1 \fBrequest \fR[ \fIoption\fR ] [\fB,\fI ... \fIoption\fR ]\fB;\fR d211 1 a211 1 \fBrequire \fR[ \fIoption\fR ] [\fB,\fI ... \fIoption ]\fB;\fR d221 1 a221 1 \fBsend { \fR[ \fIoption declaration\fR ] d258 1 a258 1 \fBdo-forward-updates \fR[ \fIflag\fR ] \fB;\fR a268 23 .PP .I The .B omapi port .I statement .PP \fBomapi port \fR[ \fIport\fR ] \fB;\fR .PP The \fBomapi port\fR statement causes the DHCP client to set up an OMAPI listener on the specified port. Only one such port should be specified. The OMAPI listener will be sensitive to connections from any IP address, so it is important to also set up an OMAPI key to protect the client from unauthorized changes. .PP .I The .B omapi key .I statement .PP \fBomapi key \fR[ \fI key-id \fR ] \fB;\fR .PP The \fBomapi key\fR statement causes the DHCP client to check any incoming OMAPI messages to make sure that they are signed by the specified key. If a message is not signed by this key, it is rejected with an "invalid key" error. d281 1 a281 1 \fBdefault \fR[ \fIoption declaration\fR ] \fB;\fR d293 1 a293 1 \fBsupersede \fR[ \fIoption declaration\fR ] \fB;\fR d305 1 a305 1 \fBprepend \fR[ \fIoption declaration\fR ] \fB;\fR d315 1 a315 1 enforced - if you ignore it, the behavior will be unpredictable. d321 1 a321 1 \fBappend \fR[ \fIoption declaration\fR ] \fB;\fR d331 1 a331 1 enforced - if you ignore it, the behavior will be unpredictable. d338 1 a338 1 \fBlease {\fR \fIlease-declaration\fR \fR[ ... \fIlease-declaration ] \fB}\fR d449 1 a449 1 argument is passed on the ifconfig command line when configuring the d498 1 a498 1 permanent IP address even while roaming. The Internet Systems d526 1 a526 1 behavior depending on which interface is being configured. All a533 9 .B Note well: ISC dhclient only maintains one list of interfaces, which is either determined at startup from command line arguments, or otherwise is autodetected. If you supplied the list of interfaces on the command line, this configuration clause will add the named interface to the list in such a way that will cause it to be configured by DHCP. Which may not be the result you had intended. This is an undesirable side effect that will be addressed in a future release. .PP d564 1 a564 1 \fBmedia "\fImedia setup\fB"\fI \fR[ \fB, "\fImedia setup\fB", \fI... ]\fB;\fR d587 1 a587 1 interface, ep0 (a 3Com 3C589C). Booting intervals have been d630 2 a631 2 for this project was provided by Internet Systems Consortium. Information about Internet Systems Consortium can be found at @ 1.1.1.5 log @arrgh - what I've just imported as "ISC_V3-0-3" was already patched. Import the unmodified again for sanity. @ text @d45 1 a45 1 The dhclient.conf file can be used to configure the behaviour of the d54 1 a54 1 The timing behaviour of the client need not be configured by the user. d56 1 a56 1 reasonable timing behaviour will be used by default - one which d60 1 a60 1 The following statements can be used to adjust the timing behaviour of d145 1 a145 1 they will not make their requests in lockstep. The d181 1 a181 1 \fBrequest [ \fIoption\fR ] [\fB,\fI ... \fIoption\fR ]\fB;\fR d202 1 a202 1 \fBrequire [ \fIoption\fR ] [\fB,\fI ... \fIoption ]\fB;\fR d212 1 a212 1 \fBsend { [ \fIoption declaration\fR ] d249 1 a249 1 \fBdo-forward-updates [ \fIflag\fR ] \fB;\fR d260 23 d295 1 a295 1 \fBdefault [ \fIoption declaration\fR ] \fB;\fR d307 1 a307 1 \fBsupersede [ \fIoption declaration\fR ] \fB;\fR d319 1 a319 1 \fBprepend [ \fIoption declaration\fR ] \fB;\fR d329 1 a329 1 enforced - if you ignore it, the behaviour will be unpredictable. d335 1 a335 1 \fBappend [ \fIoption declaration\fR ] \fB;\fR d345 1 a345 1 enforced - if you ignore it, the behaviour will be unpredictable. d352 1 a352 1 \fBlease {\fR \fIlease-declaration\fR [ ... \fIlease-declaration ] \fB}\fR d540 1 a540 1 behaviour depending on which interface is being configured. All d587 1 a587 1 \fBmedia "\fImedia setup\fB"\fI [ \fB, "\fImedia setup\fB", \fI... ]\fB;\fR d610 1 a610 1 interface, ep0 (a 3com 3C589C). Booting intervals have been @