OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / dhcpcd / original / man8 / dhcpcd.8
1 .\" $Id$
2 .\"
3 .TH dhcpcd 8 "31 January 1998" "dhcpcd 1.3" "Linux System Manager's Manual"
4
5 .SH NAME
6 dhcpcd \- DHCP client daemon
7
8 .SH SYNOPSIS
9 .in +.5i
10 .ti -.5i
11 dhcpcd
12 \%[\-dknrBCDHNRSTY]
13 \%[\-t\ <timeout>]
14 \%[\-c\ <ExecFilePath>]
15 \%[-h\ <hostname>]
16 \%[-i\ <vendorClassID>]
17 \%[-I\ <clientID>]
18 \%[\-l\ <leasetime>]
19 \%[\-s\ [ipaddr]]
20 \%[\-G\ [gateway]]
21 \%[\-w\ <windowsize>]
22 \%[\-L\ <ConfigDir>]
23 \%[interface]
24 .in -.5i
25 .SH DESCRIPTION
26 .B dhcpcd
27 is an implementation of the DHCP client specified in
28 .B RFC2131
29 (when -r option is not specified) and
30 .B RFC1541
31 (when -r option is specified).
32
33 It gets the host information (IP address, netmask, broadcast address,
34 etc.) from a DHCP server and configures the network interface of the
35 machine on which it is running. It also tries to renew the lease time
36 according to
37 .B RFC2131
38 or
39 .B RFC1541
40 (obsolete).
41
42
43 .SH OPTIONS
44 .TP
45 .BI \-d
46 With this flag
47 .B dhcpcd
48 will
49 syslog(LOG_DEBUG,...) messages for about every step it does.
50 It's recommended to use this option since it doesn't really
51 produce too much output but will greatly help in resolving
52 a problems if any.
53 .B dhcpcd
54 uses
55 .I LOCAL0
56 syslog facility for its output. To catch
57 .B dhcpcd
58 debugging output add the following line to
59 .I /etc/syslog.conf
60 file:
61
62 local0.*     /var/log/dhcpcd.log
63
64 and then refresh syslogd daemon:
65
66 kill -1 `cat /var/run/syslogd.pid`
67
68 .TP
69 .BI \-k
70 Sends
71 .B SIGHUP
72 signal to the
73 .B dhcpcd
74 process that is currently running. If
75 .B dhcpcd
76 receives
77 .B SIGHUP
78 it will send
79 .B DCHP_RELEASE
80 message to the server and destroy dhcpcd cache. In a case
81 .B dhcpcd
82 receives
83 .B SIGTERM
84 which is normally used by
85 .B shutdown(8)
86 when rebooting the system
87 .B dhcpcd
88 will not send
89 .B DHCP_RELEASE
90 and will not destroy cache. When system boots
91 .B dhcpcd
92 will use cache to request the same IP address
93 from DHCP server which was assigned before the
94 system went down.
95 .TP
96 .BI \-n
97 Sends
98 .B SIGALRM
99 signal to the
100 .B dhcpcd
101 process that is currently running which
102 forces
103 .B dhcpcd
104 to try to renew the lease. If dhcpcd is not running, the flag
105 is ignored and
106 .B dhcpcd
107 follows the normal startup procedure.
108 .TP
109 .BI \-r
110 Makes dhcpcd RFC1541 (obsolete) compliant.
111 .B dhcpcd
112 is RFC2131 compliant unless this option is specified.
113 .TP
114 .BI \-B
115 Requests broadcast response from DHCP server.
116 .TP
117 .BI \-C
118 Forces dhcpcd to calculate checksum on received packets.
119 .TP
120 .BI \-D
121 Forces
122 .B dhcpcd
123 to set domainname of the host to the domainname option
124 supplied by DHCP server.
125 .TP
126 .BI \-H
127 Forces
128 .B dhcpcd
129 to set hostname of the host to the hostname option supplied by DHCP server.
130 By default
131 .B dhcpcd
132 will NOT set hostname of the host to the hostname option
133 received from DHCP server.
134 .TP
135 .BI \-L \ <ConfigDir>
136 .B dhcpcd
137 will use
138 .I <ConfigDir>
139 directory instead of default
140 .I /etc/dhcpc
141 to store configuration information.
142 .TP
143 .BI \-S
144 Forces
145 .B dhcpcd
146 to send second DHCP_DISCOVER message even
147 after receiving DHCP_OFFER on the first one. Some DHCP servers
148 expect the client to send second DHCP_DISCOVER message
149 before replying on DHCP_REQUEST.
150 .TP
151 .BI \-R
152 Prevents
153 .B dhcpcd
154 from replacing existing
155 .I /etc/resolv.conf
156 file.
157 .TP
158 .BI \-Y
159 Prevents
160 .B dhcpcd
161 from replacing existing
162 .I /etc/yp.conf
163 file. Domainname is not updated unless \fB-D\fP is specified.
164 .TP
165 .BI \-N
166 Prevents
167 .B dhcpcd
168 from replacing existing
169 .I /etc/ntp.conf
170 file.
171 .TP
172 .BI \-T
173 Test case, when
174 .B dhcpcd
175 goes through the DHCP negotiation sequence but
176 doesn't actually configure the interface. It does however
177 write the
178 .I <ConfigDir>/dhcpcd-<interface>.info
179 and
180 .I <ConfigDir>/dhcpcd-<interface>.cache
181 files and it does attempt to execute
182 .I <ConfigDir>/dhcpcd.exe
183 script. The pathname of
184 .I dhcpcd.exe
185 executable script can
186 be changed with
187 .I \-c \ <ExecFilePath>
188 option.
189 .B \-T
190 option is used primarily for testing DHCP servers,
191 for obtaining multiple IP addresses for the same dummy interface, and/or
192 configuring virtual interfaces in conjunction with
193 .I \-L \ <ConfigDir>
194 and
195 .I \-I \ <ClientID>
196 options.
197 .TP
198 .BI \-t \ <timeout>
199 Specifies (in seconds ) for how long
200 .B dhcpcd
201 will try to get an IP address. The default is 60 seconds.
202 .B dhcpcd
203 will not fork into background until it gets a valid IP address
204 in which case dhcpcd will return 0 to the parent process.
205 In a case
206 .B dhcpcd
207 times out before receiving a valid IP address from DHCP server
208 .B dhcpcd
209 will return exit code 1 to the parent process.
210 .TP
211 .BI \-c \ <ExecFilePath>
212 .B dhcpcd
213 will try to execute 
214 .I <ExecFilePath>
215 script instead of default
216 .I <ConfigDir>/dhcpcd.exe
217 script every time it configures or brings down the interface. See the
218 description of
219 .I dhcpcd.exe
220 script in
221 .B FILES
222 section below.
223 .TP
224 .BI \-h \ <hostname>
225 specifies a string used for the hostname option field when
226 .B dhcpcd
227 sends DHCP messages. Some DHCP servers, notably those used by
228 @Home Networks, require the hostname option
229 field containing a specific string in the DHCP messages from clients.
230 .TP
231 .BI \-i \ <vendorClassID>
232 Specifies the vendor class identifier string.
233 .B dhcpcd
234 uses the default vendor class identifier string (system name, system release,
235 and machine type) if it is not specified.
236 .TP
237 .BI \-I \ <ClientID>
238 Specifies the client identifier string.
239 .B dhcpcd
240 uses the default client identifier (MAC address of the network
241 interface) if it is not specified.
242 .TP
243 .BI \-l \ <leasetime>
244 Specifies (in seconds) the recommended lease time to the server. (Note
245 that the server can override this value if it sees fit). This value is
246 used in the
247 .B DHCP_DISCOVER
248 message. The default is infinite (0xffffffff).
249 .TP
250 .BI \-s \ [ipaddr]
251 Sends DHCP_INFORM message to DHCP server using ipaddr. 
252 The optional ipaddr parameter must be in
253 the form xxx.xxx.xxx.xxx.
254 If no ipaddr parameter is given on the command line
255 .B dhcpcd
256 will use the IP address currently assigned to the interface.
257 If there is no IP address currently assigned
258 to the interface
259 .B dhcpcd
260 will use previously obtained IP address stored in
261 .I <ConfigDir>/dhcpcd-<interface>.cache
262 file. 
263 .TP
264 .BI \-G \ [gateway]
265 Prevents
266 .B dhcpcd
267 from installing default routes provided by DHCP server.
268 If optional gateway ip address parameter
269 is supplied then use it for default route.
270 .TP
271 .BI \-w \ <windowsize>
272 Specifies the window size for the gateway route. Default = 32768.
273 .TP
274 .BI interface
275 Specifies the network interface name (eth0, eth1, etc.).
276 .B dhcpcd
277 uses the network interface
278 .I eth0
279 unless an explicit name is specified.
280
281 .SH FILES
282 .PD 0
283 .TP
284 .BI /etc/dhcpc
285 Default 
286 .I <ConfigDir>
287 directory used for storing files
288 created by
289 .B dhcpcd.
290 See option
291 .I \-L <ConfigDir>
292 above.
293 .PD 1
294 .TP
295 .BI <ConfigDir>/dhcpcd-<interface>.info
296 file in which
297 .B dhcpcd
298 saves the host information. The word
299 .I <interface>
300 is actually replaced with the network interface name like
301 .I eth0
302 to which dhcpcd is attached.
303 .TP
304 .BI <ConfigDir>/dhcpcd.exe
305 script file, which
306 .B dhcpcd
307 will try to execute whenever it configures or brings down the interface. The
308 path to this executable script can be changed with
309 .I \-c \ <ExecFilePath>
310 option.
311 .B Dhcpcd
312 passes 3 parameters to
313 .I dhcpcd.exe
314 script:
315 .TP
316 .I dhcpcd.exe <HostInfoFilePath> <up|down|new> [-d]
317 The first parameter
318 .I <HostInfoFilePath>
319 is path to
320 .I dhcpcd-<interface>.info
321 file. The word
322 .I <interface>
323 is actually replaced with interface name dhcpcd is
324 attached to, e.g. "eth0". The second parameter values
325 .I <up|down|new>
326 mean the interface has been brought up with the same IP address as before ("up"), or
327 with the new IP address ("new"), or the interface has been brought down ("down"). Parameter
328 .I -d
329 is passed in a case
330 .B dhcpcd
331 has been started with
332 .I -d
333 debug flag.
334 .TP
335 .BI <ConfigDir>/dhcpcd-<interface>.cache
336 Cache file containing the previously assigned IP address and
337 some other things.
338 The word
339 .I <interface>
340 is actually replaced with the network interface name like
341 .I eth0
342 to which
343 .B dhcpcd
344 is attached.
345 .TP
346 .BI /etc/resolv.conf
347 file created by
348 .B dhcpcd
349 when the client receives DNS and domain name options.
350 The old
351 .B /etc/resolv.conf
352 file is renamed to
353 .B /etc/resolv.conf.sv
354 and will be restored back when
355 .B dhcpcd
356 exits for any reason.
357 .TP
358 .BI /etc/yp.conf
359 file created by
360 .B dhcpcd
361 when the client receives NIS options.
362 The old
363 .B /etc/yp.conf
364 file is renamed to
365 .B /etc/yp.conf.sv
366 and is restored back when
367 .B dhcpcd
368 exits for any reason.
369 .TP
370 .BI /etc/ntp.conf
371 file created by
372 .B dhcpcd
373 when the client receives NTP options.
374 The old
375 .B /etc/ntp.conf
376 file is renamed to
377 .B /etc/ntp.conf.sv
378 and is restored back when
379 .B dhcpcd
380 exits for any reason.
381 .TP
382 .BI <ConfigDir>/dhcpcd-<interface>.pid
383 file containing the process id of
384 .B dhcpcd.
385 The word
386 .I <interface>
387 is actually replaced with the network interface name like
388 .I eth0
389 to which
390 .B dhcpcd
391 is attached.
392
393 .SH SEE ALSO
394 .I Dynamic Host Configuration Protocol,
395 RFC2131 and RFC1541 (obsolete)
396 .I DHCP Options and BOOTP Vendor Extensions,
397 RFC2132
398
399 .SH BUGS
400 .PD 0
401 .B dhcpcd
402 uses
403 .B time(3)
404 to calculate the lease expiration time.  If the system time is changed
405 while the client is running, the lease expiration time may not be
406 predictable.
407
408 .SH AUTHORS
409 v.<1.3
410 .LP
411 Yoichi Hariguchi <yoichi@fore.com>
412 .LP
413 v.1.3
414 .LP
415 Sergei Viznyuk <sv@phystech.com>