Description

The dhcpconfig command is used to configure and manage the Dynamic Host
Configuration Protocol (DHCP) service or BOOTP relay services. It is intended for
use by experienced Solaris system administrators and is designed for ease of
use in scripts. The dhcpmgr utility is recommended for less experienced administrators or
those preferring a graphical utility to configure and manage the DHCP service
or BOOTP relay service.

The dhcpconfig command can be run by root, or by other users
assigned to the DHCP Management profile. See rbac(5) and user_attr(4).

The dhcpconfig menu driven mode is supported in Solaris 8 and previous
versions of Solaris.

Where dhcpconfig Obtains Configuration Information

dhcpconfig scans various configuration files on your Solaris machine for information it
can use to assign values to options contained in macros it adds
to the dhcptab configuration table. The following table lists information dhcpconfig needs, the
source used, and how the information is used:

Information

Source

Where Used

Timezone

System date, timezone settings

Locale
macro

DNS parameters

nsswitch.conf, /etc/resolv.conf

Server macro

NIS parameters

System domainname, nsswitch.conf, NIS

Network macros

Subnetmask

Network interface, netmasks table
in nameservice

Network macros

If you have not set these parameters on your server machine, you
should do so before configuring the DHCP server with dhcpconfig. Note that
if you specify options with the dhcpconfig-D command line, the values
you supply override the values obtained from the system files.

Options

The following options are supported:

-C

Convert to using a new data store, recreating the DHCP data tables in a format appropriate to the new data store, and setting up the DHCP server to use the new data store.

The following sub-options are required:

-ppath_to_data

The paths for SUNWfiles and SUNWbinfiles must be absolute UNIX pathnames. See dhcp_modules(5).

-rdata_resource

New data store resource. One of the following must be specified: SUNWfiles or SUNWbinfiles. See dhcp_modules(5).

The following sub-options are optional:

-f

Do not prompt for confirmation. If -f is not used, a warning and confirmation prompt are issued before the conversion starts.

-k

Keep the old DHCP data tables after successful conversion. If any problem occurs during conversion, tables are not deleted even if -k sub-option is not specified.

-uuninterpreted

Data which is ignored by dhcpconfig, but passed on to the datastore for interpretation. The private layer provides for module-specific configuration information through the use of the RESOURCE_CONFIG keyword. Uninterpreted data is stored within RESOURCE_CONFIG keyword of dhcpsvc.conf(4). The -u sub-option is not used with the SUNWfiles and SUNWbinfiles data stores. See dhcp_modules(5).

-D

Configure the DHCP service.

The following sub-options are required:

-rdata_resource

One of the following must be specified: SUNWfiles or SUNWbinfiles. Other data stores may be available. See dhcp_modules(5).

-ppath

The paths for SUNWfiles and SUNWbinfiles must be absolute UNIX pathnames. See dhcp_modules(5).

The following sub-options are optional:

-aDNS_servers

IP addresses of DNS servers, separated with commas.

-dDNS_domain

DNS domain name.

-hhosts_resource

Resource in which to place hosts data. Usually, the name service in use on the server. Valid values are files or dns.

-lseconds

Lease length used for addresses not having a specified lease length, in seconds.

-n

Non-negotiable leases

-yhosts_domain

DNS domain name to be used for hosts data. Valid only if dns is specified for -h sub-option.

-uuninterpreted

Data which is ignored by dhcpconfig, but passed on to the datastore for interpretation. The private layer provides for module-specific configuration information through the use of the RESOURCE_CONFIG keyword. Uninterpreted data is stored within RESOURCE_CONFIG keyword of dhcpsvc.conf(4). The -u sub-option is not used with the SUNWfiles and SUNWbinfiles data stores. See dhcp_modules(5).

-Ifilename

Import data from filename, containing data previously exported from a Solaris DHCP server. Note that after importing, you may have to edit macros to specify the correct domain names, and edit network tables to change the owning server of addresses in imported networks. Use dhtadm and pntadm to do this.

The following sub-options are supported:

-f

Replace any conflicting data with the data being imported.

-g

Signal the daemon to reload the dhcptab once the import has been completed.

-Nnet_address

Configure an additional network for DHCP service.

The following sub-options are supported:

-aNIS_server_addresses

List of IP addresses of NIS servers.

-b

Network is a point-to-point (PPP) network, therefore no broadcast address should be configured. If -b is not used, the network is assumed to be a LAN, and the broadcast address is determined using the network address and subnet mask.

-g

Signal the daemon to reload the dhcptab.

-mxxx.xxx.xxx.xxx

Subnet mask for the network; if -m is not used, subnet mask is obtained from netmasks.

-trouter_addresses

List of router IP addresses; if not specified, router discovery flag is set.

-yNIS_domain_name

If NIS is used on this network, specify the NIS domain name.

-P

Configure the DHCP service parameters. Each parameter and value are specified by the following pattern:

parameter[=value],…

Where parameter and value are:

parameter

One of the DHCP service parameters listed in dhcpsvc.conf(4). If the corresponding value is not specified, the current parameter value is displayed. If parameter is not specified, all parameters and current values are displayed.

value

Optional string to set the servers parameter to if the value is acceptable. If the value is missing or is empty (""), the parameter and its current value are deleted.

After a parameter has changed the DHCP server requires re-starting before you can use new parameter values.

-Rserver_addresses

Configure the BOOTP relay service. BOOTP or DHCP requests are forwarded to the list of servers specified.

The following command exports one network (120.30.171.0) and its addresses, the macro
120.30.171.0, and the options motd and PSptrfrom a DHCP server, saves the
exported data in file /export/var/120301710_data, and deletes the exported data from the server.

The following command imports DHCP data from a file, /net/golduck/export/var/120301710_data, containing data
previously exported from a Solaris DHCP server, overwrites any conflicting data on
the importing server, and signals the daemon to reload the dhcptab once the
import is completed:

example# dhcpconfig -I /net/golduck/export/var/120301710_data -f -g

Example 7 Setting DHCP Server Parameters

The following command sets the number of minutes that the DHCP server
waits before timing out when updating DNS information on DHCP clients to
five minutes.