Files Used by the DHCP Service
The following table lists files associated with Solaris DHCP.
Table 18-2 Files and Tables Used by DHCP Daemons and Commands
File or Table Name | Description | Man Page |
---|---|---|
dhcptab | A generic term for the table of DHCP configuration information that is recorded as options with assigned values, which are then grouped into macros. The name of the dhcptab table and its location is determined by the data store you use for DHCP information. | dhcptab(4) |
DHCP network table | Maps IP addresses to client IDs and configuration options. DHCP network tables are named according to the IP address of the network, such as 10.21.32.0. There is no file that is called dhcp_network. The name and location of DHCP network tables is determined by the data store you use for DHCP information. | dhcp_network(4) |
dhcpsvc.conf | Stores startup options for the DHCP daemon and data store information. This file must not be edited manually. Use the dhcpconfig command to change startup options. | dhcpsvc.conf(4) |
nsswitch.conf | Specifies the location of name service databases and the order in which to search name services for various kinds of information. The nsswitch.conf file is read to obtain accurate configuration information when you configure a DHCP server. The file is located in the /etc directory. | nsswitch.conf(4) |
resolv.conf | Contains information used to resolve DNS queries. During DHCP server configuration, this file is consulted for information about the DNS domain and DNS server. The file is located in the /etc directory. | resolv.conf(4) |
dhcp.interface | Indicates that DHCP is to be used on the client's network interface that is specified in the dhcp.interface file name. For example, the existence of a file named dhcp.qe0 indicates that DHCP is to be used on the qe0 interface. The dhcp.interface file might contain commands that are passed as options to the ifconfig command, which is used to start DHCP on the client. The file is located in the /etc directory on Solaris DHCP client systems. | No specific man page, see dhcp(5) |
interface.dhc | Contains the configuration parameters that are obtained from DHCP for the given network interface. The client caches the current configuration information in /etc/dhcp/interface.dhc when the interface's IP address lease is dropped. For example, if DHCP is used on the qe0 interface, the dhcpagent caches the configuration information in /etc/dhcp/qe0.dhc. The next time DHCP starts on the interface, the client requests to use the cached configuration if the lease has not expired. If the DHCP server denies the request, the client begins the standard process for DHCP lease negotiation. | No specific man page, see dhcpagent(1M) |
dhcpagent | Sets parameter values for the dhcpagent client daemon. The path to the file is /etc/default/dhcpagent. See the /etc/default/dhcpagent file or the dhcpagent(1M) man page for information about the parameters. | dhcpagent(1M) |
DHCP inittab | Defines aspects of DHCP option codes, such as the data type, and assigns mnemonic labels. See the dhcp_inittab(4) man page for more information about the file syntax. On the client, the information in the /etc/dhcp/inittab file is used by dhcpinfo to provide more meaningful information to human readers of the information. On the DHCP server system, this file is used by the DHCP daemon and management tools to obtain DHCP option information. The /etc/dhcp/inittab file replaces the /etc/dhcp/dhcptags file that was used in previous releases. DHCP Option Information provides more information about this replacement. | dhcp_inittab(4) |
DHCP Option Information
Historically, DHCP option information has been stored in several places, including the server's dhcptab table, the client's dhcptags file, and internal tables of various programs. In the Solaris 8 release and later releases, the option information is consolidated in the /etc/dhcp/inittab file. See the dhcp_inittab(4) man page for detailed information about the file.
The Solaris DHCP client uses the DHCP inittab file as a replacement for the dhcptags file. The client uses the file to obtain information about option codes that were received in a DHCP packet. The in.dhcpd, snoop, and dhcpmgr programs on the DHCP server use the inittab file as well.
Determining if Your Site Is Affected
Most sites that use Solaris DHCP are not affected by the switch to the /etc/dhcp/inittab file. Your site is affected if you meet all of the following criteria:
You plan to upgrade from a Solaris release that is older than that the Solaris 8 release.
You previously created new DHCP options.
You modified the /etc/dhcp/dhcptags file, and you want to retain the changes.
When you upgrade, the upgrade log notifies you that your dhcptags file had been modified and that you should make changes to the DHCP inittab file.
Differences Between dhcptags and inittab Files
The inittab file contains more information than the dhcptags file. The inittab file also uses a different syntax.
A sample dhcptags entry is as follows:
33 StaticRt - IPList Static_Routes
33 is the numeric code that is passed in the DHCP packet. StaticRt is the option name. IPList indicates that the data type for StaticRt must be a list of IP addresses. Static_Routes is a more descriptive name.
The inittab file consists of one-line records that describe each option. The format is similar to the format that defines symbols in dhcptab. The following table describes the syntax of the inittab file.
Option | Description | ||||||||
option-name | Name of the option. The option name must be unique within its option category, and not overlap with other option names in the Standard, Site, and Vendor categories. For example, you cannot have two Site options with the same name, and you should not create a Site option with the same name as a Standard option. | ||||||||
category | Identifies the namespace in which the option belongs. Must be one of the following: Standard, Site, Vendor, Field, or Internal. | ||||||||
code | Identifies the option when sent over the network. In most cases, the code uniquely identifies the option, without a category. However, in the case of internal categories such as Field or Internal, a code might be used for other purposes. The code might not be globally unique. The code should be unique within the option's category, and not overlap with codes in the Standard and Site fields. | ||||||||
type | Describes the data that is associated with this option. Valid types are IP, ASCII, Octet, Boolean, Unumber8, Unumber16, Unumber32, Unumber64, Snumber8, Snumber16, Snumber32, and Snumber64. For numbers, an initial U or S indicates that the number is unsigned or signed. The digits at the end indicate how many bits are in the number. For example, Unumber8 is an unsigned 8-bit number. The type is not case sensitive. | ||||||||
granularity | Describes how many units of data make up a whole value for this option. | ||||||||
maximum | Describes how many whole values are allowed for this option. 0 indicates an infinite number. | ||||||||
consumers | Describes which programs can use this information. Consumers should be set to sdmi, where:
|
A sample inittab entry is as follows:
StaticRt - Standard, 33, IP, 2, 0, sdmi
This entry describes an option that is named StaticRt. The option is in the Standard category, and is option code 33. The expected data is a potentially infinite number of pairs of IP addresses because the type is IP, the granularity is 2, and the maximum is infinite (0). The consumers of this option are sdmi: snoop, in.dhcpd, dhcpmgr, and dhcpinfo.
Converting dhcptags Entries to inittab Entries
If you previously added entries to your dhcptags file, you must add corresponding entries to the new inittab file if you want to continue using the options you added to your site. The following example shows how a sample dhcptags entry might be expressed in inittab format.
Suppose you had added the following dhcptags entry for fax machines that are connected to the network:
128 FaxMchn - IP Fax_Machine
The code 128 means that the option must be in the Site category. The option name is FaxMchn, and the data type is IP.
The corresponding inittab entry might be:
FaxMchn SITE, 128, IP, 1, 1, sdmi
The granularity of 1 and the maximum of 1 indicate that one IP address is expected for this option.