System Administration Guide: IP Services

Configuring and Unconfiguring a DHCP Server Using dhcpconfig Commands

This section includes procedures to help you configure and unconfigure a DHCP server or BOOTP relay agent by using dhcpconfig with command-line options.

How to Configure a DHCP Server (dhcpconfig -D)

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

    Use the guidelines in Making Decisions for DHCP Server Configuration (Task Map).

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

    Use the guidelines in Making Decisions for DHCP Server Configuration (Task Map).

  3. Become superuser or a user assigned to the DHCP Management profile.

  4. Type a command of the following format:


    #/usr/sbin/dhcpconfig -D -r datastore -p location
    

    datastore is one of SUNWfiles, SUNWbinfiles, or SUNWnisplus.

    location is the data-store-dependent location where you want to store the DHCP data. For SUNWfiles and SUNWbinfiles, this must be a UNIX absolute path name. For SUNWnisplus, this must be a fully specified NIS+ directory.

    The dhcpconfig utility uses the server machine's system and network files to determine values used to configure the DHCP server. See the dhcpconfig man page for information about additional options to the dhcpconfig command that enable you to override the default values.

  5. Add one or more networks to the DHCP service.

    See How to Add a DHCP Network (dhcpconfig) for the procedure to add a network.

How to Configure a BOOTP Relay Agent (dhcpconfig -R )

  1. Select the system you want to use as a BOOTP relay agent.

    Use the guidelines in Making Decisions for DHCP Server Configuration (Task Map).

  2. Become superuser or a user assigned to the DHCP Management profile.

  3. Type the following command:


    # /usr/sbin/dhcpconfig -R addresses
    

    addresses are the comma-separated IP addresses of DHCP servers to which you want requests to be forwarded.

How to Unconfigure a DHCP Server or BOOTP Relay Agent (dhcpconfig -U)

  1. Become superuser or a user assigned to the DHCP Management profile.

  2. Type the following on the system that acts as DHCP server or BOOTP relay agent:


    # /usr/sbin/dhcpconfig -U 
    

    If the server does not use shared data (through NIS+ or text files shared through NFS), you can also use the -x option to remove the dhcptab and network tables. If the server uses shared data, do not use the -x option. The -h option can be used to remove host names from the host table. See the dhcpconfig man page for more information about dhcpconfig options.

    See DHCP Data on an Unconfigured Server for more information about removing data.