- DHCP network table management utility
pntadm -C [-r resource] [-p path] [-u uninterpreted] network
pntadm -A name_IP_address [-c comment] [-e mm/dd/yyyy] [-f num | keywords] [-h client_hostname] [-i [-a] client_ID] [-m [-y] macro] [-s server] [-r resource] [-p path] [-u uninterpreted] network
pntadm -M name_IP_address [-c comment] [-e mm/dd/yyyy] [-f num | keywords] [-h client_hostname] [-i [-a] client ID] [-m [-y] macro] [-n new_client_IP_address] [-s server] [-r resource] [-p path] [-u uninterpreted] network
pntadm -D name_IP_address [-y] [-r resource] [-p path] [-u uninterpreted] network
pntadm -P [-v] [-x] [-r resource] [-p path] [-u uninterpreted] network
pntadm -R [-r resource] [-p path] [-u uninterpreted] network
pntadm -L [-r resource] [-p path] [-u uninterpreted]
pntadm -B [-v] [batchfile]
The pntadm command is used to manage the Dynamic Host Configuration Protocol (DHCP) network tables. It is used to add and remove networks under DHCP management, and add, delete, or modify IP address records within network tables, or to view tables. For a description of the format of DHCP network tables, see dhcp_network(4).
If the networks you want to add are subnetted, you need to update the netmasks(4) table.
One of the following options (function flags) must be specified with the pntadm command: -A, -B, -C, -D, -L, -M, -P, or-R.
The pntadm utility is obsolete and is subject to removal in a future release of Oracle Solaris.
The following options are supported:
Add a client entry with hostname or client IP address, name_IP_address, to the named DHCP network table.
The following sub-options are optional:
Comment text. The default is NULL.
Absolute lease. The default is 0.
Flag value. The default is 00.
The flag (-f) option can be specified either as a single number denoting the intended flag value, or as a series of the following keywords, combined using the plus (+) symbol:
Server manager's assignment.
Lease on entry is permanent.
Administrator managed assignment.
Entry is not valid.
Entry reserved for BOOTP clients.
For a more detailed description of the flag values, see dhcp_network(4).
Client hostname. The default is NULL.
When the -h option is used in this mode, the client_hostname is added to the hosts table within the resource used for storing host names (files or DNS). The command will fail if this client_hostname is already present in the hosts table.
Client identifier [-a]. The default is 00.
The -i option modified with -a specifies that the client identifier is in ASCII format, and thus needs to be converted to hexadecimal format before insertion into the table.
Macro name. Default is UNKNOWN.
The -m option modified with -y verifies the existence of the named macro in the dhcptab table before adding the entry.
Server IP or name. Default is system name (uname -n).
Activate batch mode. pntadm will read from the specified file or from standard input a series of pntadm commands and execute them within the same process. Processing many pntadm commands using this method is much faster than running an executable batchfile itself. Batch mode is recommended for using pntadm in scripts.
The following sub-option is optional:
Display commands to standard output as they are processed.
Delete the specified client entry with hostname or client IP address, name_IP_address, in the named DHCP network table. (See dhcp_network(4).)
The following sub-option is optional:
Remove associated host table entry. The -y option requests that all hostnames associated with the IP address in the hosts table in the resource be removed.
List the DHCP network tables presently configured, one per line, on standard output. If none are found, no output is printed and an exit status of 0 is returned.
Modify the specified client entry with hostname or client IP address, name_IP_address, in the named DHCP network table. See dhcp_network(4). The default for the sub-options is what they currently are set to.
The following sub-options are optional.
New comment text.
New absolute lease expiration date. Time defaults to 12:00 AM of the day specified.
New flag value, see explanation following the description of the -A option.
New client hostname.
The -h option allows you to change the current hostname associated with the IP address or to add a new hostname to the hosts table if an entry associated with this IP address does not exist.
New client identifier [-a].
Macro name defined in dhcptab.
New IP address.
New server IP or name.
For more detailed description of the sub-options and flag values, see dhcp_network(4).
Display the named DHCP network table.
The following sub-options are optional:
Display lease time in full verbose format and resolve IP addresses for the clients and server to hostnames.
Display lease time in raw format.
These flag codes are used with the -P sub-options:
See dhcp_network(4) for information on these sub-options and associated flag codes.
Remove the named DHCP network table. See dhcp_network(4).
Override the /etc/inet/dhcpsvc.conf configuration value for RESOURCE= with the data_store_resource specified. See the dhcpsvc.conf(4) man page for more details on resource type, and the 《Oracle Solaris DHCP Service Developer’s Guide》 for more information about adding support for other data stores.
Data which will be ignored by pntadm, but passed to the currently configured public module to be interpreted by the data store. This might be used for a database account name or other authentication or authorization parameters required by a particular data store.
The following operand is supported:
The network address or network name which corresponds to the dhcp network table. See dhcp_network(4).
示例 1 Creating a Table for the 10.0.0.0 DHCP Network
The following command creates a table for the 10.0.0.0 (subnetted to class C) DHCP network table. Note that if you have an alias for this network in your networks(4) table, you can use that value rather than the dotted Internet Address notation.
example# pntadm -C 10.0.0.0
示例 2 Adding an Entry to the 10.0.0.0 Table
The following command adds an entry to the 10.0.0.0 table in the files resource in the /var/mydhcp directory:
example# pntadm -r SUNWfiles -p /var/mydhcp -A 10.0.0.1 10.0.0.0
示例 3 Modifying the 10.0.0.1 Entry of the 10.0.0.0 Table
The following command modifies the 10.0.0.1 entry of the 10.0.0.0 table, changing the macro name to Green, setting the flags field to MANUAL and PERMANENT:
example# pntadm -M 10.0.0.1 -m Green -f 'PERMANENT+MANUAL' 10.0.0.0
示例 4 Changing the 10.0.0.1 Entry to 10.0.0.2
The following command changes the 10.0.0.1 entry to 10.0.0.2, making an entry in the hosts(4) table called myclient:
example# pntadm -M 10.0.0.1 -n 10.0.0.2 -h myclient 10.0.0.0
示例 5 Setting the Client ID as ASCII
The following command sets the client ID as ASCII aruba.foo.com for the myclient entry:
example# pntadm -M myclient -i 'aruba.foo.com' -a 10.0.0.0
示例 6 Deleting the myclientEntry from the 10.0.0.0 Table
The following command deletes the myclient (10.0.0.2) entry from the 10.0.0.0 table:
example# pntadm -D myclient 10.0.0.0
示例 7 Listing the Configured DHCP Network Tables
The following command lists the configured DHCP network tables:
example# pntadm -L 192.168.0.0 10.0.0.0
示例 8 Executing pntadm Commands in Batch Mode
The following command runs a series of pntadm commands contained in a batch file:
example# pntadm -B addclients
Object already exists.
Object does not exist.
See attributes(5) for descriptions of the following attributes:
Alexander, S., and R. Droms, DHCP Options and BOOTP Vendor Extensions, RFC 1533, Lachman Technology, Inc., Bucknell University, October 1993.
Droms, R., Interoperation Between DHCP and BOOTP, RFC 1534, Bucknell University, October 1993.
Droms, R., Dynamic Host Configuration Protocol, RFC 1541, Bucknell University, October 1993.
Wimer, W., Clarifications and Extensions for the Bootstrap Protocol, RFC 1542, Carnegie Mellon University, October 1993.