System Administration Guide: IP Services
Previous Next

Configuring and Unconfiguring a DHCP Server Using dhcpconfig Commands

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

How to Configure a DHCP Server (dhcpconfig -D)

Before You Begin

Make sure that you have read Chapter 13, Planning for DHCP Service (Tasks) before you configure your DHCP server. In particular, you should use the guidelines in Making Decisions for Your DHCP Server Configuration (Task Map) to help you perform the following tasks:

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

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

  1. Log in to the system on which you want to configure the DHCP server.
  2. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  3. Configure the DHCP server by typing a command of the following format:
    #/usr/sbin/dhcpconfig -D -r datastore -p location

    datastore is one of the following: SUNWfiles, SUNWbinfiles, or SUNWnisplus.

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

    For example, you might type a command similar to the following:

    dhcpconfig -D -r SUNWbinfiles -p /var/dhcp

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

  4. 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 )

Before You Begin

Select the system that you want to use as a BOOTP relay agent, using the requirements listed in Selecting a Host to Run the DHCP Service.

  1. Log in to the server that you want to configure as a BOOTP relay agent.
  2. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  3. Configure the BOOTP relay agent by typing a command of the following format:
    # /usr/sbin/dhcpconfig -R server-addresses

    Specify one or more IP addresses of DHCP servers to which you want requests to be forwarded. If you specify more than one address, separate the addresses with commas.

    For example, you might type a command similar to the following:

    /usr/sbin/dhcpconfig -R 192.168.1.18,192.168.42.132

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

  1. Log in to the DHCP server or the BOOTP relay agent system that you want to unconfigure.
  2. Become superuser or assume a role or user name that is assigned to the DHCP Management profile.

    For more information about the DHCP Management profile, see Setting Up User Access to DHCP Commands.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  3. Unconfigure the DHCP server or the BOOTP relay agent:
    # /usr/sbin/dhcpconfig -U

    If the server does not use shared data, 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(1M) man page for more information about dhcpconfig options.

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

Previous Next