1dhcpconfig(1M) System Administration Commands dhcpconfig(1M)
2
3
4
6 dhcpconfig - DHCP service configuration utility
7
9 dhcpconfig -D -r resource -p path [-u uninterpreted]
10 [-l lease_length] [-n ] [-d DNS_domain]
11 [-a DNS_server_addresses] [-h hosts_resource]
12 [-y hosts_domain]
13
14
15 dhcpconfig -R server_addresses
16
17
18 dhcpconfig -U [-f] [-x] [-h]
19
20
21 dhcpconfig -N network_address [-m subnet_mask] [-b ]
22 [-t router_addresses] [-y NIS-domain]
23 [-a NIS_server_addresses] [-g]
24
25
26 dhcpconfig -C -r resource -p path [-f] [-k]
27 [-u uninterpreted]
28
29
30 dhcpconfig -X filename [-m macro_list] [-o option_list]
31 [-a network_addresses] [-f] [-x] [-g]
32
33
34 dhcpconfig -I filename [-f] [-g]
35
36
37 dhcpconfig -P [parameter[=value],]...
38
39
40 dhcpconfig -S [-f] [-e | -d | -r | -q]
41
42
44 The dhcpconfig command is used to configure and manage the Dynamic Host
45 Configuration Protocol (DHCP) service or BOOTP relay services. It is
46 intended for use by experienced Solaris system administrators and is
47 designed for ease of use in scripts. The dhcpmgr utility is recommended
48 for less experienced administrators or those preferring a graphical
49 utility to configure and manage the DHCP service or BOOTP relay ser‐
50 vice.
51
52
53 The dhcpconfig command can be run by root, or by other users assigned
54 to the DHCP Management profile. See rbac(5) and user_attr(4).
55
56
57 dhcpconfig requires one of the following function flags: -D, -R, -U,
58 -N, -C, -X, -I, -P or -S.
59
60
61 The dhcpconfig menu driven mode is supported in Solaris 8 and previous
62 versions of Solaris.
63
64 Where dhcpconfig Obtains Configuration Information
65 dhcpconfig scans various configuration files on your Solaris machine
66 for information it can use to assign values to options contained in
67 macros it adds to the dhcptab configuration table. The following table
68 lists information dhcpconfig needs, the source used, and how the infor‐
69 mation is used:
70
71
72
73
74 ┌───────────────┬───────────────────────────────────────┬───────────────────────┐
75 │Information │ Source │ Where Used │
76 ├───────────────┼───────────────────────────────────────┼───────────────────────┤
77 │Timezone │ System date, timezone settings │ Locale macro │
78 │DNS parameters │ nsswitch.conf, /etc/resolv.conf │ Server macro │
79 │NIS parameters │ System domainname, nsswitch.conf, NIS │ Network macros │
80 │Subnetmask │ Network interface, netmasks table in │ Network macros │
81 │ │ nameservice │ │
82 └───────────────┴───────────────────────────────────────┴───────────────────────┘
83
84
85 If you have not set these parameters on your server machine, you should
86 do so before configuring the DHCP server with dhcpconfig. Note that if
87 you specify options with the dhcpconfig -D command line, the values you
88 supply override the values obtained from the system files.
89
91 The following options are supported:
92
93 -C Convert to using a new data store, recreating
94 the DHCP data tables in a format appropriate to
95 the new data store, and setting up the DHCP
96 server to use the new data store.
97
98 The following sub-options are required:
99
100 -p path_to_data The paths for SUNWfiles and
101 SUNWbinfiles must be abso‐
102 lute UNIX pathnames. The
103 path for SUNWnisplus must be
104 a fully specified NIS+
105 directory (including the
106 tailing period.) See
107 dhcp_modules(5).
108
109
110 -r data_resource New data store resource. One
111 of the following must be
112 specified: SUNWfiles, SUN‐
113 Wbinfiles, or SUNWnisplus.
114 See dhcp_modules(5).
115
116 The following sub-options are optional:
117
118 -f Do not prompt for confirma‐
119 tion. If -f is not used, a
120 warning and confirmation
121 prompt are issued before the
122 conversion starts.
123
124
125 -k Keep the old DHCP data
126 tables after successful con‐
127 version. If any problem
128 occurs during conversion,
129 tables are not deleted even
130 if -k sub-option is not
131 specified.
132
133
134 -u uninterpreted Data which is ignored by
135 dhcpconfig, but passed on to
136 the datastore for interpre‐
137 tation. The private layer
138 provides for module-specific
139 configuration information
140 through the use of the
141 RESOURCE_CONFIG keyword.
142 Uninterpreted data is stored
143 within RESOURCE_CONFIG key‐
144 word of dhcpsvc.conf(4). The
145 -u sub-option is not used
146 with the SUNWfiles, SUNWbin‐
147 files, and SUNWnisplus data
148 stores. See dhcp_modules(5).
149
150
151
152 -D Configure the DHCP service.
153
154 The following sub-options are required:
155
156 -r data_resource One of the following must be
157 specified: SUNWfiles, SUN‐
158 Wbinfiles, or SUNWnisplus.
159 Other data stores may be
160 available.See dhcp_mod‐
161 ules(5).
162
163
164 -p path The paths for SUNWfiles and
165 SUNWbinfiles must be abso‐
166 lute UNIX pathnames. The
167 path for SUNWnisplus must be
168 a fully specified NIS+
169 directory (including the
170 tailing period.) . See
171 dhcp_modules(5).
172
173 The following sub-options are optional:
174
175 -a DNS_servers IP addresses of DNS
176 servers, separated with
177 commas.
178
179
180 -d DNS_domain DNS domain name.
181
182
183 -h hosts_resource Resource in which to place
184 hosts data. Usually, the
185 name service in use on the
186 server. Valid values are
187 nisplus, files, or dns.
188
189
190 -l seconds Lease length used for
191 addresses not having a
192 specified lease length, in
193 seconds.
194
195
196 -n Non-negotiable leases
197
198
199 -y hosts_domain DNS or NIS+ domain name to
200 be used for hosts data.
201 Valid only if dns or nis‐
202 plus is specified for -h
203 sub-option.
204
205
206 -u uninterpreted Data which is ignored by
207 dhcpconfig, but passed on
208 to the datastore for inter‐
209 pretation. The private
210 layer provides for module-
211 specific configuration
212 information through the use
213 of the RESOURCE_CONFIG
214 keyword. Uninterpreted data
215 is stored within
216 RESOURCE_CONFIG keyword of
217 dhcpsvc.conf(4). The -u
218 sub-option is not used with
219 the SUNWfiles, SUNWbin‐
220 files, and SUNWnisplus data
221 stores. See dhcp_mod‐
222 ules(5).
223
224
225
226 -I filename Import data from filename, containing data pre‐
227 viously exported from a Solaris DHCP server.
228 Note that after importing, you may have to edit
229 macros to specify the correct domain names, and
230 edit network tables to change the owning server
231 of addresses in imported networks. Use dhtadm
232 and pntadm to do this.
233
234 The following sub-options are supported:
235
236 -f Replace any conflicting data with the data
237 being imported.
238
239
240 -g Signal the daemon to reload the dhcptab
241 once the import has been completed.
242
243
244
245 -N net_address Configure an additional network for DHCP ser‐
246 vice.
247
248 The following sub-options are supported:
249
250 -a NIS_server_addresses List of IP addresses
251 of NIS servers.
252
253
254 -b Network is a point-
255 to-point (PPP) net‐
256 work, therefore no
257 broadcast address
258 should be configured.
259 If -b is not used,
260 the network is
261 assumed to be a LAN,
262 and the broadcast
263 address is determined
264 using the network
265 address and subnet
266 mask.
267
268
269 -g Signal the daemon to
270 reload the dhcptab.
271
272
273 -m xxx.xxx.xxx.xxx Subnet mask for the
274 network; if -m is not
275 used, subnet mask is
276 obtained from net‐
277 masks.
278
279
280 -t router_addresses List of router IP
281 addresses; if not
282 specified, router
283 discovery flag is
284 set.
285
286
287 -y NIS_domain_name If NIS is used on
288 this network, specify
289 the NIS domain name.
290
291
292
293 -P Configure the DHCP service parameters. Each
294 parameter and value are specified by the follow‐
295 ing pattern:
296
297 parameter[=value],...
298
299
300 Where parameter and value are:
301
302 parameter One of the DHCP service parameters
303 listed in dhcpsvc.conf(4). If the
304 corresponding value is not speci‐
305 fied, the current parameter value
306 is displayed. If parameter is not
307 specified, all parameters and cur‐
308 rent values are displayed.
309
310
311 value Optional string to set the servers
312 parameter to if the value is
313 acceptable. If the value is missing
314 or is empty (""), the parameter and
315 its current value are deleted.
316
317 After a parameter has changed the DHCP server
318 requires re-starting before you can use new
319 parameter values.
320
321
322 -R server_addresses Configure the BOOTP relay service. BOOTP or DHCP
323 requests are forwarded to the list of servers
324 specified.
325
326 server_addresses is a comma separated list of
327 hostnames and/or IP addresses.
328
329
330 -S Control the DHCP service.
331
332 The following sub-options are supported:
333
334 -d Disable and stop the DHCP service.
335
336
337 -e Enable and start the DHCP service.
338
339
340 -q Display the state of the DHCP service. The
341 state is encoded into the exit status.
342
343 0 DHCP service disabled and stopped
344 1 DHCP service enabled and stopped
345 2 DHCP service disabled and running
346 3 DHCP service enabled and running
347
348
349
350
351 -r Enable and restart the DHCP service.
352
353
354
355 -U Unconfigure the DHCP service or BOOTP relay ser‐
356 vice.
357
358 The following sub-options are supported:
359
360 -f Do not prompt for confirmation. If -f is
361 not used, a warning and confirmation
362 prompt is issued.
363
364
365 -h Delete hosts entries from name service.
366
367
368 -x Delete the dhcptab and network tables.
369
370
371
372 -X filename Export data from the DHCP data tables, saving to
373 filename, to move the data to another Solaris
374 DHCP server.
375
376 The following sub-options are optional:
377
378 -a networks_to_export List of networks whose
379 addresses should be
380 exported, or the key‐
381 word ALL to specify all
382 networks. If -a is not
383 specified, no networks
384 are exported.
385
386
387 -g Signal the daemon to
388 reload the dhcptab
389 after the export has
390 been completed.
391
392
393 -m macros_to_export List of macros to
394 export, or the keyword
395 ALL to specify all
396 macros. If -m is not
397 specified, no macros
398 are exported.
399
400
401 -o options_to_export List of options to
402 export, or the keyword
403 ALL to specify all
404 options. If -o is not
405 specified, no options
406 are exported.
407
408
409 -x Delete the data from
410 this server after it is
411 exported. If -x is not
412 specified you are in
413 effect copying the
414 data.
415
416
417
419 Example 1 Configuring DHCP Service with Binary Files Data Store
420
421
422 The following command configures DHCP service, using the binary files
423 data store, in the DNS domain acme.eng, with a lease time of 28800 sec‐
424 onds (8 hours),
425
426
427 example# dhcpconfig -D -r SUNWbinfiles -p /var/dhcp -l 28800\
428 -d acme.eng -a 120.30.33.4 -h dns -y acme.eng
429
430
431
432 Example 2 Configuring BOOTP Relay Agent
433
434
435 The following command configures the DHCP daemon as a BOOTP relay
436 agent, which forwards BOOTP and DHCP requests to the servers having the
437 IP addresses 120.30.33.7 and 120.30.42.132:
438
439
440 example# dhcpconfig -R 120.30.33.7,120.30.42.132
441
442
443
444 Example 3 Unconfiguring DHCP Service
445
446
447 The following command unconfigures the DHCP service, with confirmation,
448 and deletes the DHCP data tables and host table entries:
449
450
451 example# dhcpconfig -U -x -h
452
453
454
455 Example 4 Configuring a Network for DHCP Service
456
457
458 The following command configures an additional LAN network for DHCP
459 service, specifying that clients should use router discovery and pro‐
460 viding the NIS domain name and NIS server address:
461
462
463 example# dhcpconfig -N 120.30.171.0 -y east.acme.eng.com\
464 -a 120.30.33.4
465
466
467
468 Example 5 Converting to SUNWnisplus Data Store
469
470
471 The following command converts a DHCP server from using a text or
472 binary files data store to a NIS+ data store, deleting the old data
473 store's DHCP tables:
474
475
476 example# dhcpconfig -C -r SUNWnisplus -p whatever.com.
477
478
479
480 Example 6 Exporting a Network, Macros, and Options from a DHCP Server
481
482
483 The following command exports one network (120.30.171.0) and its
484 addresses, the macro 120.30.171.0, and the options motd and PSptrfrom a
485 DHCP server, saves the exported data in file
486 /export/var/120301710_data, and deletes the exported data from the
487 server.
488
489
490 example# dhcpconfig -X /var/dhcp/120301710_export
491 -a 120.30.171.0 -m 120.30.171.0 -o motd,PSptr
492
493
494
495 Example 7 Importing Data on a DHCP Server
496
497
498 The following command imports DHCP data from a file,
499 /net/golduck/export/var/120301710_data, containing data previously
500 exported from a Solaris DHCP server, overwrites any conflicting data on
501 the importing server, and signals the daemon to reload the dhcptab once
502 the import is completed:
503
504
505 example# dhcpconfig -I /net/golduck/export/var/120301710_data -f -g
506
507
508
509 Example 8 Setting DHCP Server Parameters
510
511
512 The following command sets the number of minutes that the DHCP server
513 waits before timing out when updating DNS information on DHCP clients
514 to five minutes.
515
516
517 example# example# dhcpconfig -P UPDATE_TIMEOUT=5
518
519
520
521 Example 9 Re-starting the DHCP server
522
523
524 The following command stops and re-starts the DHCP server.
525
526
527 example# example# dhcpconfig -S -r
528 DHCP server stopped
529 DHCP server started
530
531
532
534 See attributes(5) for descriptions of the following attributes:
535
536
537
538
539 ┌─────────────────────────────┬─────────────────────────────┐
540 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
541 ├─────────────────────────────┼─────────────────────────────┤
542 │Availability │SUNWdhcsu │
543 ├─────────────────────────────┼─────────────────────────────┤
544 │Interface Stability │Evolving │
545 └─────────────────────────────┴─────────────────────────────┘
546
548 dhcpmgr(1M), dhtadm(1M), in.dhcpd(1M), pntadm(1M), dhcp_network(4),
549 dhcptab(4), dhcpsvc.conf(4), nsswitch.conf(4), resolv.conf(4),
550 user_attr(4), attributes(5), dhcp(5), dhcp_modules(5), rbac(5)
551
552
553
554
555
556
557SunOS 5.11 16 Jun 2004 dhcpconfig(1M)