]>
Commit | Line | Data |
---|---|---|
4a5bfeac | 1 | .\" $Id: dhclient.8,v 1.36 2011/04/15 21:58:12 sar Exp $ |
0e7affc7 | 2 | .\" |
a804fcc0 | 3 | .\" Copyright (c) 2004-2018 by Internet Systems Consortium, Inc. ("ISC") |
98311e4b | 4 | .\" Copyright (c) 1996-2003 by Internet Software Consortium |
0e7affc7 | 5 | .\" |
7512d88b TM |
6 | .\" This Source Code Form is subject to the terms of the Mozilla Public |
7 | .\" License, v. 2.0. If a copy of the MPL was not distributed with this | |
8 | .\" file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
0e7affc7 | 9 | .\" |
98311e4b DH |
10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES |
11 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
12 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR | |
13 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
14 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
15 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT | |
16 | .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
17 | .\" | |
18 | .\" Internet Systems Consortium, Inc. | |
19 | .\" 950 Charter Street | |
20 | .\" Redwood City, CA 94063 | |
21 | .\" <info@isc.org> | |
2c85ac9b | 22 | .\" https://www.isc.org/ |
0e7affc7 | 23 | .\" |
f39b6e00 | 24 | .\" Support and other services are available for ISC products - see |
5a38e43f | 25 | .\" https://www.isc.org for more information or to learn more about ISC. |
51aca666 | 26 | .\" |
0e7affc7 TL |
27 | .TH dhclient 8 |
28 | .SH NAME | |
d73361d0 | 29 | dhclient - Dynamic Host Configuration Protocol Client |
0e7affc7 TL |
30 | .SH SYNOPSIS |
31 | .B dhclient | |
32 | [ | |
98bd7ca0 DH |
33 | .B -4 |
34 | | | |
35 | .B -6 | |
36 | ] | |
37 | [ | |
420d8b3f FD |
38 | .B -S |
39 | ] | |
40 | [ | |
41 | .B -N | |
42 | [ | |
43 | .B -N... | |
44 | ] | |
45 | ] | |
46 | [ | |
47 | .B -T | |
48 | [ | |
49 | .B -T... | |
50 | ] | |
51 | ] | |
52 | [ | |
53 | .B -P | |
54 | [ | |
55 | .B -P... | |
56 | ] | |
57 | ] | |
c88dfebd SR |
58 | .B -R |
59 | ] | |
420d8b3f | 60 | [ |
d7d9c0c7 SR |
61 | .B -i |
62 | ] | |
63 | [ | |
64 | .B -I | |
65 | ] | |
66 | [ | |
785c1a51 FD |
67 | .B -4o6 |
68 | .I port | |
69 | ] | |
70 | [ | |
a41d7a25 PS |
71 | .B -D |
72 | .I LL|LLT | |
73 | ] | |
74 | [ | |
0e7affc7 | 75 | .B -p |
24777ef4 | 76 | .I port-number |
0e7affc7 TL |
77 | ] |
78 | [ | |
79 | .B -d | |
80 | ] | |
81 | [ | |
79818c93 SR |
82 | .B -df |
83 | .I duid-lease-file | |
84 | ] | |
85 | [ | |
88cd8aca DH |
86 | .B -e |
87 | .I VAR=value | |
88 | ] | |
89 | [ | |
93cd3170 TL |
90 | .B -q |
91 | ] | |
92 | [ | |
4ca9936c | 93 | .B -1 |
93cd3170 | 94 | ] |
4ca9936c | 95 | [ |
e493934d | 96 | .B -r |
420d8b3f | 97 | | |
af5fa176 EH |
98 | .B -x |
99 | ] | |
100 | [ | |
93cd3170 TL |
101 | .B -lf |
102 | .I lease-file | |
103 | ] | |
104 | [ | |
105 | .B -pf | |
106 | .I pid-file | |
107 | ] | |
108 | [ | |
4a5bfeac SR |
109 | .B --no-pid |
110 | ] | |
111 | [ | |
93cd3170 TL |
112 | .B -cf |
113 | .I config-file | |
114 | ] | |
115 | [ | |
4ca9936c TL |
116 | .B -sf |
117 | .I script-file | |
118 | ] | |
119 | [ | |
93cd3170 | 120 | .B -s |
4a5bfeac | 121 | .I server-addr |
93cd3170 TL |
122 | ] |
123 | [ | |
4cefd70b | 124 | .B -g |
d6645f56 | 125 | .I relay |
4cefd70b TL |
126 | ] |
127 | [ | |
128 | .B -n | |
129 | ] | |
130 | [ | |
78b044fa TL |
131 | .B -nw |
132 | ] | |
133 | [ | |
36cbbce6 TL |
134 | .B -w |
135 | ] | |
136 | [ | |
a68ec967 MS |
137 | .B --dad-wait-time |
138 | .I seconds | |
139 | ] | |
140 | [ | |
c0e9661e TM |
141 | .B --prefix-len-hint |
142 | .I length | |
143 | ] | |
144 | [ | |
3e88222f TM |
145 | .B --decline-wait-time |
146 | .I seconds | |
147 | ] | |
148 | [ | |
8ea19a71 DH |
149 | .B -v |
150 | ] | |
151 | [ | |
152 | .B --version | |
153 | ] | |
154 | [ | |
0e7affc7 TL |
155 | .I if0 |
156 | [ | |
157 | .I ...ifN | |
158 | ] | |
159 | ] | |
160 | .SH DESCRIPTION | |
d6645f56 | 161 | The Internet Systems Consortium DHCP Client, \fBdhclient\fR, provides a |
0e7affc7 TL |
162 | means for configuring one or more network interfaces using the Dynamic |
163 | Host Configuration Protocol, BOOTP protocol, or if these protocols | |
164 | fail, by statically assigning an address. | |
165 | .SH OPERATION | |
166 | .PP | |
167 | The DHCP protocol allows a host to contact a central server which | |
168 | maintains a list of IP addresses which may be assigned on one or more | |
a0497ac5 SR |
169 | subnets. A DHCP client may request an address from this pool, and |
170 | then use it on a temporary basis for communication on network. The | |
0e7affc7 TL |
171 | DHCP protocol also provides a mechanism whereby a client can learn |
172 | important details about the network to which it is attached, such as | |
173 | the location of a default router, the location of a name server, and | |
174 | so on. | |
175 | .PP | |
d6645f56 SR |
176 | There are two versions of the DHCP protocol DHCPv4 and DHCPv6. At |
177 | startup the client may be started for one or the other via the | |
a41d7a25 | 178 | .B -4 |
c0e9661e | 179 | or |
a41d7a25 | 180 | .B -6 |
d6645f56 | 181 | options. |
420d8b3f | 182 | .PP |
d6645f56 | 183 | On startup, \fBdhclient\fR reads the dhclient.conf |
a0497ac5 SR |
184 | for configuration instructions. It then gets a list of all the |
185 | network interfaces that are configured in the current system. For | |
0e7affc7 TL |
186 | each interface, it attempts to configure the interface using the DHCP |
187 | protocol. | |
188 | .PP | |
189 | In order to keep track of leases across system reboots and server | |
d6645f56 | 190 | restarts, \fBdhclient\fR keeps a list of leases it has been assigned in the |
a0497ac5 | 191 | dhclient.leases file. On startup, after reading the dhclient.conf |
d6645f56 | 192 | file, \fBdhclient\fR reads the dhclient.leases file to refresh its memory |
0e7affc7 TL |
193 | about what leases it has been assigned. |
194 | .PP | |
195 | When a new lease is acquired, it is appended to the end of the | |
a0497ac5 | 196 | dhclient.leases file. In order to prevent the file from becoming |
d6645f56 | 197 | arbitrarily large, from time to time \fBdhclient\fR creates a new |
0e7affc7 TL |
198 | dhclient.leases file from its in-core lease database. The old version |
199 | of the dhclient.leases file is retained under the name | |
4bd8800e | 200 | .IR dhclient.leases~ |
d6645f56 | 201 | until the next time \fBdhclient\fR rewrites the database. |
0e7affc7 TL |
202 | .PP |
203 | Old leases are kept around in case the DHCP server is unavailable when | |
d6645f56 | 204 | \fBdhclient\fR is first invoked (generally during the initial system boot |
a0497ac5 | 205 | process). In that event, old leases from the dhclient.leases file |
0e7affc7 TL |
206 | which have not yet expired are tested, and if they are determined to |
207 | be valid, they are used until either they expire or the DHCP server | |
208 | becomes available. | |
209 | .PP | |
210 | A mobile host which may sometimes need to access a network on which no | |
211 | DHCP server exists may be preloaded with a lease for a fixed | |
a0497ac5 | 212 | address on that network. When all attempts to contact a DHCP server |
d6645f56 | 213 | have failed, \fBdhclient\fR will try to validate the static lease, and if it |
0e7affc7 TL |
214 | succeeds, will use that lease until it is restarted. |
215 | .PP | |
216 | A mobile host may also travel to some networks on which DHCP is not | |
a0497ac5 | 217 | available but BOOTP is. In that case, it may be advantageous to |
0e7affc7 TL |
218 | arrange with the network administrator for an entry on the BOOTP |
219 | database, so that the host can boot quickly on that network rather | |
220 | than cycling through the list of old leases. | |
221 | .SH COMMAND LINE | |
222 | .PP | |
d6645f56 | 223 | The names of the network interfaces that \fBdhclient\fR should attempt to |
0e7affc7 | 224 | configure may be specified on the command line. If no interface names |
d6645f56 | 225 | are specified on the command line \fBdhclient\fR will normally identify all |
15766849 | 226 | network interfaces, eliminating non-broadcast interfaces if |
93cd3170 | 227 | possible, and attempt to configure each interface. |
0e7affc7 | 228 | .PP |
d6645f56 | 229 | It is also possible to specify interfaces by name in the dhclient.conf |
a0497ac5 | 230 | file. If interfaces are specified in this way, then the client will |
93cd3170 TL |
231 | only configure interfaces that are either specified in the |
232 | configuration file or on the command line, and will ignore all other | |
233 | interfaces. | |
234 | .PP | |
8ea19a71 DH |
235 | The client normally prints no output during its startup sequence. It |
236 | can be made to emit verbose messages displaying the startup sequence events | |
237 | until it has acquired an address by supplying the | |
238 | .B -v | |
239 | command line argument. In either case, the client logs messages using | |
240 | the | |
d6645f56 SR |
241 | .B syslog(3) |
242 | facility. | |
243 | .SH OPTIONS | |
244 | .TP | |
245 | .BI \-4 | |
246 | Use the DHCPv4 protocol to obtain an IPv4 address and configuration | |
247 | parameters. This is the default and cannot be combined with | |
248 | \fB\-6\fR. | |
249 | .TP | |
250 | .BI \-6 | |
251 | Use the DHCPv6 protocol to obtain whatever IPv6 addresses are available | |
252 | along with configuration parameters. It cannot be combined with | |
253 | \fB\-4\fR. The \fB\-S -T -P -N\fR and | |
254 | \fB\-D\fR arguments provide more control over aspects of the DHCPv6 | |
255 | processing. Note: it is not recommended to mix queries of different | |
256 | types together or even to share the lease file between them. | |
257 | .TP | |
785c1a51 FD |
258 | .BI \-4o6 \ port |
259 | Participate in the DHCPv4 over DHCPv6 protocol specified by RFC 7341. | |
260 | This associates a DHCPv4 and a DHCPv6 client to allow the v4 client to | |
4dd0eb18 | 261 | send v4 requests encapsulated in a v6 packet. Communication |
785c1a51 FD |
262 | between the two clients is done on a pair of UDP sockets bound |
263 | to ::1 \fIport\fR and \fIport + 1\fR. Both clients must | |
264 | be launched using the same \fIport\fR argument. | |
265 | .TP | |
d6645f56 SR |
266 | .BI \-1 |
267 | Try to get a lease once. On failure exit with code 2. In DHCPv6 this | |
268 | sets the maximum duration of the initial exchange to | |
ffbaa880 | 269 | .I timeout |
24777ef4 | 270 | (from dhclient.conf with a default of sixty seconds). |
d6645f56 SR |
271 | .TP |
272 | .BI \-d | |
273 | .\" This is not intuitive. | |
274 | Force | |
275 | .B dhclient | |
276 | to run as a foreground process. Normally the DHCP client will run | |
277 | in the foreground until is has configured an interface at which time | |
278 | it will revert to running in the background. This option is useful | |
279 | when running the client under a debugger, or when running it out of | |
280 | inittab on System V systems. This implies \fB-v\fR. | |
281 | .TP | |
282 | .BI \-nw | |
283 | Become a daemon immediately (nowait) rather than waiting until an | |
8e112e2b | 284 | IP address has been acquired. |
d6645f56 SR |
285 | .TP |
286 | .BI \-q | |
287 | Be quiet at startup, this is the default. | |
288 | .TP | |
289 | .BI \-v | |
290 | Enable verbose log messages. | |
291 | .\" This prints the version, copyright and URL. | |
292 | .TP | |
293 | .BI \-w | |
294 | Continue running even if no broadcast interfaces were found. Normally | |
295 | DHCP client will exit if it isn't able to identify any network interfaces | |
296 | to configure. On laptop computers and other computers with | |
297 | hot-swappable I/O buses, it is possible that a broadcast interface may | |
298 | be added after system startup. This flag can be used to cause the client | |
a0497ac5 | 299 | not to exit when it doesn't find any such interfaces. The |
d6645f56 | 300 | .B omshell(1) |
36cbbce6 | 301 | program can then be used to notify the client when a network interface |
4cefd70b | 302 | has been added or removed, so that the client can attempt to configure an IP |
36cbbce6 | 303 | address on that interface. |
d6645f56 SR |
304 | .TP |
305 | .BI \-n | |
306 | Do not configure any interfaces. This is most likely to be useful in | |
307 | combination with the | |
4cefd70b TL |
308 | .B -w |
309 | flag. | |
d6645f56 | 310 | .TP |
24777ef4 | 311 | .BI \-e \ VAR=value |
c0e9661e | 312 | Define additional environment variables for the environment where |
24777ef4 | 313 | .B dhclient-script |
c0e9661e | 314 | executes. You may specify multiple |
d6645f56 SR |
315 | .B \-e |
316 | options on the command line. | |
317 | .TP | |
318 | .BI \-r | |
319 | Release the current lease and stop the running DHCP client as previously | |
c0e9661e | 320 | recorded in the PID file. When shutdown via this method |
24777ef4 | 321 | .B dhclient-script |
d6645f56 SR |
322 | will be executed with the specific reason for calling the script set. |
323 | The client normally doesn't release the current lease as this is not | |
324 | required by the DHCP protocol but some cable ISPs require their clients | |
325 | to notify the server if they wish to release an assigned IP address. | |
326 | .\" TODO what dhclient-script argument? | |
327 | .\" When released, | |
328 | .TP | |
329 | .BI \-x | |
330 | Stop the running DHCP client without releasing the current lease. | |
331 | Kills existing \fBdhclient\fR process as previously recorded in the | |
c0e9661e | 332 | PID file. When shutdown via this method |
24777ef4 | 333 | .B dhclient-script |
d6645f56 SR |
334 | will be executed with the specific reason for calling the script set. |
335 | .TP | |
24777ef4 | 336 | .BI \-p \ port-number |
d6645f56 SR |
337 | The UDP port number on which the DHCP client should listen and transmit. |
338 | If unspecified, | |
339 | .B dhclient | |
340 | uses the default port of 68. This is mostly useful for debugging purposes. | |
341 | If a different port is specified on which the client should listen and | |
342 | transmit, the client will also use a different destination port - | |
343 | one less than the specified port. | |
344 | .TP | |
4a5bfeac | 345 | .BI \-s \ server-addr |
d6645f56 | 346 | Specify the server IP address or fully qualified domain name to use as |
c0e9661e | 347 | a destination for DHCP protocol messages before |
d6645f56 SR |
348 | .B dhclient |
349 | has acquired an IP address. Normally, | |
350 | .B dhclient | |
351 | transmits these messages to 255.255.255.255 (the IP limited broadcast | |
352 | address). Overriding this is mostly useful for debugging purposes. This | |
353 | feature is not supported in DHCPv6 (\fB-6\fR) mode. | |
354 | .TP | |
355 | .BI \-g \ relay | |
356 | .\" mockup relay | |
357 | Set the giaddr field of all packets to the \fIrelay\fR IP address | |
4eed07b3 | 358 | simulating a relay agent. This is for testing purposes only and |
d6645f56 SR |
359 | should not be expected to work in any consistent or useful way. |
360 | .TP | |
d7d9c0c7 SR |
361 | .BI \-i |
362 | Use a DUID with DHCPv4 clients. If no DUID is available in the | |
363 | lease file one will be constructed and saved. The DUID will be | |
4eed07b3 | 364 | used to construct a RFC4361 style client id that will be included |
d7d9c0c7 | 365 | in the client's messages. This client id can be overridden by |
a804fcc0 | 366 | setting a client id in the configuration file. Overriding the |
d7d9c0c7 SR |
367 | client id in this fashion is discouraged. |
368 | .TP | |
369 | .BI \-I | |
c0e9661e | 370 | Use the standard DDNS scheme from RFCs 4701 & 4702. |
d7d9c0c7 | 371 | .TP |
3e88222f TM |
372 | .TP |
373 | .BI \--decline-wait-time \ seconds | |
374 | Specify the time (in seconds) that an IPv4 client should wait after | |
375 | declining an address before issuing a discover. The default is | |
376 | 10 seconds as recommended by RFC 2131, Section 3.1.5. A value of | |
377 | zero equates to no wait at all. | |
378 | .PP | |
d6645f56 SR |
379 | .BI \--version |
380 | Print version number and exit. | |
381 | .PP | |
382 | .I Options available for DHCPv6 mode: | |
383 | .TP | |
384 | .BI \-S | |
385 | .\" TODO: mention DUID? | |
386 | Use Information-request to get only stateless configuration parameters | |
387 | (i.e., without address). This implies \fB\-6\fR. It also doesn't | |
388 | rewrite the lease database. | |
389 | .\" TODO: May not be used with -N -P or -T. ?? | |
390 | .TP | |
391 | .BI \-T | |
392 | .\" TODO wanted_ia_ta++ | |
393 | Ask for IPv6 temporary addresses, one set per \fB\-T\fR flag. This | |
394 | implies \fB\-6\fR and also disables the normal address query. | |
395 | See \fB\-N\fR to restore it. | |
396 | .TP | |
397 | .BI \-P | |
398 | Enable IPv6 prefix delegation. This implies \fB\-6\fR and also | |
399 | disables the normal address query. See \fB\-N\fR to restore it. | |
c88dfebd | 400 | Multiple prefixes can be requested with multiple \fB\-P\fR flags. |
d6645f56 SR |
401 | Note only one requested interface is allowed. |
402 | .TP | |
c88dfebd SR |
403 | .BI \-R |
404 | Require that responses include all of the items requested by any | |
405 | \fB\-N\fR, \fB\-T\fR, or \fB\-P\fR options. Normally even if | |
406 | the command line includes a number of these the client will be willing | |
407 | to accept the best lease it can even if the lease doesn't include all | |
408 | of the requested items. This option causes the client to only | |
409 | accept leases that include all of the requested items. | |
410 | ||
411 | Note well: enabling this may prevent the client from using any | |
412 | leases it receives if the servers aren't configured to supply | |
413 | all of the items. | |
414 | .TP | |
d6645f56 SR |
415 | .BI \-D \ LL\ or\ LLT |
416 | Override the default when selecting the type of DUID to use. By default, | |
417 | DHCPv6 \fBdhclient\fR creates an identifier based on the link-layer address | |
418 | (DUID-LL) if it is running in stateless mode (with \fB\-S\fR, not | |
419 | requesting an address), or it creates an identifier based on the | |
420 | link-layer address plus a timestamp (DUID-LLT) if it is running in | |
d7d9c0c7 | 421 | stateful mode (without \fB\-S\fR, requesting an address). When DHCPv4 |
4eed07b3 | 422 | is configured to use a DUID using \fB\-i\fR option the default is to use |
d7d9c0c7 SR |
423 | a DUID-LLT. \fB\-D\fR |
424 | overrides these default, with a value of either \fILL\fR or \fILLT\fR. | |
d6645f56 SR |
425 | .TP |
426 | .BI \-N | |
427 | .\" TODO: is this for telling an already running dhclient? | |
428 | Restore normal address query for IPv6. This implies \fB-6\fR. | |
429 | It is used to restore normal operation after using \fB-T\fR or \fB-P\fR. | |
c88dfebd | 430 | Multiple addresses can be requested with multiple \fB\-N\fR flags. |
a68ec967 | 431 | .TP |
a804fcc0 TM |
432 | .BI \--address-prefix-len \ length |
433 | Specify the length of the prefix for IPv6 addresses. This value is passed by | |
434 | dhclient into the client script via the environment variable, ip6_prefixlen, | |
435 | when binding IPv6 addresses. The default value is 128. Alternatively you may | |
436 | change the default at compile time by setting DHCLIENT_DEFAULT_PREFIX_LEN in | |
437 | includes/site.h. | |
438 | .PP | |
439 | .TP | |
a68ec967 MS |
440 | .BI \--dad-wait-time \ seconds |
441 | Specify maximum time (in seconds) that the client should wait for the | |
442 | duplicate address detection (DAD) to complete on an interface. This | |
443 | value is propagated to the dhclient script in a dad_wait_time environment | |
444 | variable. If any of the IPv6 addresses on the interface are tentative | |
445 | (DAD is in progress), the script will wait for the specified number of | |
446 | seconds for DAD to complete. If the script ignores this variable the | |
447 | parameter has no effect. | |
d6645f56 | 448 | .PP |
c0e9661e TM |
449 | .TP |
450 | .BI \--prefix-len-hint \ length | |
451 | When used in conjunction with -P, it directs the client to use the given | |
452 | length to use a prefix hint of, "::/length", when requesting new prefixes. | |
453 | .PP | |
d6645f56 SR |
454 | .I Modifying default file locations: |
455 | The following options can be used to modify the locations a client uses | |
8e112e2b | 456 | for its files. They can be particularly useful if, for example, |
d6645f56 SR |
457 | .B DBDIR |
458 | or | |
459 | .B RUNDIR | |
460 | have not been mounted when the DHCP client is started. | |
461 | .TP | |
462 | .BI \-cf \ config-file | |
463 | Path to the client configuration file. If unspecified, the default | |
464 | .B ETCDIR/dhclient.conf | |
465 | is used. See \fBdhclient.conf(5)\fR for a description of this file. | |
466 | .TP | |
79818c93 SR |
467 | .BI \-df \ duid-lease-file |
468 | Path to a secondary lease file. If the primary lease file doesn't contain | |
469 | a DUID this file will be searched. The DUID read from the secondary will | |
470 | be written to the primary. This option can be used to allow an IPv4 instance | |
471 | of the client to share a DUID with an IPv6 instance. After starting one of | |
472 | the instances the second can be started with this option pointing to the | |
473 | lease file of the first instance. There is no default. If no file is | |
474 | specified no search is made for a DUID should one not be found in the main | |
475 | lease file. | |
476 | .TP | |
d6645f56 SR |
477 | .BI \-lf \ lease-file |
478 | Path to the lease database file. If unspecified, the default | |
479 | .B DBDIR/dhclient.leases | |
24777ef4 | 480 | is used. See \fBdhclient.leases(5)\fR for a description of this file. |
d6645f56 SR |
481 | .TP |
482 | .BI \-pf \ pid-file | |
483 | Path to the process ID file. If unspecified, the default | |
484 | .B RUNDIR/dhclient.pid | |
485 | is used. | |
486 | .TP | |
4a5bfeac SR |
487 | .BI \--no-pid |
488 | Option to disable writing pid files. By default the program | |
489 | will write a pid file. If the program is invoked with this | |
490 | option it will not attempt to kill any existing client processes | |
491 | even if invoked with \fB-r\fR or \fB-x\fR. | |
492 | .TP | |
d6645f56 SR |
493 | .BI \-sf \ script-file |
494 | Path to the network configuration script invoked by | |
495 | .B dhclient | |
496 | when it gets a lease. If unspecified, the default | |
497 | .B CLIENTBINDIR/dhclient-script | |
498 | is used. See \fBdhclient-script(8)\fR for a description of this file. | |
d69e527c SR |
499 | .PP |
500 | .SH PORTS | |
501 | During operations the client may use multiple UDP ports | |
502 | to provide different functions. Which ports are opened depends | |
503 | on both the way you compiled your code and the configuration you | |
504 | supply. The following should provide you an idea of what | |
505 | ports may be in use. | |
506 | ||
507 | Normally a DHCPv4 client will open a raw UDP socket to receive | |
508 | and send most DHCPv4 packets. It also opens a fallback UDP socket | |
509 | for use in sending unicast packets. Normally these will both | |
510 | use the well known port number for BOOTPC. | |
511 | ||
512 | For DHCPv6 the client opens a UDP socket on the well known | |
513 | client port and a fallback UDP socket on a random port for | |
514 | use in sending unicast messages. Unlike DHCPv4 the well | |
515 | known socket doesn't need to be opened in raw mode. | |
d6645f56 | 516 | |
d69e527c SR |
517 | If you have included an omapi port statement in your configuration |
518 | file then the client will open a TCP socket on that port to | |
519 | listen for OMPAI connections. When something connects another | |
520 | port will be used for the established connection. | |
d6645f56 | 521 | |
d69e527c SR |
522 | When DDNS is enabled at compile time (see includes/site.h) |
523 | the client will open both a v4 and a v6 UDP socket on | |
ca22af89 TM |
524 | random ports. These ports are not opened unless/until the |
525 | client first attempts to do an update. If the client is not | |
526 | configured to do updates, the ports will never be opened. | |
78b044fa | 527 | .PP |
0e7affc7 | 528 | .SH CONFIGURATION |
d6645f56 | 529 | The syntax of the \fBdhclient.conf(5)\fR file is discussed separately. |
d758ad8c TL |
530 | .SH OMAPI |
531 | The DHCP client provides some ability to control it while it is | |
532 | running, without stopping it. This capability is provided using OMAPI, | |
533 | an API for manipulating remote objects. OMAPI clients connect to the | |
534 | client using TCP/IP, authenticate, and can then examine the client's | |
c0e9661e | 535 | current status and make changes to it. |
d758ad8c TL |
536 | .PP |
537 | Rather than implementing the underlying OMAPI protocol directly, user | |
a0497ac5 | 538 | programs should use the dhcpctl API or OMAPI itself. Dhcpctl is a |
d758ad8c | 539 | wrapper that handles some of the housekeeping chores that OMAPI does |
a0497ac5 | 540 | not do automatically. Dhcpctl and OMAPI are documented in |
d6645f56 | 541 | \fBdhcpctl(3)\fR |
a0497ac5 | 542 | and \fBomapi(3)\fR. Most things you'd want to do with the client can |
d758ad8c TL |
543 | be done directly using the \fBomshell(1)\fR command, rather than |
544 | having to write a special program. | |
545 | .SH THE CONTROL OBJECT | |
546 | The control object allows you to shut the client down, releasing all | |
547 | leases that it holds and deleting any DNS records it may have added. | |
548 | It also allows you to pause the client - this unconfigures any | |
a0497ac5 SR |
549 | interfaces the client is using. You can then restart it, which |
550 | causes it to reconfigure those interfaces. You would normally pause | |
d758ad8c | 551 | the client prior to going into hibernation or sleep on a laptop |
a0497ac5 | 552 | computer. You would then resume it after the power comes back. |
d758ad8c TL |
553 | This allows PC cards to be shut down while the computer is hibernating |
554 | or sleeping, and then reinitialized to their previous state once the | |
555 | computer comes out of hibernation or sleep. | |
556 | .PP | |
a0497ac5 SR |
557 | The control object has one attribute - the state attribute. To shut |
558 | the client down, set its state attribute to 2. It will automatically | |
559 | do a DHCPRELEASE. To pause it, set its state attribute to 3. To | |
d758ad8c TL |
560 | resume it, set its state attribute to 4. |
561 | .PP | |
d6645f56 SR |
562 | .SH ENVIRONMENT VARIABLES |
563 | .PP | |
564 | The following environment variables may be defined | |
565 | to override the builtin defaults for file locations. | |
566 | Note that use of the related command-line options | |
567 | will ignore the corresponding environment variable settings. | |
568 | .TP | |
569 | .B PATH_DHCLIENT_CONF | |
570 | The dhclient.conf configuration file. | |
571 | .TP | |
572 | .B PATH_DHCLIENT_DB | |
573 | The dhclient.leases database. | |
574 | .TP | |
575 | .B PATH_DHCLIENT_PID | |
576 | The dhclient PID file. | |
577 | .TP | |
578 | .B PATH_DHCLIENT_SCRIPT | |
579 | The dhclient-script file. | |
580 | .PP | |
0e7affc7 | 581 | .SH FILES |
4ca9936c | 582 | .B CLIENTBINDIR/dhclient-script, |
0e7affc7 TL |
583 | .B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid, |
584 | .B DBDIR/dhclient.leases~. | |
585 | .SH SEE ALSO | |
98311e4b | 586 | dhcpd(8), dhcrelay(8), dhclient-script(8), dhclient.conf(5), |
c759db75 | 587 | dhclient.leases(5), dhcp-eval(5). |
0e7affc7 TL |
588 | .SH AUTHOR |
589 | .B dhclient(8) | |
edad9be5 | 590 | To learn more about Internet Systems Consortium, |
0e7affc7 | 591 | see |
2c85ac9b | 592 | .B https://www.isc.org |
0e7affc7 TL |
593 | .PP |
594 | This client was substantially modified and enhanced by Elliot Poger | |
595 | for use on Linux while he was working on the MosquitoNet project at | |
596 | Stanford. | |
597 | .PP | |
598 | The current version owes much to Elliot's Linux enhancements, but | |
599 | was substantially reorganized and partially rewritten by Ted Lemon | |
98311e4b | 600 | so as to use the same networking framework that the Internet Systems |
a0497ac5 | 601 | Consortium DHCP server uses. Much system-specific configuration code |
0e7affc7 TL |
602 | was moved into a shell script so that as support for more operating |
603 | systems is added, it will not be necessary to port and maintain | |
604 | system-specific configuration code to these operating systems - instead, | |
605 | the shell script can invoke the native tools to accomplish the same | |
606 | purpose. | |
607 | .PP |