System Administration Guide, Volume 3

How to Configure a DHCP Server (dhcpconfig)

  1. Select the system you want to use as a DHCP server.

    Use the guidelines in "Making Decisions for Server Configuration".

  2. Make decisions about your data store, lease policy, and router information.

    Use the guidelines in "Making Decisions for Server Configuration".

  3. Become superuser.

  4. Type the following:


    #/usr/sbin/dhcpconfig
    

    The text-based DHCP Configuration menu is displayed.

  5. Type 1 and press Return to select Configure DHCP Service.

  6. Answer the prompts listed below.

    Use the decisions you made after reading Chapter 9, Planning for DHCP Service. Note that the default value for each prompt is displayed in square brackets. If you want to use a default value, press Return at the prompt.


    Would you like to stop the DHCP service? (recommended) ([Y]/N)Y
    

    Type Y to stop the DHCP service. This ensures that the server does not attempt to send incomplete configuration information to clients.


    ###     DHCP Service Configuration      ###
    ###     Configure DHCP Database Type and  Location      ###
     
    Enter datastore (files or nisplus) [nisplus]:

    Type the name of the data store you have decided to use, either files or nisplus.

    See the guidelines in "Choosing the Data Store" if you need more information about the data store. Your choice is recorded in /etc/default/dhcp.


    Enter absolute path to datastore directory [/var/dhcp]:

    Type the path to the files or NIS+ directory that you want to use for the data store. The default location if you selected files for the data store is /var/dhcp. If you selected NIS+, the default listed is the location of the NIS+ directory that the server is already using, such as yourcompany.com.


    Would you like to specify nondefault daemon options (Y/[N]):

    You can successfully configure the server without specifying nondefault daemon options if you type N at this prompt.

    However, if you type Y here, the following prompts are displayed.


    Do you want to enable transaction logging? (Y/[N]):Y
     
    

    Type Y if you want to enable transaction logging. See the Administering DHCP chapter for information about transaction logging. The following prompt appears only if you enable transaction logging.


    Which syslog local facility [0-7] do you wish to log to? [0]:
     

    See the Administering DHCP chapter for information about the local facility for transaction logging.


    How long (in seconds) should the DHCP server keep outstanding OFFERs? [10]:

    Type the number of seconds the server should cache an IP address offer to a client. The default is 10 seconds, which is adequate for most networks. You can increase this time to compensate for slow network performance.


    How often (in minutes) should the DHCP server rescan the dhcptab? [Never]:

    By default, the DHCP server reads the dhcptab only at startup or if signalled by DHCP Manager to read it. DHCP Manager enables you to update the server by reloading the dhcptab after you make a change to the configuration data, so automatic rescanning is not necessary if you use DHCP Manager. Generally, you should use a rescan interval only under the following circumstances:

    • The data store is in NIS+ and you have more than one DHCP server on your network. Rescanning guarantees that all servers have the latest information.

    • You use dhtadm instead of DHCP Manager to make configuration changes. The dhtadm utility does not offer you the option of forcing a rescan of dhcptab after you make a change.

    If you decide to use the automatic rescan for dhcptab, type the interval in minutes that the server should wait to reload the client configuration information in the dhcptab file.


    Do you want to enable BOOTP compatibility mode? (Y/[N]):

    The default is to not enable BOOTP compatibility. See "Supporting BOOTP Clients with DHCP Service" if you want to enable BOOTP compatibility.

    After you finish entering information about nondefault daemon and server options, the following prompt is displayed:


    Enter default DHCP lease policy (in days) [3]:

    Type the number of days for the lease time. The default is three days. See "Setting a Lease Policy" for more information.


    Do you want to allow clients to renegotiate their leases? ([Y]/N):

    The default is Y to allow lease negotiation. See "Setting a Lease Policy" for more information about lease negotiation. If you type N, clients must give up their IP addresses when the lease expires, and then obtain a new lease and IP address.


    Enable DHCP/BOOTP support of networks you select? ([Y]/N):

    At this point, you can begin configuring the networks that should use DHCP. Refer to the decisions you made after reading "Making Decisions for IP Address Management". If you are not ready to configure IP addresses, type N; dhcpconfig prompts you to restart the DHCP service, and returns to the initial menu. Note that DHCP is not usable until you enable DHCP/BOOTP support of at least one network.

    If you are ready to configure IP addresses, type Y and continue to Step 4.