1 '\" te
   2 .\"  Copyright (c) 2002 by Sun Microsystems, Inc. All Rights Reserved.
   3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6 .TH DHTADM 1M "Aug 28, 2004"
   7 .SH NAME
   8 dhtadm \- DHCP configuration table management utility
   9 .SH SYNOPSIS
  10 .LP
  11 .nf
  12 \fBdhtadm\fR \fB-C\fR [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  13 .fi
  14 
  15 .LP
  16 .nf
  17 \fBdhtadm\fR \fB-A\fR \fB-s\fR \fIsymbol_name\fR \fB-d\fR \fIdefinition\fR [\fB-r\fR \fIresource\fR]
  18      [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  19 .fi
  20 
  21 .LP
  22 .nf
  23 \fBdhtadm\fR \fB-A\fR \fB-m\fR \fImacro_name\fR \fB-d\fR \fIdefinition\fR [\fB-r\fR \fIresource\fR]
  24      [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  25 .fi
  26 
  27 .LP
  28 .nf
  29 \fBdhtadm\fR \fB-M\fR \fB-s\fR \fIsymbol_name\fR \fB-d\fR \fIdefinition\fR [\fB-r\fR \fIresource\fR]
  30      [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  31 .fi
  32 
  33 .LP
  34 .nf
  35 \fBdhtadm\fR \fB-M\fR \fB-s\fR \fIsymbol_name\fR \fB-n\fR \fInew_name\fR [\fB-r\fR \fIresource\fR]
  36      [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  37 .fi
  38 
  39 .LP
  40 .nf
  41 \fBdhtadm\fR \fB-M\fR \fB-m\fR \fImacro_name\fR \fB-n\fR \fInew_name\fR [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR]
  42      [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  43 .fi
  44 
  45 .LP
  46 .nf
  47 \fBdhtadm\fR \fB-M\fR \fB-m\fR \fImacro_name\fR \fB-d\fR \fIdefinition\fR [\fB-r\fR \fIresource\fR]
  48      [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  49 .fi
  50 
  51 .LP
  52 .nf
  53 \fBdhtadm\fR \fB-M\fR \fB-m\fR \fImacro_name\fR \fB-e\fR \fIsymbol=value\fR [\fB-r\fR \fIresource\fR]
  54      [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  55 .fi
  56 
  57 .LP
  58 .nf
  59 \fBdhtadm\fR \fB-D\fR \fB-s\fR \fIsymbol_name\fR [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR]
  60      [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  61 .fi
  62 
  63 .LP
  64 .nf
  65 \fBdhtadm\fR \fB-D\fR \fB-m\fR \fImacro_name\fR [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR]
  66      [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  67 .fi
  68 
  69 .LP
  70 .nf
  71 \fBdhtadm\fR \fB-P\fR [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  72 .fi
  73 
  74 .LP
  75 .nf
  76 \fBdhtadm\fR \fB-R\fR [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] [\fB-g\fR]
  77 .fi
  78 
  79 .LP
  80 .nf
  81 \fBdhtadm\fR \fB-B\fR [\fB-v\fR] [\fIbatchfile\fR] [\fB-g\fR]
  82 .fi
  83 
  84 .SH DESCRIPTION
  85 .sp
  86 .LP
  87 \fBdhtadm\fR manages the Dynamic Host Configuration Protocol (\fBDHCP\fR)
  88 service configuration table, \fBdhcptab\fR. You can use it to add, delete, or
  89 modify \fBDHCP\fR configuration macros or options or view the table. For a
  90 description of the table format, see \fBdhcptab\fR(4).)
  91 .sp
  92 .LP
  93 The \fBdhtadm\fR command can be run by root, or by other users assigned to the
  94 DHCP Management profile. See \fBrbac\fR(5) and \fBuser_attr\fR(4).
  95 .sp
  96 .LP
  97 After you make changes with \fBdhtadm\fR, you should issue a \fBSIGHUP\fR to
  98 the DHCP server, causing it to read the \fBdhcptab\fR and pick up the changes.
  99 Do this using the \fB-g\fR option.
 100 .SH OPTIONS
 101 .sp
 102 .LP
 103 One of the following function flags must be specified with the \fBdhtadm\fR
 104 command: \fB-A\fR, \fB-B\fR, \fB-C\fR, \fB-D\fR, \fB-M\fR, \fB-P\fR or
 105 \fB-R\fR.
 106 .sp
 107 .LP
 108 The following options are supported:
 109 .sp
 110 .ne 2
 111 .na
 112 \fB\fB-A\fR \fR
 113 .ad
 114 .RS 27n
 115 Add a symbol or macro definition to the \fBdhcptab\fR table.
 116 .sp
 117 The following sub-options are required:
 118 .sp
 119 .ne 2
 120 .na
 121 \fB\fB-d\fR \fIdefinition\fR\fR
 122 .ad
 123 .RS 18n
 124 Specify a macro or symbol definition.
 125 .sp
 126 \fIdefinition\fR must be enclosed in single quotation marks. For macros, use
 127 the form \fB-d\fR
 128 \fB\&':\fIsymbol\fR=\fIvalue\fR:\fIsymbol\fR=\fIvalue\fR:'\fR. Enclose a
 129 \fIvalue\fR that contains colons in double quotation marks. For symbols, the
 130 definition is a series of fields that define a symbol's characteristics. The
 131 fields are separated by commas. Use the form \fB-d\fR
 132 \fB\&'\fIcontext\fR,\fIcode\fR,\fItype\fR,\fIgranularity\fR,\fImaximum\fR'\fR.
 133 See \fBdhcptab\fR(4) for information about these fields.
 134 .RE
 135 
 136 .sp
 137 .ne 2
 138 .na
 139 \fB\fB-m\fR \fImacro_name\fR\fR
 140 .ad
 141 .RS 18n
 142 Specify the name of the macro to be added.
 143 .sp
 144 The \fB-d\fR option must be used with the \fB-m\fR option. The \fB-s\fR option
 145 cannot be used with the \fB-m\fR option.
 146 .RE
 147 
 148 .sp
 149 .ne 2
 150 .na
 151 \fB\fB-s\fR \fIsymbol_name\fR\fR
 152 .ad
 153 .RS 18n
 154 Specify the name of the symbol to be added.
 155 .sp
 156 The \fB-d\fR option must be used with the \fB-s\fR option. The \fB-m\fR option
 157 cannot be used with the \fB-s\fR option.
 158 .RE
 159 
 160 .RE
 161 
 162 .sp
 163 .ne 2
 164 .na
 165 \fB\fB-B\fR\fR
 166 .ad
 167 .RS 27n
 168 Batch process \fBdhtadm\fR commands. \fBdhtadm\fR reads from the specified file
 169 or from standard input a series of \fBdhtadm\fR commands and execute them
 170 within the same process. Processing many \fBdhtadm\fR commands using this
 171 method is much faster than running an executable batchfile itself. Batch mode
 172 is recommended for using \fBdhtadm\fR in scripts.
 173 .sp
 174 The following sub-option is optional:
 175 .sp
 176 .ne 2
 177 .na
 178 \fB\fB-v\fR\fR
 179 .ad
 180 .RS 6n
 181 Display commands to standard output as they are processed.
 182 .RE
 183 
 184 .RE
 185 
 186 .sp
 187 .ne 2
 188 .na
 189 \fB\fB-C\fR \fR
 190 .ad
 191 .RS 27n
 192 Create the \fBDHCP\fR service configuration table, \fBdhcptab\fR.
 193 .RE
 194 
 195 .sp
 196 .ne 2
 197 .na
 198 \fB\fB-D\fR \fR
 199 .ad
 200 .RS 27n
 201 Delete a symbol or macro definition.
 202 .sp
 203 The following sub-options are required:
 204 .sp
 205 .ne 2
 206 .na
 207 \fB\fB-m\fR \fImacro_name\fR\fR
 208 .ad
 209 .RS 18n
 210 Delete the specified macro.
 211 .RE
 212 
 213 .sp
 214 .ne 2
 215 .na
 216 \fB\fB-s\fR \fIsymbol_name\fR\fR
 217 .ad
 218 .RS 18n
 219 Delete the specified symbol.
 220 .RE
 221 
 222 .RE
 223 
 224 .sp
 225 .ne 2
 226 .na
 227 \fB\fB-g\fR \fR
 228 .ad
 229 .RS 27n
 230 Signal the DHCP daemon to reload the \fBdhcptab\fR after successful completion
 231 of the operation.
 232 .RE
 233 
 234 .sp
 235 .ne 2
 236 .na
 237 \fB\fB-M\fR \fR
 238 .ad
 239 .RS 27n
 240 Modify an existing symbol or macro definition.
 241 .sp
 242 The following sub-options are required:
 243 .sp
 244 .ne 2
 245 .na
 246 \fB\fB-d\fR \fIdefinition\fR\fR
 247 .ad
 248 .RS 17n
 249 Specify a macro or symbol definition to modify.
 250 .sp
 251 The definition must be enclosed in single quotation marks. For macros, use the
 252 form \fB-d\fR \fB\&':\fIsymbol\fR=\fIvalue\fR:\fIsymbol\fR=\fIvalue\fR:'\fR.
 253 Enclose a \fIvalue\fR that contains colons in double quotation marks. For
 254 symbols, the definition is a series of fields that define a symbol's
 255 characteristics. The fields are separated by commas. Use the form \fB-d\fR
 256 \fB\&'\fIcontext\fR,\fIcode\fR,\fItype\fR,\fIgranularity\fR,\fImaximum\fR'\fR.
 257 See \fBdhcptab\fR(4) for information about these fields.
 258 .RE
 259 
 260 .sp
 261 .ne 2
 262 .na
 263 \fB\fB-e\fR\fR
 264 .ad
 265 .RS 17n
 266 This sub-option uses the \fIsymbol\fR \fB=\fR\fIvalue\fR argument. Use it to
 267 edit a \fIsymbol\fR/\fIvalue\fR pair within a macro. To add a symbol which does
 268 not have an associate value, enter:
 269 .sp
 270 .in +2
 271 .nf
 272 \fIsymbol\fR\fB=_NULL_VALUE_\fR
 273 .fi
 274 .in -2
 275 .sp
 276 
 277 To delete a symbol definition from a macro, enter:
 278 .sp
 279 .in +2
 280 .nf
 281 \fIsymbol\fR\fB=\fR
 282 .fi
 283 .in -2
 284 .sp
 285 
 286 .RE
 287 
 288 .sp
 289 .ne 2
 290 .na
 291 \fB\fB-m\fR\fR
 292 .ad
 293 .RS 17n
 294 This sub-option uses the \fImacro_name\fR argument. The \fB-n\fR, \fB-d\fR, or
 295 \fB-e\fR sub-options are legal companions for this sub-option..
 296 .RE
 297 
 298 .sp
 299 .ne 2
 300 .na
 301 \fB\fB-n\fR\fR
 302 .ad
 303 .RS 17n
 304 This sub-option uses the \fInew_name\fR argument and modifies the name of the
 305 object specified by the \fB-m\fR or \fB-s\fR sub-option. It is not limited to
 306 macros. . Use it to specify a new macro name or symbol name.
 307 .RE
 308 
 309 .sp
 310 .ne 2
 311 .na
 312 \fB\fB-s\fR\fR
 313 .ad
 314 .RS 17n
 315 This sub-option uses the \fIsymbol_name\fR argument. Use it to specify a
 316 symbol. The \fB-d\fR sub-option is a legal companion.
 317 .RE
 318 
 319 .RE
 320 
 321 .sp
 322 .ne 2
 323 .na
 324 \fB\fB-p\fR\fI path\fR \fR
 325 .ad
 326 .RS 27n
 327 Override the \fBdhcpsvc.conf\fR(4) configuration value for \fBPATH=\fR with
 328 \fIpath\fR. See \fBdhcpsvc.conf\fR(4) for more details regarding \fIpath\fR.
 329 See \fBdhcp_modules\fR(5) for information regarding data storage modules for
 330 the \fBDHCP\fR service.
 331 .RE
 332 
 333 .sp
 334 .ne 2
 335 .na
 336 \fB\fB-P\fR \fR
 337 .ad
 338 .RS 27n
 339 Print (display) the \fBdhcptab\fR table.
 340 .RE
 341 
 342 .sp
 343 .ne 2
 344 .na
 345 \fB\fB-r\fR\fI data_store_resource\fR \fR
 346 .ad
 347 .RS 27n
 348 Override the \fBdhcpsvc.conf\fR(4) configuration value for \fBRESOURCE=\fR with
 349 the \fIdata_store_resource\fR specified. See \fBdhcpsvc.conf\fR(4) for more
 350 details on resource type. See\fI\fR for more information about adding support
 351 for other data stores. See \fBdhcp_modules\fR(5) for information regarding data
 352 storage modules for the \fBDHCP\fR service.
 353 .RE
 354 
 355 .sp
 356 .ne 2
 357 .na
 358 \fB\fB-R\fR \fR
 359 .ad
 360 .RS 27n
 361 Remove the \fBdhcptab\fR table.
 362 .RE
 363 
 364 .sp
 365 .ne 2
 366 .na
 367 \fB\fB-u\fR\fI uninterpreted\fR\fR
 368 .ad
 369 .RS 27n
 370 Data which is ignored by \fBdhtadm\fR, but passed to currently configured
 371 public module, to be interpreted by the data store. The private layer provides
 372 for module-specific configuration information through the use of the
 373 \fBRESOURCE_CONFIG\fR keyword. Uninterpreted data is stored within
 374 \fBRESOURCE_CONFIG\fR keyword of \fBdhcpsvc.conf\fR(4). See
 375 \fBdhcp_modules\fR(5) for information regarding data storage modules for the
 376 DHCP service.
 377 .RE
 378 
 379 .SH EXAMPLES
 380 .LP
 381 \fBExample 1 \fRCreating the \fBDHCP\fR Service Configuration Table
 382 .sp
 383 .LP
 384 The following command creates the \fBDHCP\fR service configuration table,
 385 \fBdhcptab\fR:
 386 
 387 .sp
 388 .in +2
 389 .nf
 390 # dhtadm \fB-C\fR
 391 .fi
 392 .in -2
 393 .sp
 394 
 395 .LP
 396 \fBExample 2 \fRAdding a Symbol Definition
 397 .sp
 398 .LP
 399 The following command adds a \fBVendor\fR option symbol definition for a new
 400 symbol called \fBMySym\fR to the \fBdhcptab\fR table in the \fBSUNWfiles\fR
 401 resource in the \fB/var/mydhcp\fR directory:
 402 
 403 .sp
 404 .in +2
 405 .nf
 406 # dhtadm \fB-A\fR \fB-s\fR MySym
 407    \fB-d\fR 'Vendor=SUNW.PCW.LAN,20,IP,1,0'
 408    \fB-r\fR SUNWfiles \fB-p\fR /var/mydhcp
 409 .fi
 410 .in -2
 411 .sp
 412 
 413 .LP
 414 \fBExample 3 \fRAdding a Macro Definition
 415 .sp
 416 .LP
 417 The following command adds the \fBaruba\fR macro definition to the
 418 \fBdhcptab\fR table. Note that symbol/value pairs are bracketed with colons
 419 (\fB:\fR).
 420 
 421 .sp
 422 .in +2
 423 .nf
 424 # dhtadm \fB-A\fR \fB-m\fR aruba \e
 425      \fB-d\fR ':Timeserv=10.0.0.10 10.0.0.11:DNSserv=10.0.0.1:'
 426 .fi
 427 .in -2
 428 .sp
 429 
 430 .LP
 431 \fBExample 4 \fRModifying a Macro Definition
 432 .sp
 433 .LP
 434 The following command modifies the \fBLocale\fR macro definition, setting the
 435 value of the \fBUTCOffst\fR symbol to 18000 seconds. Note that any macro
 436 definition which includes the definition of the \fBLocale\fR macro inherits
 437 this change.
 438 
 439 .sp
 440 .in +2
 441 .nf
 442 # dhtadm \fB-M\fR \fB-m\fR Locale \fB-e\fR 'UTCOffst=18000'
 443 .fi
 444 .in -2
 445 .sp
 446 
 447 .LP
 448 \fBExample 5 \fRDeleting a Symbol
 449 .sp
 450 .LP
 451 The following command deletes the \fBTimeserv\fR symbol from the \fBaruba\fR
 452 macro. Any macro definition which includes the definition of the \fBaruba\fR
 453 macro inherits this change.
 454 
 455 .sp
 456 .in +2
 457 .nf
 458 # dhtadm \fB-M\fR \fB-m\fR aruba \fB-e\fR 'Timeserv='
 459 .fi
 460 .in -2
 461 .sp
 462 
 463 .LP
 464 \fBExample 6 \fRAdding a Symbol to a Macro
 465 .sp
 466 .LP
 467 The following command adds the \fBHostname\fR symbol to the \fBaruba\fR macro.
 468 Note that the \fBHostname\fR symbol takes no value, and thus requires the
 469 special value \fB_NULL_VALUE_\fR. Note also that any macro definition which
 470 includes the definition of the \fBaruba\fR macro inherits this change.
 471 
 472 .sp
 473 .in +2
 474 .nf
 475 # dhtadm \fB-M\fR \fB-m\fR aruba \fB-e\fR 'Hostname=_NULL_VALUE_'
 476 .fi
 477 .in -2
 478 .sp
 479 
 480 .LP
 481 \fBExample 7 \fRRenaming a Macro
 482 .sp
 483 .LP
 484 The following command renames the \fBLocale\fR macro to \fBMyLocale\fR. Note
 485 that any \fBInclude\fR statements in macro definitions which include the
 486 \fBLocale\fR macro also need to be changed.
 487 
 488 .sp
 489 .in +2
 490 .nf
 491 # dhtadm \fB-M\fR \fB-m\fR Locale \fB-n\fR MyLocale
 492 .fi
 493 .in -2
 494 .sp
 495 
 496 .LP
 497 \fBExample 8 \fRDeleting a Symbol Definition
 498 .sp
 499 .LP
 500 The following command deletes the \fBMySym\fR symbol definition. Note that any
 501 macro definitions which use \fBMySym\fR needs to be modified.
 502 
 503 .sp
 504 .in +2
 505 .nf
 506 # dhtadm \fB-D\fR \fB-s\fR MySym
 507 .fi
 508 .in -2
 509 .sp
 510 
 511 .LP
 512 \fBExample 9 \fRRemoving a dhcptab
 513 .sp
 514 .LP
 515 The following command removes the \fBdhcptab\fR table in the NIS+ directory
 516 specified.
 517 
 518 .sp
 519 .in +2
 520 .nf
 521 # dhtadm \fB-R\fR \fB-r\fR SUNWnisplus \fB-p\fR Test.Nis.Plus.
 522 .fi
 523 .in -2
 524 .sp
 525 
 526 .LP
 527 \fBExample 10 \fRPrinting a dhcptab
 528 .sp
 529 .LP
 530 The following command prints to standard output the contents of the
 531 \fBdhcptab\fR that is located in the data store and path indicated in the
 532 \fBdhcpsvc.conf\fR file:.
 533 
 534 .sp
 535 .in +2
 536 .nf
 537 # dhtadm \fB-P\fR
 538 .fi
 539 .in -2
 540 .sp
 541 
 542 .LP
 543 \fBExample 11 \fRExecuting dhtadm in Batch Mode
 544 .sp
 545 .LP
 546 The following command runs a series of \fBdhtadm\fR commands contained in a
 547 batch file and signals the daemon to reload the \fBdhcptab\fR once the commands
 548 have been executed: :
 549 
 550 .sp
 551 .in +2
 552 .nf
 553 # dhtadm -B addmacros -g
 554 .fi
 555 .in -2
 556 .sp
 557 
 558 .SH EXIT STATUS
 559 .sp
 560 .ne 2
 561 .na
 562 \fB\fB0\fR \fR
 563 .ad
 564 .RS 6n
 565 Successful completion.
 566 .RE
 567 
 568 .sp
 569 .ne 2
 570 .na
 571 \fB\fB1\fR \fR
 572 .ad
 573 .RS 6n
 574 Object already exists.
 575 .RE
 576 
 577 .sp
 578 .ne 2
 579 .na
 580 \fB\fB2\fR \fR
 581 .ad
 582 .RS 6n
 583 Object does not exist.
 584 .RE
 585 
 586 .sp
 587 .ne 2
 588 .na
 589 \fB\fB3\fR \fR
 590 .ad
 591 .RS 6n
 592 Non-critical error.
 593 .RE
 594 
 595 .sp
 596 .ne 2
 597 .na
 598 \fB\fB4\fR \fR
 599 .ad
 600 .RS 6n
 601 Critical error.
 602 .RE
 603 
 604 .SH FILES
 605 .sp
 606 .ne 2
 607 .na
 608 \fB\fB/etc/inet/dhcpsvc.conf\fR \fR
 609 .ad
 610 .RS 27n
 611 
 612 .RE
 613 
 614 .SH ATTRIBUTES
 615 .sp
 616 .LP
 617 See \fBattributes\fR(5) for descriptions of the following attributes:
 618 .sp
 619 
 620 .sp
 621 .TS
 622 box;
 623 c | c
 624 l | l .
 625 ATTRIBUTE TYPE  ATTRIBUTE VALUE
 626 _
 627 Interface Stability     Evolving
 628 .TE
 629 
 630 .SH SEE ALSO
 631 .sp
 632 .LP
 633 \fBdhcpconfig\fR(1M), \fBdhcpmgr\fR(1M), \fBin.dhcpd\fR(1M),
 634 \fBdhcpsvc.conf\fR(4), \fBdhcp_network\fR(4), \fBdhcptab\fR(4), \fBhosts\fR(4),
 635 \fBuser_attr\fR(4), \fBattributes\fR(5), \fBdhcp\fR(5),
 636 \fBdhcp_modules\fR(5)\fBrbac\fR(5)
 637 .sp
 638 .LP
 639 \fI\fR
 640 .sp
 641 .LP
 642 \fI\fR
 643 .sp
 644 .LP
 645 Alexander, S., and R. Droms, \fIDHCP Options and BOOTP Vendor Extensions\fR,
 646 RFC 1533, Lachman Technology, Inc., Bucknell University, October 1993.
 647 .sp
 648 .LP
 649 Droms, R., \fIInteroperation Between DHCP and BOOTP\fR, RFC 1534, Bucknell
 650 University, October 1993.
 651 .sp
 652 .LP
 653 Droms, R., \fIDynamic Host Configuration Protocol\fR, RFC 1541, Bucknell
 654 University, October 1993.
 655 .sp
 656 .LP
 657 Wimer, W., \fIClarifications and Extensions for the Bootstrap Protocol\fR, RFC
 658 1542, Carnegie Mellon University, October 1993.