1 '\" te 2 .\" Copyright (c) 2003 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 PNTADM 1M "Jan 9, 2004" 7 .SH NAME 8 pntadm \- DHCP network table management utility 9 .SH SYNOPSIS 10 .LP 11 .nf 12 \fBpntadm\fR \fB-C\fR [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] \fInetwork\fR 13 .fi 14 15 .LP 16 .nf 17 \fBpntadm\fR \fB-A\fR \fIname_IP_address\fR [\fB-c\fR \fIcomment\fR] [\fB-e\fR \fImm/dd/yyyy\fR] 18 [\fB-f\fR \fInum\fR | \fIkeywords\fR] [\fB-h\fR \fIclient_hostname\fR] 19 [\fB-i\fR [\fB-a\fR] \fIclient_ID\fR] [\fB-m\fR [\fB-y\fR] \fImacro\fR] [\fB-s\fR \fIserver\fR] 20 [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR] [\fB-u\fR \fIuninterpreted\fR] \fInetwork\fR 21 .fi 22 23 .LP 24 .nf 25 \fBpntadm\fR \fB-M\fR \fIname_IP_address\fR [\fB-c\fR \fIcomment\fR] [\fB-e\fR \fImm/dd/yyyy\fR] 26 [\fB-f\fR \fInum\fR | \fIkeywords\fR] [\fB-h\fR \fIclient_hostname\fR] 27 [\fB-i\fR [\fB-a\fR] \fIclient\fR \fI ID\fR] [\fB-m\fR [\fB-y\fR] \fImacro\fR] 28 [\fB-n\fR \fInew_client_IP_address\fR] [\fB-s\fR \fIserver\fR] [\fB-r\fR \fIresource\fR] 29 [\fB-p\fR \fIpath\fR] [\fB-u\fR uninterpreted] \fInetwork\fR 30 .fi 31 32 .LP 33 .nf 34 \fBpntadm\fR \fB-D\fR \fIname_IP_address\fR [\fB-y\fR] [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR] 35 [\fB-u\fR uninterpreted] \fInetwork\fR 36 .fi 37 38 .LP 39 .nf 40 \fBpntadm\fR \fB-P\fR [\fB-v\fR] [\fB-x\fR] [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR] 41 [\fB-u\fR uninterpreted] \fInetwork\fR 42 .fi 43 44 .LP 45 .nf 46 \fBpntadm\fR \fB-R\fR [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR] [\fB-u\fR uninterpreted] \fInetwork\fR 47 .fi 48 49 .LP 50 .nf 51 \fBpntadm\fR \fB-L\fR [\fB-r\fR \fIresource\fR] [\fB-p\fR \fIpath\fR] [\fB-u\fR uninterpreted] 52 .fi 53 54 .LP 55 .nf 56 \fBpntadm\fR \fB-B\fR [\fB-v\fR] [\fIbatchfile\fR] 57 .fi 58 59 .SH DESCRIPTION 60 .sp 61 .LP 62 The \fBpntadm\fR command is used to manage the Dynamic Host Configuration 63 Protocol (\fBDHCP\fR) network tables. It is used to add and remove networks 64 under \fBDHCP\fR management, and add, delete, or modify IP address records 65 within network tables, or to view tables. For a description of the format of 66 \fBDHCP\fR network tables, see \fBdhcp_network\fR(4). 67 .sp 68 .LP 69 \fBpntadm\fR can be run as root or by other users assigned to the \fBDHCP\fR 70 Management profile. See \fBrbac\fR(5) and \fBuser_attr\fR(4). 71 .sp 72 .LP 73 If the networks you want to add are subnetted, you need to update the 74 \fBnetmasks\fR(4) table. 75 .sp 76 .LP 77 One of the following options (function flags) must be specified with the 78 \fBpntadm\fR command: \fB-A\fR, \fB-B\fR, \fB-C\fR, \fB-D\fR, \fB-L\fR, 79 \fB-M\fR, \fB-P\fR, or\fB-R\fR. 80 .SH OPTIONS 81 .sp 82 .LP 83 The following options are supported: 84 .sp 85 .ne 2 86 .na 87 \fB\fB-A\fR\fI name_IP_address\fR\fR 88 .ad 89 .RS 26n 90 Add a client entry with hostname or client IP address, \fIname_IP_address\fR, 91 to the named \fBDHCP\fR network table. 92 .sp 93 The following sub-options are optional: 94 .sp 95 .ne 2 96 .na 97 \fB\fB-c\fR \fIcomment\fR\fR 98 .ad 99 .RS 22n 100 Comment text. The default is \fINULL\fR. 101 .RE 102 103 .sp 104 .ne 2 105 .na 106 \fB\fB-e\fR \fImm/dd/yyyy\fR\fR 107 .ad 108 .RS 22n 109 Absolute lease. The default is \fB0\fR. 110 .RE 111 112 .sp 113 .ne 2 114 .na 115 \fB\fB-f\fR \fInum\fR | \fIkeywords\fR\fR 116 .ad 117 .RS 22n 118 Flag value. The default is \fB00\fR. 119 .sp 120 The flag (\fB-f\fR) option can be specified either as a single number denoting 121 the intended flag value, or as a series of the following keywords, combined 122 using the plus (\fB+\fR) symbol: 123 .sp 124 .ne 2 125 .na 126 \fB\fBDYNAMIC\fR or \fB00\fR\fR 127 .ad 128 .RS 19n 129 Server manager's assignment. 130 .RE 131 132 .sp 133 .ne 2 134 .na 135 \fB\fBPERMANENT\fR or \fB01\fR\fR 136 .ad 137 .RS 19n 138 Lease on entry is permanent. 139 .RE 140 141 .sp 142 .ne 2 143 .na 144 \fB\fBMANUAL\fR or \fB02\fR\fR 145 .ad 146 .RS 19n 147 Administrator managed assignment. 148 .RE 149 150 .sp 151 .ne 2 152 .na 153 \fB\fBUNUSABLE\fR or \fB04\fR\fR 154 .ad 155 .RS 19n 156 Entry is not valid. 157 .RE 158 159 .sp 160 .ne 2 161 .na 162 \fB\fBBOOTP\fR or \fB08\fR\fR 163 .ad 164 .RS 19n 165 Entry reserved for \fBBOOTP\fR clients. 166 .RE 167 168 For a more detailed description of the flag values, see \fBdhcp_network\fR(4). 169 .RE 170 171 .sp 172 .ne 2 173 .na 174 \fB\fB-h\fR \fIclient_hostname\fR\fR 175 .ad 176 .RS 22n 177 Client hostname. The default is NULL. 178 .sp 179 When the \fB-h\fR option is used in this mode, the \fIclient_hostname\fR is 180 added to the hosts table within the resource used for storing host names 181 (files, NIS+ or DNS). The command will fail if this \fIclient_hostname\fR is 182 already present in the hosts table. 183 .RE 184 185 .sp 186 .ne 2 187 .na 188 \fB\fB-i\fR \fIclient_ID\fR [\fB-a\fR]\fR 189 .ad 190 .RS 22n 191 Client identifier [\fB-a\fR]. The default is \fB00\fR. 192 .sp 193 The \fB-i\fR option modified with \fB-a\fR specifies that the client identifier 194 is in \fBASCII\fR format, and thus needs to be converted to hexadecimal format 195 before insertion into the table. 196 .RE 197 198 .sp 199 .ne 2 200 .na 201 \fB\fB-m\fR \fImacro\fR [\fB-y\fR]\fR 202 .ad 203 .RS 22n 204 Macro name. Default is UNKNOWN. 205 .sp 206 The \fB-m\fR option modified with \fB-y\fR verifies the existence of the named 207 macro in the \fBdhcptab\fR table before adding the entry. 208 .RE 209 210 .sp 211 .ne 2 212 .na 213 \fB\fB-s\fR \fIserver\fR\fR 214 .ad 215 .RS 22n 216 Server IP or name. Default is system name (\fBuname\fR \fB-n\fR). 217 .RE 218 219 .RE 220 221 .sp 222 .ne 2 223 .na 224 \fB\fB-B\fR\fR 225 .ad 226 .RS 26n 227 Activate batch mode. \fBpntadm\fR will read from the specified file or from 228 standard input a series of \fBpntadm\fR commands and execute them within the 229 same process. Processing many \fBpntadm\fR commands using this method is much 230 faster than running an executable batchfile itself. Batch mode is recommended 231 for using \fBpntadm\fR in scripts. 232 .sp 233 The following sub-option is optional: 234 .sp 235 .ne 2 236 .na 237 \fB\fB-v\fR\fR 238 .ad 239 .RS 6n 240 Display commands to standard output as they are processed. 241 .RE 242 243 .RE 244 245 .sp 246 .ne 2 247 .na 248 \fB\fB-C\fR\fR 249 .ad 250 .RS 26n 251 Create the \fBDHCP\fR network table for the network specified by \fInetwork\fR. 252 See . For details, see \fBdhcp_network\fR(4) and \fBnetworks\fR(4). 253 .RE 254 255 .sp 256 .ne 2 257 .na 258 \fB\fB-D\fR \fI name_IP_address\fR\fR 259 .ad 260 .RS 26n 261 Delete the specified client entry with hostname or client IP address, 262 \fIname_IP_address\fR, in the named \fBDHCP\fR network table. (See 263 \fBdhcp_network\fR(4).) 264 .sp 265 The following sub-option is optional: 266 .sp 267 .ne 2 268 .na 269 \fB\fB-y\fR\fR 270 .ad 271 .RS 6n 272 Remove associated host table entry. The \fB-y\fR option requests that all 273 hostnames associated with the \fBIP\fR address in the hosts table in the 274 resource be removed. 275 .RE 276 277 .RE 278 279 .sp 280 .ne 2 281 .na 282 \fB\fB-L\fR\fR 283 .ad 284 .RS 26n 285 List the \fBDHCP\fR network tables presently configured, one per line, on 286 standard output. If none are found, no output is printed and an exit status of 287 \fB0\fR is returned. 288 .RE 289 290 .sp 291 .ne 2 292 .na 293 \fB\fB-M\fR \fI name_IP_address\fR\fR 294 .ad 295 .RS 26n 296 Modify the specified client entry with hostname or client IP address, 297 \fIname_IP_address\fR, in the named \fBDHCP\fR network table. See 298 \fBdhcp_network\fR(4). The default for the sub-options is what they currently 299 are set to. 300 .sp 301 The following sub-options are optional. 302 .sp 303 .ne 2 304 .na 305 \fB\fB-c\fR \fIcomment\fR\fR 306 .ad 307 .RS 29n 308 New comment text. 309 .RE 310 311 .sp 312 .ne 2 313 .na 314 \fB\fB-e\fR \fImm/dd/yy\fR\fR 315 .ad 316 .RS 29n 317 New absolute lease expiration date. Time defaults to 12:00 AM of the day 318 specified. 319 .RE 320 321 .sp 322 .ne 2 323 .na 324 \fB\fB-f\fR \fInum\fR | \fIkeyboard\fR\fR 325 .ad 326 .RS 29n 327 New flag value, see explanation following the description of the \fB-A\fR 328 option. 329 .RE 330 331 .sp 332 .ne 2 333 .na 334 \fB\fB-h\fR \fIhost_name\fR\fR 335 .ad 336 .RS 29n 337 New client hostname. 338 .sp 339 The \fB-h\fR option allows you to change the current \fIhostname\fR associated 340 with the \fBIP\fR address or to add a new \fIhostname\fR to the hosts table if 341 an entry associated with this \fBIP\fR address does not exist. 342 .RE 343 344 .sp 345 .ne 2 346 .na 347 \fB\fB-i\fR \fIclient_ID\fR\fR 348 .ad 349 .RS 29n 350 New client identifier [\fB-a\fR]. 351 .RE 352 353 .sp 354 .ne 2 355 .na 356 \fB\fB-m\fR \fImacro\fR [\fB-y\fR]\fR 357 .ad 358 .RS 29n 359 Macro name defined in \fBdhcptab\fR. 360 .RE 361 362 .sp 363 .ne 2 364 .na 365 \fB\fB-n \fR \fInew_client_IP_address\fR\fR 366 .ad 367 .RS 29n 368 New \fBIP\fR address. 369 .RE 370 371 .sp 372 .ne 2 373 .na 374 \fB\fB-s\fR \fIserver\fR\fR 375 .ad 376 .RS 29n 377 New server \fBIP\fR or name. 378 .RE 379 380 For more detailed description of the sub-options and flag values, see 381 \fBdhcp_network\fR(4). 382 .RE 383 384 .sp 385 .ne 2 386 .na 387 \fB\fB-P\fR\fR 388 .ad 389 .RS 26n 390 Display the named \fBDHCP\fR network table. 391 .sp 392 The following sub-options are optional: 393 .sp 394 .ne 2 395 .na 396 \fB\fB-v\fR\fR 397 .ad 398 .RS 6n 399 Display lease time in full verbose format and resolve IP addresses for the 400 clients and server to hostnames. 401 .RE 402 403 .sp 404 .ne 2 405 .na 406 \fB\fB-x\fR\fR 407 .ad 408 .RS 6n 409 Display lease time in raw format. 410 .RE 411 412 These flag codes are used with the \fB-P\fR sub-options: 413 .sp 414 415 .sp 416 .TS 417 l l l 418 l l l . 419 \fB-v\fR \fB-x\fR Description 420 D 00 DYNAMIC 421 P 01 PERMANENT 422 M 02 MANUAL 423 U 04 UNUSABLE 424 B 08 BOOTP 425 .TE 426 427 See \fBdhcp_network\fR(4) for information on these sub-options and associated 428 flag codes. 429 .RE 430 431 .sp 432 .ne 2 433 .na 434 \fB\fB-p\fR\fI path\fR\fR 435 .ad 436 .RS 26n 437 Override the \fBdhcpsvc.conf\fR(4) configuration value for data store resource 438 path, \fIpath\fR See \fBdhcpsvc.conf\fR(4) 439 .RE 440 441 .sp 442 .ne 2 443 .na 444 \fB\fB-R\fR\fR 445 .ad 446 .RS 26n 447 Remove the named DHCP network table. See \fBdhcp_network\fR(4). 448 .RE 449 450 .sp 451 .ne 2 452 .na 453 \fB\fB-r\fR \fIdata_store_resource\fR\fR 454 .ad 455 .RS 26n 456 Override the \fB/etc/inet/dhcpsvc.conf\fR configuration value for 457 \fBRESOURCE=\fR with the \fIdata_store_resource\fR specified. See the 458 \fBdhcpsvc.conf\fR(4) man page for more details on resource type, and the 459 \fI\fR for more information about adding support for other data stores. 460 .RE 461 462 .sp 463 .ne 2 464 .na 465 \fB\fB-u\fR uninterpreted\fR 466 .ad 467 .RS 26n 468 Data which will be ignored by \fBpntadm\fR, but passed to the currently 469 configured public module to be interpreted by the data store. This might be 470 used for a database account name or other authentication or authorization 471 parameters required by a particular data store. 472 .RE 473 474 .SH OPERANDS 475 .sp 476 .LP 477 The following operand is supported: 478 .sp 479 .ne 2 480 .na 481 \fB\fInetwork\fR\fR 482 .ad 483 .RS 11n 484 The network address or network name which corresponds to the \fBdhcp network\fR 485 table. See \fBdhcp_network\fR(4). 486 .RE 487 488 .SH EXAMPLES 489 .LP 490 \fBExample 1 \fRCreating a Table for the \fB10.0.0.0\fR DHCP Network 491 .sp 492 .LP 493 The following command creates a table for the \fB10.0.0.0\fR (subnetted to 494 class C) \fBDHCP\fR network table. Note that if you have an alias for this 495 network in your \fBnetworks\fR(4) table, you can use that value rather than the 496 dotted Internet Address notation. 497 498 .sp 499 .in +2 500 .nf 501 example# \fBpntadm -C 10.0.0.0\fR 502 .fi 503 .in -2 504 .sp 505 506 .LP 507 \fBExample 2 \fRAdding an Entry to the \fB10.0.0.0\fR Table 508 .sp 509 .LP 510 The following command adds an entry to the \fB10.0.0.0\fR table in the 511 \fBfiles\fR resource in the \fB/var/mydhcp\fR directory: 512 513 .sp 514 .in +2 515 .nf 516 example# \fBpntadm -r SUNWfiles -p /var/mydhcp -A 10.0.0.1 10.0.0.0\fR 517 .fi 518 .in -2 519 .sp 520 521 .LP 522 \fBExample 3 \fRModifying the \fB10.0.0.1\fR Entry of the \fB10.0.0.0\fR Table 523 .sp 524 .LP 525 The following command modifies the \fB10.0.0.1\fR entry of the \fB10.0.0.0\fR 526 table, changing the macro name to \fBGreen\fR, setting the flags field to 527 \fBMANUAL\fR and \fBPERMANENT:\fR 528 529 .sp 530 .in +2 531 .nf 532 example# \fBpntadm -M 10.0.0.1 -m Green -f 'PERMANENT+MANUAL' 10.0.0.0\fR 533 .fi 534 .in -2 535 .sp 536 537 .LP 538 \fBExample 4 \fRChanging the \fB10.0.0.1\fR Entry to \fB10.0.0.2\fR 539 .sp 540 .LP 541 The following command changes the \fB10.0.0.1\fR entry to \fB10.0.0.2\fR, 542 making an entry in the \fBhosts\fR(4) table called \fBmyclient\fR: 543 544 .sp 545 .in +2 546 .nf 547 example# \fBpntadm -M 10.0.0.1 -n 10.0.0.2 -h myclient 10.0.0.0\fR 548 .fi 549 .in -2 550 .sp 551 552 .LP 553 \fBExample 5 \fRSetting the Client \fBID\fR as \fBASCII\fR 554 .sp 555 .LP 556 The following command sets the client \fBID\fR as \fBASCII\fR 557 \fBaruba.foo.com\fR for the \fBmyclient\fR entry: 558 559 .sp 560 .in +2 561 .nf 562 example# \fBpntadm -M myclient -i 'aruba.foo.com' -a 10.0.0.0\fR 563 .fi 564 .in -2 565 .sp 566 567 .LP 568 \fBExample 6 \fRDeleting the \fBmyclient\fREntry from the \fB10.0.0.0\fR Table 569 .sp 570 .LP 571 The following command deletes the \fBmyclient\fR (\fB10.0.0.2\fR) entry from 572 the \fB10.0.0.0\fR table: 573 574 .sp 575 .in +2 576 .nf 577 example# \fBpntadm -D myclient 10.0.0.0\fR 578 .fi 579 .in -2 580 .sp 581 582 .LP 583 \fBExample 7 \fRRemoving the Named DHCP Network Table 584 .sp 585 .LP 586 The following command removes the named \fBDHCP\fR network table in the NIS+ 587 directory specified: 588 589 .sp 590 .in +2 591 .nf 592 example# \fBpntadm -r SUNWnisplus -p Test.Nis.Plus. -R 10.0.0.0\fR 593 .fi 594 .in -2 595 .sp 596 597 .LP 598 \fBExample 8 \fRListing the Configured DHCP Network Tables 599 .sp 600 .LP 601 The following command lists the configured DHCP network tables: 602 603 .sp 604 .in +2 605 .nf 606 example# \fBpntadm -L\fR 607 192.168.0.0 608 10.0.0.0 609 .fi 610 .in -2 611 .sp 612 613 .LP 614 \fBExample 9 \fRExecuting \fBpntadm\fR Commands in Batch Mode 615 .sp 616 .LP 617 The following command runs a series of \fBpntadm\fR commands contained in a 618 batch file: 619 620 .sp 621 .in +2 622 .nf 623 example# \fBpntadm -B addclients\fR 624 .fi 625 .in -2 626 .sp 627 628 .SH EXIT STATUS 629 .sp 630 .ne 2 631 .na 632 \fB\fB0\fR\fR 633 .ad 634 .RS 5n 635 Successful completion. 636 .RE 637 638 .sp 639 .ne 2 640 .na 641 \fB\fB1\fR\fR 642 .ad 643 .RS 5n 644 Object already exists. 645 .RE 646 647 .sp 648 .ne 2 649 .na 650 \fB\fB2\fR\fR 651 .ad 652 .RS 5n 653 Object does not exist. 654 .RE 655 656 .sp 657 .ne 2 658 .na 659 \fB\fB3\fR\fR 660 .ad 661 .RS 5n 662 Non-critical error. 663 .RE 664 665 .sp 666 .ne 2 667 .na 668 \fB\fB4\fR\fR 669 .ad 670 .RS 5n 671 Critical error. 672 .RE 673 674 .SH FILES 675 .sp 676 .ne 2 677 .na 678 \fB\fB/etc/inet/dhcpsvc.conf\fR\fR 679 .ad 680 .RS 26n 681 682 .RE 683 684 .sp 685 .ne 2 686 .na 687 \fB\fB/etc/inet/hosts\fR\fR 688 .ad 689 .RS 26n 690 691 .RE 692 693 .SH ATTRIBUTES 694 .sp 695 .LP 696 See \fBattributes\fR(5) for descriptions of the following attributes: 697 .sp 698 699 .sp 700 .TS 701 box; 702 c | c 703 l | l . 704 ATTRIBUTE TYPE ATTRIBUTE VALUE 705 _ 706 Interface Stability Evolving 707 .TE 708 709 .SH SEE ALSO 710 .sp 711 .LP 712 \fBdhcpconfig\fR(1M), \fBdhcpmgr\fR(1M), \fBdhcp_network\fR(4), , 713 \fBdhcpsvc.conf\fR(4), \fBdhcptab\fR(4), \fBhosts\fR(4), \fBnetmasks\fR(4), 714 \fBnetworks\fR(4), \fBuser_attr\fR(4), \fBattributes\fR(5), \fBdhcp\fR(5), 715 \fBdhcp_modules\fR(5), \fBrbac\fR(5) 716 .sp 717 .LP 718 \fI\fR 719 .sp 720 .LP 721 \fI\fR 722 .sp 723 .LP 724 Alexander, S., and R. Droms, \fIDHCP Options and BOOTP Vendor Extensions\fR, 725 RFC 1533, Lachman Technology, Inc., Bucknell University, October 1993. 726 .sp 727 .LP 728 Droms, R., \fIInteroperation Between DHCP and BOOTP\fR, RFC 1534, Bucknell 729 University, October 1993. 730 .sp 731 .LP 732 Droms, R., \fIDynamic Host Configuration Protocol\fR, RFC 1541, Bucknell 733 University, October 1993. 734 .sp 735 .LP 736 Wimer, W., \fIClarifications and Extensions for the Bootstrap Protocol\fR, RFC 737 1542, Carnegie Mellon University, October 1993.