]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/dhcpd
ip/dhcpd, ip/tftpd: change default for tftp homedir to /
[plan9front.git] / sys / man / 8 / dhcpd
1 .TH DHCPD 8
2 .SH NAME
3 dhcpd, dhcp6d, dhcpleases, rarpd, tftpd \- Internet booting
4 .SH SYNOPSIS
5 .PP
6 .B ip/dhcpd
7 .RB [ -dmnprsSZ ]
8 .RB [ -h
9 .IR homedir ]
10 .RB [ -f
11 .IR ndbfile ]
12 .RB [ -M
13 .IR secs ]
14 .RB [ -x
15 .IR netmtpt ]
16 .RB [ -Z
17 .IR secs ]
18 [
19 .I address
20 .I n
21 ] ...
22 .PP
23 .B ip/dhcpleases
24 .PP
25 .B ip/dhcp6d
26 .RB [ -d ]
27 .RB [ -f
28 .IR ndbfile ]
29 .RB [ -x
30 .IR netmtpt ]
31 .PP
32 .B ip/rarpd
33 .RB [ -d ]
34 .RB [ -e
35 .IR etherdev ]
36 .RB [ -x
37 .IR netmtpt ]
38 .PP
39 .B ip/tftpd
40 .RB [ -dr ]
41 .RB [ -h
42 .IR homedir ]
43 .RB [ -x
44 .IR netmtpt ]
45 .SH DESCRIPTION
46 These programs support booting over the Internet.
47 They should all be run on the same server to
48 allow other systems to be booted.
49 .IR Dhcpd ,
50 .I dhcp6d
51 and
52 .I tftpd
53 are used to boot everything;
54 .I rarpd
55 is an extra piece just for Suns.
56 .PP
57 .I Dhcpd
58 runs the
59 .SM BOOTP
60 and
61 .SM DHCP
62 protocols.
63 Clients use these protocols to obtain configuration information.
64 This information comes from attribute/value pairs in the network database
65 (see
66 .IR ndb (6)
67 and
68 .IR ndb (8)).
69 DHCP requests are honored both for static addresses found in
70 the NDB and for dynamic addresses listed in the command line.
71 DHCP requests are honored if either:
72 .br
73 \- there exists an NDB entry
74 containing both the ethernet address of the requester and
75 an IP address on the originating network or subnetwork.
76 .br
77 \- a free dynamic address exists on the originating network or subnetwork.
78 .PP
79 A BOOTP request is honored if all of the following are true:
80 .br
81 \- there exists an NDB entry
82 containing both the ethernet address of the requester and
83 an IP address on the originating network or subnetwork.
84 .br
85 \- the entry contains a
86 .B bootf=
87 attribute
88 .br
89 \- the file in the
90 .B bootf=
91 attribute is readable.
92 .PP
93 Dynamic addresses are specified on the command line as a list
94 of addresses and number pairs.
95 For example,
96 .EX
97         ip/dhcpd 10.1.1.12 10 10.2.1.70 12
98 .EE
99 directs
100 .I dhcpd
101 to return dynamic addresses 10.1.1.12 through 10.1.1.21 inclusive
102 and 10.2.1.70 through 10.2.1.81 inclusive.
103 .PP
104 .I Dhcpd
105 maintains a record of all dynamic addresses in the directory
106 .BR /lib/ndb/dhcp ,
107 one file per address.
108 If multiple servers have access to this common directory,
109 they will correctly coordinate their actions.
110 .PP
111 Attributes come from either the NDB entry for the system, the entry for its
112 subnet, or the entry for its network.  The system entry has precedence,
113 then the subnet, then the network.
114 The NDB attributes used are:
115 .TF ipmask
116 .TP
117 .B ip
118 the IP address
119 .TP
120 .B ipmask
121 the IP mask
122 .TP
123 .B ipgw
124 the default IP gateway
125 .TP
126 .B dom
127 the domain name of the system
128 .TP
129 .B fs
130 the default Plan 9 file server
131 .TP
132 .B auth
133 the default Plan 9 authentication server
134 .TP
135 .B dns
136 a domain name server
137 .TP
138 .B ntp
139 a network time protocol server
140 .TP
141 .B time
142 a time server
143 .TP
144 .B wins
145 a
146 .SM NETBIOS
147 name server
148 .TP
149 .B www
150 a World Wide Web proxy
151 .TP
152 .B pop3
153 a POP3 mail server
154 .TP
155 .B smtp
156 an SMTP mail server
157 .TP
158 .B bootf
159 the default boot file;
160 see
161 .IR ndb (6)
162 .PD
163 .PP
164 .I Dhcpd
165 will answer
166 .SM BOOTP
167 requests only if it has been specifically targeted or if it
168 has read access to the boot file for the requester.  That means that the requester
169 must specify a boot file in the request or one has to exist in NDB for
170 .I dhcpd
171 to answer.
172 .I Dhcpd
173 will answer all
174 .SM DHCP
175 requests for which it can associate an IP address with the
176 requester.
177 The options are:
178 .TP
179 .B d
180 Print debugging to standard output.
181 .TP
182 .B h
183 Change directory to
184 .IR homedir .
185 The default is
186 .BR / .
187 This should match the
188 .I homedir
189 setting of
190 .I tftpd
191 so that the existence check of non-rooted file names
192 is consistent.
193 .TP
194 .B f
195 Specify a file other than
196 .B /lib/ndb/local
197 as the network database.
198 .TP
199 .B m
200 Mute: don't reply to requests, just log them and what
201 .I dhcpd
202 would have done.
203 .TP
204 .B M
205 Use
206 .I secs
207 as the minimum lease time for dynamic addresses.
208 .TP
209 .B n
210 Don't answer
211 .SM BOOTP
212 requests.
213 .TP
214 .B p
215 Answer
216 .SM DHCP
217 requests from
218 .SM PPTP
219 clients only.
220 .TP
221 .B r
222 Mute static addresses: don't reply to requests for static addresses,
223 just log them and what
224 .I dhcpd
225 would have done.
226 .TP
227 .B s
228 Sleep 2 seconds before answering requests for static addresses.
229 This is used to make a server be a backup only.
230 .TP
231 .B S
232 Sleep 2 seconds before answering requests for dynamic addresses.
233 .TP
234 .B x
235 The IP stack to use is mounted at 
236 .IR netmtpt .
237 The default is
238 .BR /net .
239 .TP
240 .B Z
241 Use
242 .I secs
243 as the minimum lease time for static addresses.
244 .PD
245 .PP
246 .I Dhcp6d
247 provides DHCPv6 service for IPv6 clients. Only network boot and
248 DNS parameters are supported.
249 .PP
250 .I Dhcpleases
251 prints out the currently valid DHCP leases found in the
252 .B /lib/ndb/dhcp
253 directory.
254 .PP
255 .I Rarpd
256 performs the Reverse Address Resolution Protocol, translating
257 Ethernet addresses into IP addresses.
258 The options are:
259 .TP
260 .B d
261 Print debugging to standard output.
262 .TP
263 .B e
264 Use the Ethernet mounted at
265 .BI /net/ etherdev\f1.
266 .TP
267 .B x
268 The IP stack to use is mounted at 
269 .IR netmtpt .
270 The default is
271 .BR /net .
272 .PD
273 .PP
274 .I Tftpd
275 transfers files to systems that are booting.
276 It runs as user
277 .B none
278 and can only access files with global read permission.
279 The options are:
280 .TP
281 .B d
282 Print debugging to standard output.
283 .TP
284 .B x
285 The IP stack to use is mounted at 
286 .IR netmtpt .
287 The default is
288 .BR /net .
289 .TP
290 .B h
291 Change directory to
292 .IR homedir .
293 The default is
294 .BR / .
295 All requests for files with non-rooted file names are served starting at this
296 directory. This needs to be consistent with the
297 .I homedir
298 setting of
299 .IR dhcpd .
300 .I Tftpd
301 supports only octet mode.
302 .TP
303 .B r
304 Restricts access to only those files rooted in the
305 .IR homedir .
306 .PD
307 .SH FILES
308 .BR /lib/ndb/dhcp "    directory of dynamic address files
309 .SH SOURCE
310 .B /sys/src/cmd/ip
311 .SH "SEE ALSO"
312 .IR ndb (6),
313 .IR booting (8)