System Administration Guide, Volume 3

Starting and Stopping the DHCP Service

Starting and stopping the DHCP service encompasses several degrees of action you can take to affect the operation of the DHCP daemon. You must understand the difference between starting/stopping, enabling/disabling, and configuring/unconfiguring the DHCP service in order to select the correct procedure to obtain the result you want. The terms are explained below.


Note -

If a server has multiple network interfaces and you do not want to provide DHCP services on all the networks, see "Monitoring and Ignoring Network Interfaces for DHCP Service".


This section provides the procedures for starting and stopping the DHCP service, and enabling and disabling it.

How to Start and Stop the DHCP Service (DHCP Manager)

  1. Become superuser on the DHCP server machine.

  2. Start DHCP Manager.

    See "How to Start DHCP Manager" for the procedure.

  3. Select one of the following operations:

    1. Choose Start from the Services menu to start the DHCP service.

    2. Choose Stop from the Services menu to stop the DHCP service.

      The DHCP daemon stops until it is manually started again, or the system reboots.

    3. Choose Restart from the Services menu to stop the DHCP service and immediately restart it.

How to Start and Stop the DHCP Service (Command Line)

  1. Become superuser on the server machine.

  2. Choose one of the following operations:

    1. To start the DHCP service, type the following command:


      # /etc/init.d/dhcp start
      
    2. To stop the DHCP service, type the following command:


      # /etc/init.d/dhcp stop
      

      The DHCP daemon stops until it is manually started again, or the system reboots.

How to Enable and Disable the DHCP Service (DHCP Manager)

  1. Start DHCP Manager.

  2. Choose one of the following operations:

    1. Choose Enable from the Services menu to start the DHCP service immediately and configure it for automatic startup when the system boots.

    2. Choose Disable from the Services menu to stop the DHCP service immediately and prevent it from starting automatically when the system boots.

How to Disable the DHCP Service (Command Line)

  1. As root, start dhcpconfig by typing the following command:


    # /usr/sbin/dhcpconfig
    
  2. Select Unconfigure DHCP or Relay Service by typing 3.

  3. Type Y at the following prompt to disable DHCP:


    Unconfigure will stop the DHCP service and remove /etc/default/dhcp.
    Are you SURE you want to disable the DHCP service? ([Y]/N): Y
    

How to Enable the DHCP Service (Command Line)

This step is needed only if you previously disabled the server, keeping the data intact.

  1. Become superuser on the server system.

  2. Start dhcpconfig by typing the following command:


    # /usr/sbin/dhcpconfig
    
  3. Select Configure DHCP Service or Configure BOOTP Relay Agent, as appropriate.

  4. Press Return to accept default values for all prompts until you see the following prompt:


    Enable DHCP/BOOTP support of networks you select? ([Y]/N):   
  5. Type Y at the prompt to enable the DHCP service.

  6. Answer the following prompts as shown to avoid prompts for configuring networks.

    If you had previously disabled the service while keeping the data intact, you should not need to reconfigure the network information.


    ###     Configure Local Networks        ###
    Configure BOOTP/DHCP on local LAN network: 172.21.0.0? ([Y]/N):N
    ###     Configure Remote Networks       ###
    Would you like to configure BOOTP/DHCP service on remote networks? ([Y]/N):N
    
  7. Restart the DHCP service by pressing Return at the following prompt:


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