1dhclient.conf(5)              File Formats Manual             dhclient.conf(5)
2
3
4

NAME

6       dhclient.conf - DHCP client configuration file
7

DESCRIPTION

9       The dhclient.conf file contains configuration information for dhclient,
10       the Internet Systems Consortium DHCP Client.
11
12       The dhclient.conf file is a free-form ASCII text file.   It  is  parsed
13       by  the  recursive-descent  parser  built into dhclient.   The file may
14       contain extra tabs and newlines for formatting purposes.   Keywords  in
15       the file are case-insensitive.   Comments may be placed anywhere within
16       the file (except within quotes).   Comments begin with the #  character
17       and end at the end of the line.
18
19       The  dhclient.conf  file  can be used to configure the behaviour of the
20       client  in  a  wide  variety  of  ways:  protocol  timing,  information
21       requested from the server, information required of the server, defaults
22       to use if the server does not provide certain information, values  with
23       which  to  override  information  provided  by the server, or values to
24       prepend or append to information provided by the server.  The  configu‐
25       ration  file  can  also be preinitialized with addresses to use on net‐
26       works that don't have DHCP servers.
27

PROTOCOL TIMING

29       The timing behaviour of the client need not be configured by the  user.
30       If no timing configuration is provided by the user, a fairly reasonable
31       timing behaviour will be used by default - one which results in  fairly
32       timely updates without placing an inordinate load on the server.
33
34       The  following statements can be used to adjust the timing behaviour of
35       the DHCP client if required, however:
36
37       The timeout statement
38
39       timeout time ;
40
41       The timeout statement determines the amount  of  time  that  must  pass
42       between the time that the client begins to try to determine its address
43       and the time that it decides that it's not going to be able to  contact
44       a  server.    By  default,  this  timeout is sixty seconds.   After the
45       timeout has passed, if there are any static leases defined in the  con‐
46       figuration  file,  or  any  leases remaining in the lease database that
47       have not yet  expired,  the  client  will  loop  through  these  leases
48       attempting  to  validate  them,  and if it finds one that appears to be
49       valid, it will use that lease's address.   If there are no valid static
50       leases  or  unexpired  leases  in  the  lease database, the client will
51       restart the protocol after the defined retry interval.
52
53       The retry statement
54
55        retry time;
56
57       The retry statement determines the time that must pass after the client
58       has  determined  that  there  is no DHCP server present before it tries
59       again to contact a DHCP server.   By default, this is five minutes.
60
61       The select-timeout statement
62
63        select-timeout time;
64
65       It is possible (some might say desirable) for there to be more than one
66       DHCP  server  serving any given network.   In this case, it is possible
67       that a client may be sent more than one offer in response to  its  ini‐
68       tial  lease  discovery message.   It may be that one of these offers is
69       preferable to the other (e.g., one  offer  may  have  the  address  the
70       client previously used, and the other may not).
71
72       The  select-timeout  is the time after the client sends its first lease
73       discovery request at which it stops waiting for  offers  from  servers,
74       assuming  that  it has received at least one such offer.   If no offers
75       have been received by the time  the  select-timeout  has  expired,  the
76       client will accept the first offer that arrives.
77
78       By  default,  the  select-timeout is zero seconds - that is, the client
79       will take the first offer it sees.
80
81       The reboot statement
82
83        reboot time;
84
85       When the client is restarted, it first  tries  to  reacquire  the  last
86       address  it  had.    This  is  called the INIT-REBOOT state.   If it is
87       still attached to the same network it was attached to when it last ran,
88       this  is  the  quickest way to get started.   The reboot statement sets
89       the time that must elapse after the client first tries to reacquire its
90       old  address  before  it  gives up and tries to discover a new address.
91       By default, the reboot timeout is ten seconds.
92
93       The backoff-cutoff statement
94
95        backoff-cutoff time;
96
97       The client uses an exponential backoff algorithm with some  randomness,
98       so  that  if many clients try to configure themselves at the same time,
99       they will not make their requests  in  lockstep.    The  backoff-cutoff
100       statement  determines  the  maximum  amount  of time that the client is
101       allowed to back off,  the  actual  value  will  be  evaluated  randomly
102       between  1/2  to  1  1/2 times the time specified.   It defaults to two
103       minutes.
104
105       The initial-interval statement
106
107        initial-interval time;
108
109       The initial-interval statement sets the  amount  of  time  between  the
110       first  attempt  to  reach  a  server  and the second attempt to reach a
111       server.  Each time a message is sent, the interval between messages  is
112       incremented by twice the current interval multiplied by a random number
113       between zero and one.  If it is greater than the backoff-cutoff amount,
114       it is set to that amount.  It defaults to ten seconds.
115

LEASE REQUIREMENTS AND REQUESTS

117       The  DHCP protocol allows the client to request that the server send it
118       specific information, and not send it other information that it is  not
119       prepared  to  accept.    The  protocol also allows the client to reject
120       offers from servers if they don't contain information the client needs,
121       or if the information provided is not satisfactory.
122
123       There  is  a variety of data contained in offers that DHCP servers send
124       to DHCP clients.  The data that can be specifically requested  is  what
125       are called DHCP Options.  DHCP Options are defined in
126        dhcp-options(5).
127
128       The request statement
129
130        request [ option ] [, ... option ];
131
132       The  request  statement  causes  the  client to request that any server
133       responding to the client send the client its values for  the  specified
134       options.    Only  the  option  names should be specified in the request
135       statement - not  option  parameters.    By  default,  the  DHCP  server
136       requests  the  subnet-mask,  broadcast-address,  time-offset,  routers,
137       domain-name, domain-name-servers, host-name,  nis-domain,  nis-servers,
138       and ntp-servers options.
139
140       In some cases, it may be desirable to send no parameter request list at
141       all.   To do this, simply write the request statement  but  specify  no
142       parameters:
143
144            request;
145
146       The require statement
147
148        require [ option ] [, ... option ];
149
150       The  require  statement lists options that must be sent in order for an
151       offer to be accepted.   Offers that  do  not  contain  all  the  listed
152       options will be ignored.
153
154       The send statement
155
156        send { [ option declaration ] [, ... option declaration ]}
157
158       The  send  statement causes the client to send the specified options to
159       the server with the specified values.  These are full  option  declara‐
160       tions as described in dhcp-options(5).  Options that are always sent in
161       the DHCP protocol should not be specified here, except that the  client
162       can  specify  a  requested-lease-time  option  other  than  the default
163       requested lease time, which is two hours.  The other  obvious  use  for
164       this  statement is to send information to the server that will allow it
165       to differentiate between this client and  other  clients  or  kinds  of
166       clients.
167

DYNAMIC DNS

169       The client now has some very limited support for doing DNS updates when
170       a lease is acquired.   This is prototypical, and  probably  doesn't  do
171       what  you want.   It also only works if you happen to have control over
172       your DNS server, which isn't very likely.
173
174       To make it work, you have to declare a key and  zone  as  in  the  DHCP
175       server  (see  dhcpd.conf(5)  for details).   You also need to configure
176       the fqdn option on the client, as follows:
177
178         send fqdn.fqdn "grosse.fugue.com.";
179         send fqdn.encoded on;
180         send fqdn.server-update off;
181
182       The fqdn.fqdn option MUST be a fully-qualified domain name.   You  MUST
183       define  a zone statement for the zone to be updated.   The fqdn.encoded
184       option may need to be set to on or off, depending on  the  DHCP  server
185       you are using.
186
187       The do-forward-updates statement
188
189        do-forward-updates [ flag ] ;
190
191       If  you want to do DNS updates in the DHCP client script (see dhclient-
192       script(8)) rather than having the DHCP client do  the  update  directly
193       (for  example,  if  you want to use SIG(0) authentication, which is not
194       supported directly by the DHCP client, you can instruct the client  not
195       to  do the update using the do-forward-updates statement.   Flag should
196       be true if you want the DHCP client to do the update, and false if  you
197       don't  want  the  DHCP  client to do the update.   By default, the DHCP
198       client will do the DNS update.
199

OPTION MODIFIERS

201       In some cases, a client may receive option data from the  server  which
202       is  not really appropriate for that client, or may not receive informa‐
203       tion that it needs, and for which a useful default value  exists.    It
204       may  also  receive  information  which is useful, but which needs to be
205       supplemented with local information.   To handle these  needs,  several
206       option modifiers are available.
207
208       The default statement
209
210        default [ option declaration ] ;
211
212       If  for  some  option  the  client should use the value supplied by the
213       server, but needs to use some default value if no value was supplied by
214       the server, these values can be defined in the default statement.
215
216       The supersede statement
217
218        supersede [ option declaration ] ;
219
220       If  for  some  option the client should always use a locally-configured
221       value or values rather than whatever is supplied by the  server,  these
222       values can be defined in the supersede statement.
223
224       The prepend statement
225
226        prepend [ option declaration ] ;
227
228       If  for  some  set of options the client should use a value you supply,
229       and then use the values supplied by the server, if  any,  these  values
230       can  be  defined  in the prepend statement.   The prepend statement can
231       only be used for options which allow more than one value to  be  given.
232       This restriction is not enforced - if you ignore it, the behaviour will
233       be unpredictable.
234
235       The append statement
236
237        append [ option declaration ] ;
238
239       If for some set of options the client should first use the values  sup‐
240       plied by the server, if any, and then use values you supply, these val‐
241       ues can be defined in the append statement.   The append statement  can
242       only  be  used for options which allow more than one value to be given.
243       This restriction is not enforced - if you ignore it, the behaviour will
244       be unpredictable.
245

LEASE DECLARATIONS

247       The lease declaration
248
249        lease { lease-declaration [ ... lease-declaration ] }
250
251       The DHCP client may decide after some period of time (see PROTOCOL TIM‐
252       ING) that it is not going to succeed in contacting a server.   At  that
253       time,  it  consults  its  own database of old leases and tests each one
254       that has not yet timed out by pinging the listed router for that  lease
255       to see if that lease could work.   It is possible to define one or more
256       fixed leases in the client configuration file for networks where  there
257       is no DHCP or BOOTP service, so that the client can still automatically
258       configure its address.   This is done with the lease statement.
259
260       NOTE: the lease statement is also used in the dhclient.leases  file  in
261       order to record leases that have been received from DHCP servers.  Some
262       of the syntax for leases as described  below  is  only  needed  in  the
263       dhclient.leases  file.    Such  syntax is documented here for complete‐
264       ness.
265
266       A lease statement consists of the lease keyword,  followed  by  a  left
267       curly brace, followed by one or more lease declaration statements, fol‐
268       lowed by a right curly brace.   The following  lease  declarations  are
269       possible:
270
271        bootp;
272
273       The  bootp  statement  is  used to indicate that the lease was acquired
274       using the BOOTP protocol rather than the DHCP protocol.   It  is  never
275       necessary  to  specify  this  in  the  client configuration file.   The
276       client uses this syntax in its lease database file.
277
278        interface "string";
279
280       The interface lease statement is used  to  indicate  the  interface  on
281       which  the lease is valid.   If set, this lease will only be tried on a
282       particular interface.   When the client receives a lease from a server,
283       it always records the interface number on which it received that lease.
284       If predefined leases are  specified  in  the  dhclient.conf  file,  the
285       interface should also be specified, although this is not required.
286
287        fixed-address ip-address;
288
289       The fixed-address statement is used to set the ip address of a particu‐
290       lar lease.   This is  required  for  all  lease  statements.    The  IP
291       address must be specified as a dotted quad (e.g., 12.34.56.78).
292
293        filename "string";
294
295       The  filename statement specifies the name of the boot filename to use.
296       This is not used by the standard client configuration  script,  but  is
297       included for completeness.
298
299        server-name "string";
300
301       The server-name statement specifies the name of the boot server name to
302       use.   This is also not  used  by  the  standard  client  configuration
303       script.
304
305        option option-declaration;
306
307       The option statement is used to specify the value of an option supplied
308       by the server, or,  in  the  case  of  predefined  leases  declared  in
309       dhclient.conf,  the value that the user wishes the client configuration
310       script to use if the predefined lease is used.
311
312        script "script-name";
313
314       The script statement is used to specify the pathname of the dhcp client
315       configuration  script.   This  script is used by the dhcp client to set
316       each interface's initial configuration prior to requesting an  address,
317       to  test  the  address  once it has been offered, and to set the inter‐
318       face's final configuration once a lease  has  been  acquired.    If  no
319       lease  is  acquired,  the  script is used to test predefined leases, if
320       any, and also called once if no valid lease can  be  identified.    For
321       more information, see dhclient-script(8).
322
323        vendor option space "name";
324
325       The vendor option space statement is used to specify which option space
326       should be used for decoding the  vendor-encapsulate-options  option  if
327       one  is  received.  The dhcp-vendor-identifier can be used to request a
328       specific class of vendor options from the server.   See dhcp-options(5)
329       for details.
330
331        medium "media setup";
332
333       The  medium  statement  can be used on systems where network interfaces
334       cannot automatically determine the type of network to  which  they  are
335       connected.   The  media  setup  string  is a system-dependent parameter
336       which is passed to the dhcp client configuration script when initializ‐
337       ing  the  interface.   On  Unix  and Unix-like systems, the argument is
338       passed on the ifconfig command line when configuring the interface.
339
340       The dhcp client automatically declares this  parameter  if  it  uses  a
341       media  type (see the media statement) when configuring the interface in
342       order to obtain a lease.  This statement should be used  in  predefined
343       leases only if the network interface requires media type configuration.
344
345        renew date;
346
347        rebind date;
348
349        expire date;
350
351       The  renew  statement  defines the time at which the dhcp client should
352       begin trying to contact its server to renew a lease that it  is  using.
353       The  rebind  statement defines the time at which the dhcp client should
354       begin to try to contact any dhcp server in order to  renew  its  lease.
355       The  expire  statement  defines  the time at which the dhcp client must
356       stop using a lease if it has not been able to contact a server in order
357       to renew it.
358
359       These declarations are automatically set in leases acquired by the DHCP
360       client, but must also be configured in predefined leases - a predefined
361       lease whose expiry time has passed will not be used by the DHCP client.
362
363       Dates are specified as follows:
364
365        <weekday> <year>/<month>/<day> <hour>:<minute>:<second>
366
367       The weekday is present to make it easy for a human to tell when a lease
368       expires - it's specified as a number from zero to six, with zero  being
369       Sunday.   When declaring a predefined lease, it can always be specified
370       as zero.  The year is specified with the century, so it  should  gener‐
371       ally be four digits except for really long leases.  The month is speci‐
372       fied as a number starting with 1 for January.  The day of the month  is
373       likewise specified starting with 1.  The hour is a number between 0 and
374       23, the minute a number between 0 and 59, and the second also a  number
375       between 0 and 59.
376

ALIAS DECLARATIONS

378        alias {  declarations ... }
379
380       Some  DHCP clients running TCP/IP roaming protocols may require that in
381       addition to the lease they may acquire via DHCP, their  interface  also
382       be configured with a predefined IP alias so that they can have a perma‐
383       nent IP address even while roaming.   The Internet  Systems  Consortium
384       DHCP  client doesn't support roaming with fixed addresses directly, but
385       in order to facilitate such experimentation, the dhcp client can be set
386       up to configure an IP alias using the alias declaration.
387
388       The  alias  declaration  resembles  a  lease  declaration,  except that
389       options other than the subnet-mask option are ignored by  the  standard
390       client  configuration  script, and expiry times are ignored.  A typical
391       alias declaration includes an interface  declaration,  a  fixed-address
392       declaration for the IP alias address, and a subnet-mask option declara‐
393       tion.   A medium statement should never be included in an alias  decla‐
394       ration.
395

OTHER DECLARATIONS

397        reject ip-address;
398
399       The  reject  statement  causes  the  DHCP  client to reject offers from
400       servers who use the specified address as a  server  identifier.    This
401       can  be  used  to avoid being configured by rogue or misconfigured dhcp
402       servers, although it should be a last resort - better to track down the
403       bad DHCP server and fix it.
404
405        interface "name" { declarations ...  }
406
407       A client with more than one network interface may require different be‐
408       haviour depending on which interface is being configured.   All  timing
409       parameters and declarations other than lease and alias declarations can
410       be enclosed in an interface declaration, and those parameters will then
411       be  used  only  for  the  interface  that  matches  the specified name.
412       Interfaces for which there is no interface  declaration  will  use  the
413       parameters  declared  outside  of  any  interface  declaration,  or the
414       default settings.
415
416       Note well: ISC dhclient only maintains one list of interfaces, which is
417       either  determined at startup from command line arguments, or otherwise
418       is autodetected.  If you supplied the list of interfaces on the command
419       line,  this  configuration  clause  will add the named interface to the
420       list in such a way that will cause it to be configured by DHCP.   Which
421       may  not  be  the result you had intended.  This is an undesirable side
422       effect that will be addressed in a future release.
423
424        pseudo "name" "real-name" { declarations ...  }
425
426       Under some circumstances it can be useful to declare a pseudo-interface
427       and  have  the  DHCP client acquire a configuration for that interface.
428       Each interface that the DHCP client is supporting normally has  a  DHCP
429       client  state  machine running on it to acquire and maintain its lease.
430       A pseudo-interface is just another state machine running on the  inter‐
431       face  named  real-name,  with its own lease and its own state.   If you
432       use this feature, you must provide a client  identifier  for  both  the
433       pseudo-interface and the actual interface, and the two identifiers must
434       be different.   You must also provide a separate client script for  the
435       pseudo-interface  to  do what you want with the IP address.   For exam‐
436       ple:
437
438            interface "ep0" {
439                 send dhcp-client-identifier "my-client-ep0";
440            }
441            pseudo "secondary" "ep0" {
442                 send dhcp-client-identifier "my-client-ep0-secondary";
443                 script "/etc/dhclient-secondary";
444            }
445
446       The client script for the pseudo-interface  should  not  configure  the
447       interface  up  or  down  -  essentially, all it needs to handle are the
448       states where a lease has been acquired or renewed, and the states where
449       a lease has expired.   See dhclient-script(8) for more information.
450
451        media "media setup" [ , "media setup", ... ];
452
453       The  media statement defines one or more media configuration parameters
454       which may be tried while attempting to acquire  an  IP  address.    The
455       dhcp  client  will  cycle  through each media setup string on the list,
456       configuring the interface using that setup and attempting to boot,  and
457       then  trying  the  next  one.   This can be used for network interfaces
458       which aren't capable of sensing the  media  type  unaided  -  whichever
459       media  type succeeds in getting a request to the server and hearing the
460       reply is probably right (no guarantees).
461
462       The media setup is only used for the initial phase of address  acquisi‐
463       tion  (the  DHCPDISCOVER  and DHCPOFFER packets).   Once an address has
464       been acquired, the dhcp client will record it in its lease database and
465       will  record  the media type used to acquire the address.  Whenever the
466       client tries to renew the lease, it will  use  that  same  media  type.
467       The lease must expire before the client will go back to cycling through
468       media types.
469
470        bootp-broadcast-always;
471
472       The bootp-broadcast-always statement instructs dhclient to  always  set
473       the  bootp  broadcast  flag  in  request  packets, so that servers will
474       always broadcast replies.  This is equivalent to supplying the dhclient
475       -B  argument,  and has the same effect as specifying 'always-broadcast'
476       in the server's dhcpd.conf.  This option  is  provided  as  a  Red  Hat
477       extension to enable dhclient to work on IBM zSeries z/OS Linux guests .
478

SAMPLE

480       The  following  configuration  file  is used on a laptop running NetBSD
481       1.3.   The laptop has an IP alias of 192.5.5.213, and  has  one  inter‐
482       face,  ep0  (a  3com  3C589C).    Booting intervals have been shortened
483       somewhat from the default, because the client is known to spend most of
484       its  time on networks with little DHCP activity.   The laptop does roam
485       to multiple networks.
486
487
488       timeout 60;
489       retry 60;
490       reboot 10;
491       select-timeout 5;
492       initial-interval 2;
493       reject 192.33.137.209;
494
495       interface "ep0" {
496           send host-name "andare.fugue.com";
497           send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
498           send dhcp-lease-time 3600;
499           supersede domain-name "fugue.com rc.vix.com home.vix.com";
500           prepend domain-name-servers 127.0.0.1;
501           request subnet-mask, broadcast-address, time-offset, routers,
502                domain-name, domain-name-servers, host-name;
503           require subnet-mask, domain-name-servers;
504           script "/sbin/dhclient-script";
505           media "media 10baseT/UTP", "media 10base2/BNC";
506       }
507
508       alias {
509         interface "ep0";
510         fixed-address 192.5.5.213;
511         option subnet-mask 255.255.255.255;
512       }
513       This is a very complicated  dhclient.conf  file  -  in  general,  yours
514       should be much simpler.   In many cases, it's sufficient to just create
515       an empty dhclient.conf file - the defaults are usually fine.
516

SEE ALSO

518       dhcp-options(5), dhclient.leases(5), dhcpd(8), dhcpd.conf(5),  RFC2132,
519       RFC2131.
520

AUTHOR

522       dhclient(8)  was written by Ted Lemon under a contract with Vixie Labs.
523       Funding for this project was provided by Internet  Systems  Consortium.
524       Information   about   Internet  Systems  Consortium  can  be  found  at
525       http://www.isc.org.
526
527
528
529                                                              dhclient.conf(5)
Impressum