1dhtadm(1M) System Administration Commands dhtadm(1M)
2
3
4
6 dhtadm - DHCP configuration table management utility
7
9 dhtadm -C [-r resource] [-p path] [-u uninterpreted] [-g]
10
11
12 dhtadm -A -s symbol_name -d definition [-r resource]
13 [-p path] [-u uninterpreted] [-g]
14
15
16 dhtadm -A -m macro_name -d definition [-r resource]
17 [-p path] [-u uninterpreted] [-g]
18
19
20 dhtadm -M -s symbol_name -d definition [-r resource]
21 [-p path] [-u uninterpreted] [-g]
22
23
24 dhtadm -M -s symbol_name -n new_name [-r resource]
25 [-p path] [-u uninterpreted] [-g]
26
27
28 dhtadm -M -m macro_name -n new_name [-r resource] [-p path]
29 [-u uninterpreted] [-g]
30
31
32 dhtadm -M -m macro_name -d definition [-r resource]
33 [-p path] [-u uninterpreted] [-g]
34
35
36 dhtadm -M -m macro_name -e symbol=value [-r resource]
37 [-p path] [-u uninterpreted] [-g]
38
39
40 dhtadm -D -s symbol_name [-r resource] [-p path]
41 [-u uninterpreted] [-g]
42
43
44 dhtadm -D -m macro_name [-r resource] [-p path]
45 [-u uninterpreted] [-g]
46
47
48 dhtadm -P [-r resource] [-p path] [-u uninterpreted] [-g]
49
50
51 dhtadm -R [-r resource] [-p path] [-u uninterpreted] [-g]
52
53
54 dhtadm -B [-v] [batchfile] [-g]
55
56
58 dhtadm manages the Dynamic Host Configuration Protocol (DHCP) service
59 configuration table, dhcptab. You can use it to add, delete, or modify
60 DHCP configuration macros or options or view the table. For a descrip‐
61 tion of the table format, see dhcptab(4).)
62
63
64 The dhtadm command can be run by root, or by other users assigned to
65 the DHCP Management profile. See rbac(5) and user_attr(4).
66
67
68 After you make changes with dhtadm, you should issue a SIGHUP to the
69 DHCP server, causing it to read the dhcptab and pick up the changes. Do
70 this using the -g option.
71
73 One of the following function flags must be specified with the dhtadm
74 command: -A, -B, -C, -D, -M, -P or -R.
75
76
77 The following options are supported:
78
79 -A Add a symbol or macro definition to the
80 dhcptab table.
81
82 The following sub-options are required:
83
84 -d definition Specify a macro or symbol
85 definition.
86
87 definition must be
88 enclosed in single quota‐
89 tion marks. For macros,
90 use the form -d ':sym‐
91 bol=value:symbol=value:'.
92 Enclose a value that con‐
93 tains colons in double
94 quotation marks. For sym‐
95 bols, the definition is a
96 series of fields that
97 define a symbol's charac‐
98 teristics. The fields are
99 separated by commas. Use
100 the form -d 'con‐
101 text,code,type,granular‐
102 ity,maximum'. See
103 dhcptab(4) for information
104 about these fields.
105
106
107 -m macro_name Specify the name of the
108 macro to be added.
109
110 The -d option must be used
111 with the -m option. The -s
112 option cannot be used with
113 the -m option.
114
115
116 -s symbol_name Specify the name of the
117 symbol to be added.
118
119 The -d option must be used
120 with the -s option. The -m
121 option cannot be used with
122 the -s option.
123
124
125
126 -B Batch process dhtadm commands. dhtadm reads
127 from the specified file or from standard
128 input a series of dhtadm commands and exe‐
129 cute them within the same process. Process‐
130 ing many dhtadm commands using this method
131 is much faster than running an executable
132 batchfile itself. Batch mode is recommended
133 for using dhtadm in scripts.
134
135 The following sub-option is optional:
136
137 -v Display commands to standard output as
138 they are processed.
139
140
141
142 -C Create the DHCP service configuration table,
143 dhcptab.
144
145
146 -D Delete a symbol or macro definition.
147
148 The following sub-options are required:
149
150 -m macro_name Delete the specified
151 macro.
152
153
154 -s symbol_name Delete the specified sym‐
155 bol.
156
157
158
159 -g Signal the DHCP daemon to reload the dhcptab
160 after successful completion of the opera‐
161 tion.
162
163
164 -M Modify an existing symbol or macro defini‐
165 tion.
166
167 The following sub-options are required:
168
169 -d definition Specify a macro or symbol
170 definition to modify.
171
172 The definition must be
173 enclosed in single quota‐
174 tion marks. For macros, use
175 the form -d ':sym‐
176 bol=value:symbol=value:'.
177 Enclose a value that con‐
178 tains colons in double quo‐
179 tation marks. For symbols,
180 the definition is a series
181 of fields that define a
182 symbol's characteristics.
183 The fields are separated by
184 commas. Use the form -d
185 'context,code,type,granu‐
186 larity,maximum'. See
187 dhcptab(4) for information
188 about these fields.
189
190
191 -e This sub-option uses the
192 symbol =value argument. Use
193 it to edit a symbol/value
194 pair within a macro. To add
195 a symbol which does not
196 have an associate value,
197 enter:
198
199 symbol=_NULL_VALUE_
200
201
202 To delete a symbol defini‐
203 tion from a macro, enter:
204
205 symbol=
206
207
208
209
210 -m This sub-option uses the
211 macro_name argument. The
212 -n, -d, or -e sub-options
213 are legal companions for
214 this sub-option..
215
216
217 -n This sub-option uses the
218 new_name argument and modi‐
219 fies the name of the object
220 specified by the -m or -s
221 sub-option. It is not lim‐
222 ited to macros. . Use it to
223 specify a new macro name or
224 symbol name.
225
226
227 -s This sub-option uses the
228 symbol_name argument. Use
229 it to specify a symbol. The
230 -d sub-option is a legal
231 companion.
232
233
234
235 -p path Override the dhcpsvc.conf(4) configuration
236 value for PATH= with path. See
237 dhcpsvc.conf(4) for more details regarding
238 path. See dhcp_modules(5) for information
239 regarding data storage modules for the DHCP
240 service.
241
242
243 -P Print (display) the dhcptab table.
244
245
246 -r data_store_resource Override the dhcpsvc.conf(4) configuration
247 value for RESOURCE= with the
248 data_store_resource specified. See
249 dhcpsvc.conf(4) for more details on resource
250 type. See for more information about adding
251 support for other data stores. See dhcp_mod‐
252 ules(5) for information regarding data stor‐
253 age modules for the DHCP service.
254
255
256 -R Remove the dhcptab table.
257
258
259 -u uninterpreted Data which is ignored by dhtadm, but passed
260 to currently configured public module, to be
261 interpreted by the data store. The private
262 layer provides for module-specific configu‐
263 ration information through the use of the
264 RESOURCE_CONFIG keyword. Uninterpreted data
265 is stored within RESOURCE_CONFIG keyword of
266 dhcpsvc.conf(4). See dhcp_modules(5) for
267 information regarding data storage modules
268 for the DHCP service.
269
270
272 Example 1 Creating the DHCP Service Configuration Table
273
274
275 The following command creates the DHCP service configuration table,
276 dhcptab:
277
278
279 # dhtadm -C
280
281
282
283 Example 2 Adding a Symbol Definition
284
285
286 The following command adds a Vendor option symbol definition for a new
287 symbol called MySym to the dhcptab table in the SUNWfiles resource in
288 the /var/mydhcp directory:
289
290
291 # dhtadm -A -s MySym
292 -d 'Vendor=SUNW.PCW.LAN,20,IP,1,0'
293 -r SUNWfiles -p /var/mydhcp
294
295
296
297 Example 3 Adding a Macro Definition
298
299
300 The following command adds the aruba macro definition to the dhcptab
301 table. Note that symbol/value pairs are bracketed with colons (:).
302
303
304 # dhtadm -A -m aruba \
305 -d ':Timeserv=10.0.0.10 10.0.0.11:DNSserv=10.0.0.1:'
306
307
308
309 Example 4 Modifying a Macro Definition
310
311
312 The following command modifies the Locale macro definition, setting the
313 value of the UTCOffst symbol to 18000 seconds. Note that any macro def‐
314 inition which includes the definition of the Locale macro inherits this
315 change.
316
317
318 # dhtadm -M -m Locale -e 'UTCOffst=18000'
319
320
321
322 Example 5 Deleting a Symbol
323
324
325 The following command deletes the Timeserv symbol from the aruba macro.
326 Any macro definition which includes the definition of the aruba macro
327 inherits this change.
328
329
330 # dhtadm -M -m aruba -e 'Timeserv='
331
332
333
334 Example 6 Adding a Symbol to a Macro
335
336
337 The following command adds the Hostname symbol to the aruba macro. Note
338 that the Hostname symbol takes no value, and thus requires the special
339 value _NULL_VALUE_. Note also that any macro definition which includes
340 the definition of the aruba macro inherits this change.
341
342
343 # dhtadm -M -m aruba -e 'Hostname=_NULL_VALUE_'
344
345
346
347 Example 7 Renaming a Macro
348
349
350 The following command renames the Locale macro to MyLocale. Note that
351 any Include statements in macro definitions which include the Locale
352 macro also need to be changed.
353
354
355 # dhtadm -M -m Locale -n MyLocale
356
357
358
359 Example 8 Deleting a Symbol Definition
360
361
362 The following command deletes the MySym symbol definition. Note that
363 any macro definitions which use MySym needs to be modified.
364
365
366 # dhtadm -D -s MySym
367
368
369
370 Example 9 Removing a dhcptab
371
372
373 The following command removes the dhcptab table in the NIS+ directory
374 specified.
375
376
377 # dhtadm -R -r SUNWnisplus -p Test.Nis.Plus.
378
379
380
381 Example 10 Printing a dhcptab
382
383
384 The following command prints to standard output the contents of the
385 dhcptab that is located in the data store and path indicated in the
386 dhcpsvc.conf file:.
387
388
389 # dhtadm -P
390
391
392
393 Example 11 Executing dhtadm in Batch Mode
394
395
396 The following command runs a series of dhtadm commands contained in a
397 batch file and signals the daemon to reload the dhcptab once the com‐
398 mands have been executed: :
399
400
401 # dhtadm -B addmacros -g
402
403
404
406 0 Successful completion.
407
408
409 1 Object already exists.
410
411
412 2 Object does not exist.
413
414
415 3 Non-critical error.
416
417
418 4 Critical error.
419
420
422 /etc/inet/dhcpsvc.conf
423
424
426 See attributes(5) for descriptions of the following attributes:
427
428
429
430
431 ┌─────────────────────────────┬─────────────────────────────┐
432 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
433 ├─────────────────────────────┼─────────────────────────────┤
434 │Availability │SUNWdhcsu │
435 ├─────────────────────────────┼─────────────────────────────┤
436 │Interface Stability │Evolving │
437 └─────────────────────────────┴─────────────────────────────┘
438
440 dhcpconfig(1M), dhcpmgr(1M), in.dhcpd(1M), dhcpsvc.conf(4), dhcp_net‐
441 work(4), dhcptab(4), hosts(4), user_attr(4), attributes(5), dhcp(5),
442 dhcp_modules(5)rbac(5)
443
444
445
446
447
448
449
450
451 Alexander, S., and R. Droms, DHCP Options and BOOTP Vendor Extensions,
452 RFC 1533, Lachman Technology, Inc., Bucknell University, October 1993.
453
454
455 Droms, R., Interoperation Between DHCP and BOOTP, RFC 1534, Bucknell
456 University, October 1993.
457
458
459 Droms, R., Dynamic Host Configuration Protocol, RFC 1541, Bucknell Uni‐
460 versity, October 1993.
461
462
463 Wimer, W., Clarifications and Extensions for the Bootstrap Protocol,
464 RFC 1542, Carnegie Mellon University, October 1993.
465
466
467
468SunOS 5.11 28 Aug 2004 dhtadm(1M)