]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/isc-dhcp/client/dhclient.8
unfinished sblive driver, playback/mixer only for now - not enabled in
[FreeBSD/FreeBSD.git] / contrib / isc-dhcp / client / dhclient.8
1 .\"     dhclient.8
2 .\"
3 .\" Copyright (c) 1997 The Internet Software Consortium.
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\"
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 3. Neither the name of The Internet Software Consortium nor the names
16 .\"    of its contributors may be used to endorse or promote products derived
17 .\"    from this software without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND
20 .\" CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21 .\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 .\" DISCLAIMED.  IN NO EVENT SHALL THE INTERNET SOFTWARE CONSORTIUM OR
24 .\" CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
27 .\" USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
28 .\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
30 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\" This software has been written for the Internet Software Consortium
34 .\" by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
35 .\" Enterprises.  To learn more about the Internet Software Consortium,
36 .\" see ``http://www.isc.org/isc''.  To learn more about Vixie
37 .\" Enterprises, see ``http://www.vix.com''.
38 .TH dhclient 8
39 .SH NAME
40 dhclient - Dynamic Host Configuration Protocol Client
41 .SH SYNOPSIS
42 .B dhclient
43 [
44 .B -Ddq1
45 ]
46 [
47 .B -lf
48 .I lease-file
49 ]
50 [
51 .B -p
52 .I port
53 ]
54 [
55 .B -pf
56 .I pidfile
57 ]
58 [
59 .I if0
60 [
61 .I ...ifN
62 ]
63 ]
64 .SH DESCRIPTION
65 The Internet Software Consortium DHCP Client, dhclient, provides a
66 means for configuring one or more network interfaces using the Dynamic
67 Host Configuration Protocol, BOOTP protocol, or if these protocols
68 fail, by statically assigning an address.
69 .SH OPERATION
70 .PP
71 The DHCP protocol allows a host to contact a central server which
72 maintains a list of IP addresses which may be assigned on one or more
73 subnets.   A DHCP client may request an address from this pool, and
74 then use it on a temporary basis for communication on network.   The
75 DHCP protocol also provides a mechanism whereby a client can learn
76 important details about the network to which it is attached, such as
77 the location of a default router, the location of a name server, and
78 so on.
79 .PP
80 On startup, dhclient reads the
81 .IR dhclient.conf
82 for configuration instructions.   It then gets a list of all the
83 network interfaces that are configured in the current system.   For
84 each interface, it attempts to configure the interface using the DHCP
85 protocol.
86 .PP
87 In order to keep track of leases across system reboots and server
88 restarts, dhclient keeps a list of leases it has been assigned in the
89 dhclient.leases(5) file.   On startup, after reading the dhclient.conf
90 file, dhclient reads the dhclient.leases file to refresh its memory
91 about what leases it has been assigned.
92 .PP
93 When a new lease is acquired, it is appended to the end of the
94 dhclient.leases file.   In order to prevent the file from becoming
95 arbitrarily large, from time to time dhclient creates a new
96 dhclient.leases file from its in-core lease database.  The old version
97 of the dhclient.leases file is retained under the name
98 .IR dhcpd.leases~
99 until the next time dhclient rewrites the database.
100 .PP
101 Old leases are kept around in case the DHCP server is unavailable when
102 dhclient is first invoked (generally during the initial system boot
103 process).   In that event, old leases from the dhclient.leases file
104 which have not yet expired are tested, and if they are determined to
105 be valid, they are used until either they expire or the DHCP server
106 becomes available.
107 .PP
108 A mobile host which may sometimes need to access a network on which no
109 DHCP server exists may be preloaded with a lease for a fixed
110 address on that network.   When all attempts to contact a DHCP server
111 have failed, dhclient will try to validate the static lease, and if it
112 succeeds, will use that lease until it is restarted.
113 .PP
114 A mobile host may also travel to some networks on which DHCP is not
115 available but BOOTP is.   In that case, it may be advantageous to
116 arrange with the network administrator for an entry on the BOOTP
117 database, so that the host can boot quickly on that network rather
118 than cycling through the list of old leases.
119 .SH COMMAND LINE
120 .PP
121 The names of the network interfaces that dhclient should attempt to
122 configure may be specified on the command line.  If no interface names
123 are specified on the command line dhclient will identify all network
124 interfaces, elimininating non-broadcast interfaces if possible, and
125 attempt to configure each interface.
126 .PP
127 The
128 .B -D
129 flag causes
130 .B dhclient
131 to save the script it creates for use in conjunction with
132 .B dhclient-script
133 in 
134 .IR /tmp.
135 .PP
136 Dhclient will normally run in the foreground until it has configured
137 an interface, and then will revert to running in the background.
138 To run force dhclient to always run as a foreground process, the
139 .B -d
140 flag should be specified.  This is useful when running dhclient under
141 a debugger, or when running it out of inittab on System V systems.
142 .PP
143 If dhclient should listen and transmit on a port other than the
144 standard (port 68), the
145 .B -p
146 flag may used.  It should be followed by the udp port number that
147 dhclient should use.  This is mostly useful for debugging purposes.
148 If the
149 .B -p
150 flag is specified, the client will transmit responses to servers at a
151 port number that is one less than the one specified - i.e., if you
152 specify
153 .B -p
154 68, then the client will listen on port 68 and transmit to port 67.
155 Datagrams that must go through relay agents are sent to the port
156 number specified with the
157 .B -p
158 flag - if you wish to use alternate port numbers, you must configure
159 any relay agents you are using to use the same alternate port numbers.
160 .PP
161 The 
162 .B -lf
163 flag may be used to change the lease output file from the default of
164 /var/db/dhclient.leases.
165 .PP
166 The
167 .B -pf
168 flag may be used to change the PID file from the default of
169 /var/run/dhclient.pid.
170 .PP
171 The
172 .B -q
173 flag may be used to reduce the amount of screen output from
174 .B dhclient.
175 .PP
176 The
177 .B -1
178 flag cause dhclient to try once to get a lease.  If it fails, dhclient exits
179 with exit code two.
180 .PP
181 .SH CONFIGURATION
182 The syntax of the dhclient.conf(5) file is discussed separately.
183 .SH FILES
184 .B /etc/dhclient.conf, /var/db/dhclient.leases, /var/db/dhclient.leases~.
185 .B /var/run/dhclient.pid,
186 .SH SEE ALSO
187 dhclient.conf(5), dhclient.leases(5), dhclient-script(8)
188 .SH AUTHOR
189 .B dhclient(8)
190 has been written for the Internet Software Consortium
191 by Ted Lemon <mellon@fugue.com> in cooperation with Vixie
192 Enterprises.  To learn more about the Internet Software Consortium,
193 see
194 .B http://www.vix.com/isc.
195 To learn more about Vixie
196 Enterprises, see
197 .B http://www.vix.com.
198 .PP
199 This client was substantially modified and enhanced by Elliot Poger
200 for use on Linux while he was working on the MosquitoNet project at
201 Stanford.
202 .PP
203 The current version owes much to Elliot's Linux enhancements, but
204 was substantially reorganized and partially rewritten by Ted Lemon
205 so as to use the same networking framework that the Internet Software
206 Consortium DHCP server uses.   Much system-specific configuration code
207 was moved into a shell script so that as support for more operating
208 systems is added, it will not be necessary to port and maintain
209 system-specific configuration code to these operating systems - instead,
210 the shell script can invoke the native tools to accomplish the same
211 purpose.
212 .PP