DHCP Server Management
As superuser, you can start, stop, and configure the DHCP server with DHCP Manager or with command-line utilities described in DHCP Command-Line Utilities. Generally, the DHCP server is configured to start automatically when the system boots, and to stop when the system is shut down. You should not need to start and stop the server manually under normal conditions.
DHCP Data Store
All the data used by the Solaris DHCP server is maintained in a data store. The data store might consist of plain text files, NIS+ tables, or binary-format files. While configuring the DHCP service, you choose the type of data store to be used. The section Choosing the DHCP Data Store describes the differences between the types of data stores. You can convert a data store from one format to another by using DHCP Manager or the dhcpconfig command.
You can also move data from one DHCP server's data store to another server's data store. You can use export and import utilities that work with the data stores, even if the servers are using different data store formats. You can export and import the entire content of a data store, or just some of the data within it, using DHCP Manager or the dhcpconfig command.
Note - Any database or file format can be used for DHCP data storage if you develop your own code module to provide an interface between Solaris DHCP (server and management tools) and the database. .
Within the Solaris DHCP data store are two types of tables. You can view and manage the contents if these tables by using either DHCP Manager or the command-line utilities. The data tables are as follows:
dhcptab table - Table of configuration information that can be passed to clients.
DHCP network tables - Tables containing information about the DHCP and BOOTP clients that reside on the network specified in the table name. For example, the network 192.168.32.0 would have a table whose name includes 192_168_32_0.
The dhcptab Table
The dhcptab table contains all the information that clients can obtain from the DHCP server. The DHCP server scans the dhcptab table each time it starts. The file name of the dhcptab table varies according to the data store used. For example, the dhcptab table created by the NIS+ data store SUNWnisplus is SUNWnisplus1_dhcptab.
The DHCP protocol defines a number of standard items of information that can be passed to clients. These items are referred to as parameters, symbols, or options. Options are defined in the DHCP protocol by numeric codes and text labels, but without values. Some commonly used standard options are shown in the following table.
Table 12-1 Sample DHCP Standard Options
Code | Label | Description |
---|---|---|
1 | Subnet | Subnet mask IP address |
3 | Router | IP address for the router |
6 | DNSserv | IP address for the DNS server |
12 | Hostname | Text string for the client host name |
15 | DNSdmain | DNS domain name |
Some options are automatically assigned values when you provide information during server configuration. You can also explicitly assign values to other options at a later time. Options and their values are passed to the client to provide configuration information. For example, the option/value pair, DNSdmain=Georgia.Peach.COM, sets the client's DNS domain name to Georgia.Peach.COM.
Options can be grouped with other options in containers known as macros, which makes it easier to pass information to a client. Some macros are created automatically during server configuration and contain options that were assigned values during configuration. Macros can also contain other macros.
The format of the dhcptab table is described in the dhcptab(4) man page. In DHCP Manager, all the information shown in the Options and Macros tabs comes from the dhcptab table. See About DHCP Options for more information about options. See About DHCP Macros for more information about macros.
Note that the dhcptab table should not be edited manually. You should use either the dhtadm command or DHCP Manager to create, delete, or modify options and macros.
DHCP Network Tables
A DHCP network table maps client identifiers to IP addresses and the configuration parameters associated with each address. The format of the network tables is described in the dhcp_network(4) man page. In DHCP Manager, all the information shown in the Addresses tab comes from the network tables.
DHCP Manager
DHCP Manager is a graphical user interface (GUI) tool you can use to perform all management duties associated with the DHCP service. You can use it to manage the server as well as the data the server uses. You must be superuser when you run DHCP Manager.
You can use DHCP Manager with the server in the following ways:
Configuring and unconfiguring the DHCP server
Starting, stopping, and restarting the DHCP server
Disabling and enabling DHCP service
Customizing DHCP server settings
DHCP Manager enables you to manage the IP addresses, network configuration macros, and network configuration options in the following ways:
Adding and deleting networks under DHCP management
Viewing, adding, modifying, deleting, and releasing IP addresses under DHCP management
Viewing, adding, modifying, and deleting network configuration macros
Viewing, adding, modifying, and deleting nonstandard network configuration options
DHCP Manager allows you to manage the DHCP data stores in the following ways:
Convert data to a new data store format
Move DHCP data from one DHCP server to another by exporting it from the first server and importing it on the second server
DHCP Manager includes extensive online help for procedures you can perform with the tool. For more information, see About DHCP Manager.
DHCP Command-Line Utilities
All DHCP management functions can be performed by using command-line utilities. You can run the utilities if you are logged in as superuser or as a user assigned to the DHCP Management profile. See Setting Up User Access to DHCP Commands.
The following table lists the utilities and describes the purpose of each utility.
Table 12-2 DHCP Command-Line Utilities
Role-Based Access Control for DHCP Commands
Security for the dhcpconfig, dhtadm, and pntadm commands is determined by role-based access control (RBAC) settings. By default, the commands can be run only by superuser. If you want to use the commands under another user name, you must assign the user name to the DHCP Management profile as described in Setting Up User Access to DHCP Commands.
DHCP Server Configuration
You configure the Solaris DHCP server the first time you run DHCP Manager on the system where you want to run the DHCP server.
DHCP Manager server configuration dialog boxes prompt you for essential information needed to enable and run the DHCP server on one network. Some default values are obtained from existing system files. If you have not configured the system for the network, there are no default values. DHCP Manager prompts for the following information:
Role of the server, either as the DHCP server or as the BOOTP relay agent
Data store type (files, binary files, NIS+, or something specific to your site)
Data store configuration parameters for the data store type you selected
Name service to use to update host records, if any (/etc/hosts, NIS+, or DNS)
Length of lease time and whether clients should be able to renew leases
DNS domain name and IP addresses of DNS servers
Network address and subnet mask for the first network you want to configure for DHCP service
Network type, either local area network (LAN) or point-to-point network
Router discovery or the IP address of a particular router
NIS domain name and IP address of NIS servers
NIS+ domain name and IP address of NIS+ servers