DHCP configuration

By default, the DHCP server is configured by reading the /etc/dhcpsd.cnf file, which specifies the initial database of options and addresses.

The server is started in the /etc/rc.tcpip file. It can also be started from SMIT, or through SRC commands. The DHCP client can be configured by running the System Management Interface Tool (SMIT), or editing a flat ASCII file.

Configuring the DHCP server is usually the hardest part of using DHCP in your network. First, decide what networks you want to have DHCP clients on. Each subnet in your network represents a pool of addresses that the DHCP server must add to its database. For example:

database db_file
{

    subnet 9.3.149.0 255.255.255.0
      {  option 3 9.3.149.1 # The default gateway clients on this network should use
         option 6 9.3.149.2 # The nameserver clients on this network should use
      }
    ... options or other containers added later
}

The example above shows a subnet, 9.3.149.0, with a subnet mask 255.255.255.0. All addresses in this subnet, 9.3.149.1 through 9.3.149.254, are in the pool. Optionally, a range can be specified on the end of the line or a range or exclude statement can be included in the subnet container. See DHCP server file known options for common configuration methods and definitions.

The database clause with db_file indicates which database method to use for processing this part of the configuration file. Comments begin with a # (pound sign). Text from the initial #, to the end of the line, is ignored by the DHCP server. Each option line is used by the server to tell the client what to do. DHCP server file known options describes the currently supported and known options. See DHCP server file syntax for general server operation for ways to specify options that the server does not know about.

If the server does not understand how to parse an option, it uses default methods to send the option to the client. This also allows the DHCP server to send site-specific options that are not RFC defined, but can be used be certain clients or client configurations.