System Administration Guide: IP Services

Enabling and Disabling a Solaris DHCP Client

To enable the DHCP client on a system that is already running the Solaris OS and is not using DHCP, you must first unconfigure the system. When the system boots, you must issue some commands to set up the system and enable the DHCP client.


Note –

In many deployments it is common practice to have crucial parts of the infrastructure set up with static IP addresses, rather than using DHCP. Determining which devices on your network, for example routers and certain servers, should be client and which should not, is beyond the scope of this guide.


ProcedureHow to Enable the Solaris DHCP Client

This procedure is necessary only if DHCPv4 was not enabled during Solaris installation. It is never necessary for DHCPv6.

  1. Become superuser on the client system.

  2. If this system uses preconfiguration instead of interactive configuration, edit the sysidcfg file. Add the dhcp subkey to the network_interface keyword in the sysidcfg file.

    For example, network_interface=hme0 {dhcp}. See the sysidcfg(4) man page for more information.

  3. Unconfigure and shut down the system.


    # sys-unconfig
    

    See the sys-unconfig(1M) man page for more information about the configuration information that is removed by this command.

  4. Reboot the system after shutdown is complete.

    If the system uses preconfiguration, the dhcp subkey in the sysidcfg file configures the system to use the DHCP client as the system boots.

    If the system does not use preconfiguration, you are prompted for system configuration information by sysidtool programs when the system reboots. See the sysidtool(1M) man page for more information.

  5. When prompted to use DHCP to configure network interfaces, specify Yes.

ProcedureHow to Disable a Solaris DHCP Client

  1. Become superuser on the client system.

  2. If you used a sysidcfg file to preconfigure the system, remove the dhcp subkey from the network_interface keyword.

  3. Unconfigure and shut down the system.


    # sys-unconfig
    

    See the sys-unconfig(1M) man page for more information about the configuration information that is removed by this command.

  4. Reboot the system after shutdown is complete.

    If the system uses preconfiguration, you are not prompted for configuration information, and the DHCP client is not configured.

    If the system does not use preconfiguration, you are prompted for system configuration information by sysidtool programs when the system reboots. See the sysidtool(1M) man page for more information.

  5. When prompted to use DHCP to configure network interfaces, specify No.