Sun Cluster Data Service for DHCP Guide for Solaris OS

Installing and Configuring Sun Cluster HA for DHCP

This chapter explains how to install and configure Sun Cluster HA for DHCP.

This chapter contains the following sections.

Installing and Configuring Sun Cluster HA for DHCP

Table 1 lists the tasks for installing and configuring Sun Cluster HA for DHCP. Perform these tasks in the order that they are listed.

Table 1 Task Map: Installing and Configuring Sun Cluster HA for DHCP

Task 

For Instructions, Go To 

1. Plan the installation. 

Planning the Sun Cluster HA for DHCP Installation and Configuration

2. Install and configure DHCP. 

How to Install and Configure DHCP

3. Verify installation and configuration. 

How to Verify the Installation and Configuration of DHCP

4. Install Sun Cluster HA for DHCP Packages. 

How to Install the Sun Cluster HA for DHCP Packages using the scinstall utility

5. Register and Configure Sun Cluster HA for DHCP. 

How to Register and Configure Sun Cluster HA for DHCP

6. Verify Sun Cluster HA for DHCP Installation and Configuration. 

How to Verify the Sun Cluster HA for DHCP Installation and Configuration

6. Upgrading Sun Cluster HA for DHCP. 

Upgrading Sun Cluster HA for DHCP

7. Understand Sun Cluster HA for DHCP fault monitor. 

Understanding Sun Cluster HA for DHCP Fault Monitor

8. Debug Sun Cluster HA for DHCP. 

How to turn on debug for Sun Cluster HA for DHCP

Sun Cluster HA for DHCP Overview

Solaris DHCP provides dynamic TCP/IP configuration to a DHCP client. The Sun Cluster HA for DHCP data service uses the DHCP software that is bundled with Solaris 8/9. For further information on DHCP refer to the dhcp(4)man page.

The Sun Cluster HA for DHCP data service provides a mechanism for orderly startup and shutdown, fault monitoring and automatic failover of the DHCP service.


Note –

If you are upgrading the DHCP agent with this version on a SC.3.1 cluster you must reconfigure the DHCP resource, due to changes in the agent.


Table 2 Protection of Components

Component 

Protected by 

DHCP server 

Sun Cluster HA for DHCP 

Planning the Sun Cluster HA for DHCP Installation and Configuration

This section contains the information you need to plan your Sun Cluster HA for DHCP installation and configuration.

Configuration Restrictions

Consider the restrictions in this section to plan the installation and configuration of Sun Cluster HA for DHCP.This section provides a list of software and hardware configuration restrictions that apply to Sun Cluster HA for DHCP only.


Caution – Caution –

Your data service configuration might not be supported if you do not observe these restrictions.


For restrictions that apply to all data services, see the Sun Cluster Release Notes.

Configuration Requirements

These requirements apply to Sun Cluster HA for DHCP only. You must meet these requirements before you proceed with your Sun Cluster HA for DHCP installation and configuration.


Caution – Caution –

Your data service configuration might not be supported if you do not adhere to these requirements.


DHCP component and its dependencies —You can configure the Sun Cluster HA for DHCP data service to protect a DHCP component. This component and its dependencies are described.

Table 3 DHCP components and their dependencies (via -> symbol)

Componet 

Description 

DHCP server(Mandatory)

-> SUNW.HAStoragePlus resource

The SUNW.HAStoragePlus resource manages the DHCP File System Mount points and ensures that DHCP is not started until these are mounted. 

The DHCP component has a configuration and registration file under /opt/SUNWscdhc/util. These files allow you to register the DHCP components with Sun Cluster.


Example 1 DHCP configuration and registration file for Sun Cluster


# cd /opt/SUNWscdhc
# 
# ls -l util/*
total 6
-rwxr-xr-x   1 root     sys         1094 Dec 20 14:44 dhcp_config
-rwxr-xr-x   1 root     sys          514 Dec 20 14:44 dhcp_register
#
# more util/*
::::::::::::::
util/dhcp_config
::::::::::::::
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# This file will be sourced in by dhcp_register and the parameters
# listed below will be used.
#
# These parameters can be customized in (key=value) form
#
#        RS - name of the resource for the application
#        RG - name of the resource group containing RS
#      PORT - name of any port number, as it's ignored
#        LH - name of the LogicalHostname SC resource
#   NETWORK - name of the DHCP Network, separated with a /
#               where each network is made up of the following
#               <network>@<nafo or ipmp>@node number
#
# Additional parameters to Sun Cluster Carrier-Grade Edition
#  USE_CGTP - ff CGTP is being used (TRUE/FALSE)
#  USE_STATIC_DHCP - ff static DHCP tables should be used (TRUE/FALSE)
#  TEST_CLIENTID - the mac-address of the test-client
#  TFTPTESTFILE - path to Tftp testfile
#
#       The following two examples illustrate sample parameters
#       for DHCP on a 2 node cluster (tequila/sunrise)
#
#       Sun Cluster 3.0 using nafo
#
#       NETWORK=192.168.100.0@nafo0@1/192.168.100.0@nafo0@2
#
#       Sun Cluster 3.1 using ipmp
#
#       NETWORK=192.168.100.0@ipmp0@1/192.168.100.0@ipmp0@2
#
RS=
RG=
PORT=
LH=
NETWORK=
HAS_RS=

# Options to Sun Cluster Carrier-Grade Edition

USE_CGTP=FALSE
USE_STATIC_DHCP=FALSE
TEST_CLIENTID=
TFTPTESTFILE=
::::::::::::::

Sun Cluster HA for DHCP data service – Requires Solaris 8 7/01 (or later) with patches 109077-12 (or later) and 111302-02 (or later) or Solaris 9.


Note –

Ensure that /etc/inet/dhcpsvc.conf is consistent on all nodes within Sun Cluster that will host the DHCP service, or is linked on a directory on a Cluster File System.


/etc/inet/dhcpsvc.conf parameters – You must set the following /etc/inet/dhcpsvc.conf parameters:


Note –

For responses to DHCP requests, use SUNWbinfiles for the DHCP network table to achieve the best DHCP performance.


Configuration Requirements for Sun Cluster Carrier-Grade deployment

These requirements apply to Sun Cluster HA for DHCP only. You must meet these requirements before you proceed with your Sun Cluster HA for DHCP installation and configuration.


Caution – Caution –

Your data service configuration might not be supported if you do not adhere to these requirements.


DHCP component and its dependencies —You can configure the Sun Cluster HA for DHCP data service to protect a DHCP component.

The DHCP component has a configuration and registration file under /opt/SUNWscdhc/util. These files allow you to register the DHCP components with Sun Cluster.


Example 2 DHCP configuration and registration file for Sun Cluster


# cd /opt/SUNWscdhc
# 
# ls -l util/*
total 6
-rwxr-xr-x   1 root     sys         1094 Dec 20 14:44 dhcp_config
-rwxr-xr-x   1 root     sys          514 Dec 20 14:44 dhcp_register
#
# more util/*
::::::::::::::
util/dhcp_config
::::::::::::::
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# This file will be sourced in by dhcp_register and the parameters
# listed below will be used.
#
# These parameters can be customized in (key=value) form
#
#        RS - name of the resource for the application
#        RG - name of the resource group containing RS
#      PORT - name of any port number, as it's ignored
#        LH - name of the LogicalHostname SC resource
#   NETWORK - name of the DHCP Network, separated with a /
#               where each network is made up of the following
#              <network>@<nafo or ipmp>@node number
#
# Additional parameters to Sun Cluster Carrier-Grade Edition
#  USE_CGTP - ff CGTP is being used (TRUE/FALSE)
#  USE_STATIC_DHCP - ff static DHCP tables should be used (TRUE/FALSE)
#  TEST_CLIENTID - the mac-address of the test-client
#  TFTPTESTFILE - path to Tftp testfile
#
#       The following two examples illustrate sample parameters
#       for DHCP on a 2 node cluster (tequila/sunrise)
#
#       Sun Cluster 3.0 using nafo
#
#       NETWORK=192.168.100.0@nafo0@1/192.168.100.0@nafo0@2
#
#       Sun Cluster 3.1 using ipmp
#
#       NETWORK=192.168.100.0@ipmp0@1/192.168.100.0@ipmp0@2
#
RS=
RG=
PORT=
LH=
NETWORK=
HAS_RS=

# Options to Sun Cluster Carrier-Grade Edition

USE_CGTP=FALSE
USE_STATIC_DHCP=FALSE
TEST_CLIENTID=
TFTPTESTFILE=
::::::::::::::

Sun Cluster HA for DHCP data service – Requires Solaris 8 7/01 (or later) with patches 109077-12 (or later) and 111302-02 (or later) or Solaris 9.


Note –

Ensure that /etc/inet/dhcpsvc.conf is consistent on all nodes within Sun Cluster that will host the DHCP service, or is linked on a directory on a Cluster File System.


If Tftp daemon check is being used you must create a non-zero testfile in defined tftpdirectory on all the nodes in the cluster that will use DHCP.

/etc/inet/dhcpsvc.conf parameters – You must set the following /etc/inet/dhcpsvc.conf parameters:

Installing and Configuring DHCP

This section contains the procedures you need to install and configure DHCP.

How to Install and Configure DHCP

Use this procedure to install and configure DHCP.

  1. Install the following packages from the Solaris CD:

    • SUNWdhcsu

    • SUNWdhcsb

    • SUNWdhcm

  2. Mount DHCP Cluster File Systems – Ensure that the Cluster File System for the DHCP network table is mounted.


    Note –

    If a Failover File System is used by the DHCP network table, you must mount this manually.


  3. Install the required DHCP patches.

    Refer to Configuration Requirements for a list of patches that you need to install.

  4. Run the following commands to configure DHCP –


    # /usr/sadm/admin/bin/dhcpmgr
    
    • Choose Configure as DHCP Server.

    • Choose Text files or Binary files.

    • Enter a path for the DHCP network table.

    • Choose which name services to use to store host records.

    • Choose Length of Lease and whether clients can renew their leases.

    • If used, supply a DNS configuration for the DHCP client of this server.

    • Add which network and network mask should provide ip-addresses.

    • Choose LAN as Network Type.

    • If used, supply a NIS configuration for the DHCP clients of this server.

    • If used, supply a NIS+ configuration for the DHCP clients of this server.

    • Create your addresses and macros.

  5. Check whether /etc/inet/dhcpsvc.confhas the following parameters defined.

    • DAEMON_ENABLED is always set to true.

    • PATH points to a Cluster File System.

    • RUN_MODE is always set to SERVER

    • RESOURCE is set to either SUNWbinfiles or SUNWfiles.

  6. make sure /etc/inet/dhcpsvc.conf is consistent on all nodes within Sun Cluster that will host the DHCP service.

    This can be done by either:

    • Copying /etc/inet/dhcpsvc.conf onto each node with Sun Cluster;

    • Moving your edited dhcpsvc.conf to your Cluster File System, and creating a symbolic link from /etc/inet/dhcpsvc.conf to dhcpsvc.conf within the Cluster File System.

  7. Ensure that DHCP is stopped on all nodes.


    # /etc/rc2.d/K21dhcp stop
    
  8. Disable DHCP startup on boot on all nodes.


    # rm /etc/rc3.d/S34dhcp
    

Verifying the Installation and Configuration of DHCP

This section contains the procedure you need to verify the installation and configuration.

ProcedureHow to Verify the Installation and Configuration of DHCP

This procedure does not verify that your application is highly available because you have not installed your data service yet.

Steps
  1. Check /etc/inet/dhcpsvc.conf.

    Ensure that the parameters are set accordingly to your requirements:

    • SERVER_MODE

    • PATH

    • DAEMON_ENABLED

  2. Check that /etc/inet/dhcpsvc.conf is consistent on all nodes within Sun Cluster.

  3. Check that DHCP startup on boot has been disabled.

Installing the Sun Cluster HA for DHCP Packages

If you did not install the Sun Cluster HA for DHCP packages during your initial Sun Cluster installation, perform this procedure. Perform this procedure on each cluster node where you are installing the Sun Cluster HA for DHCP packages. To complete this procedure, you need the Sun Cluster Agents CD-ROM.

If you are installing more than one data service simultaneously, perform the procedure in Installing the Software in Sun Cluster Software Installation Guide for Solaris OS.

Install the Sun Cluster HA for DHCP packages by using one of the following installation tools:


Note –

If you are using Solaris 10, install these packages only in the global zone. To ensure that these packages are not propagated to any local zones that are created after you install the packages, use the scinstall utility to install these packages. Do not use the Web Start program.


ProcedureHow to Install the Sun Cluster HA for DHCP Packages Using the Web Start Program

You can run the Web Start program with a command-line interface (CLI) or with a graphical user interface (GUI). The content and sequence of instructions in the CLI and the GUI are similar. For more information about the Web Start program, see the installer(1M) man page.

Steps
  1. On the cluster node where you are installing the Sun Cluster HA for DHCP packages, become superuser.

  2. (Optional) If you intend to run the Web Start program with a GUI, ensure that your DISPLAY environment variable is set.

  3. Insert the Sun Cluster Agents CD-ROM into the CD-ROM drive.

    If the Volume Management daemon vold(1M) is running and configured to manage CD-ROM devices, it automatically mounts the CD-ROM on the /cdrom/scdataservices_3_1_vc directory.

  4. Change to the Sun Cluster HA for DHCP component directory of the CD-ROM.

    The Web Start program for the Sun Cluster HA for DHCP data service resides in this directory.


    # cd /cdrom/scdataservices_3_1_vc/components/SunCluster_HA_DHCP_3.1
    
  5. Start the Web Start program.


    # ./installer
    
  6. When you are prompted, select the type of installation.

    • To install only the C locale, select Typical.

    • To install other locales, select Custom.

  7. Follow the instructions on the screen to install the Sun Cluster HA for DHCP packages on the node.

    After the installation is finished, the Web Start program provides an installation summary. This summary enables you to view logs that the Web Start program created during the installation. These logs are located in the /var/sadm/install/logs directory.

  8. Exit the Web Start program.

  9. Remove the Sun Cluster Agents CD-ROM from the CD-ROM drive.

    1. To ensure that the CD-ROM is not being used, change to a directory that does not reside on the CD-ROM.

    2. Eject the CD-ROM.


      # eject cdrom
      

ProcedureHow to Install the Sun Cluster HA for DHCP Packages using the scinstall utility

You need the Sun Cluster Agents CD-ROM to perform this procedure. This procedure assumes that you did not install the data service packages during your initial Sun Cluster installation.

If you installed the Sun Cluster HA for DHCP packages as part of your initial Sun Cluster installation, proceed to Registering and Configuring Sun Cluster HA for DHCP.

Otherwise, use this procedure to install the Sun Cluster HA for DHCP packages. Perform this procedure on all nodes that can run Sun Cluster HA for DHCP.

Steps
  1. Load the Sun Cluster Agents CD-ROM into the CD-ROM drive.

  2. Run the scinstall utility with no options.

    This step starts the scinstall utility in interactive mode.

  3. Choose the menu option, Add Support for New Data Service to This Cluster Node.

    The scinstall utility prompts you for additional information.

  4. Provide the path to the Sun Cluster Agents CD-ROM.

    The utility refers to the CD as the “data services cd.”

  5. Specify the data service to install.

    The scinstall utility lists the data service that you selected and asks you to confirm your choice.

  6. Exit the scinstall utility.

  7. Unload the CD from the drive.

Registering and Configuring Sun Cluster HA for DHCP

This section contains the procedures you need to configure Sun Cluster HA for DHCP.

ProcedureHow to Register and Configure Sun Cluster HA for DHCP

This procedure assumes that you installed the data service packages during your initial Sun Cluster installation.

If you did not install the Sun Cluster HA for DHCP packages as part of your initial Sun Cluster installation, go to How to Install the Sun Cluster HA for DHCP Packages using the scinstall utility.

Steps
  1. Become superuser on one of the nodes in the cluster that will host DHCP.

  2. Register the SUNW.gds resource type.


    # scrgadm -a -t SUNW.gds
    
  3. Register the SUNW.HAStoragePlus resource type.


    # scrgadm -a -t SUNW.HAStoragePlus
    
  4. Create a failover resource group.


    # scrgadm -a -g DHCP-failover-resource-group
    
  5. Create a resource for the DHCP Disk Storage.


    # scrgadm -a -j DHCP-has-resource  \
     -g DHCP-failover-resource-group   \
     -t SUNW.HAStoragePlus  \
     -x FilesystemMountPoints=DHCP- instance-mount-points
    
  6. Create a resource for the DHCP Logical Hostname.


    # scrgadm -a -L -j DHCP-lh-resource  \
     -g DHCP-failover-resource-group  \
     -l DHCP-logical-hostname
    
  7. Enable the failover resource group that now includes the DHCP Disk Storage and Logical Hostname resources.


    # scswitch -Z -g DHCP-failover-resource-group
    
  8. a) Create and register the DHCP component.


    # cd /opt/SUNWscdhc/util
    

    Edit the dhcp_configfile and follow the comments within that file:


    # These parameters can be customized in (key=value) form
    #        RS - name of the resource for the application
    #        RG - name of the resource group containing RS
    #      PORT - name of any port number, as it's ignored
    #        LH - name of the LogicalHostname SC resource
    #   NETWORK - name of the DHCP Network, however comprised of following
    #               <network>@<nafo or ipmp>@<node number>
    #    HAS_RS - name of the DHCP HAStoragePlus SC resource

    The following is an example for DHCP for a 2 node Sun Cluster 3.1 with IPMP.


    RS=dhcp-res
    RG=dhcp-rg
    PORT=23
    LH=dhcp-lh-res
    NETWORK=192.168.100.0@ipmp0@1/192.168.100.0@ipmp1@2
    HAS_RS=dhcp-has-res
    

    After editing dhcp_config, you now register the resource.


    # ./dhcp_register
    
  9. b) Create and register the DHCP component for a Sun Cluster Carrier-Grade deployment.


    # cd /opt/SUNWscdhc/util
    

    Edit the dhcp_configfile and follow the comments within that file:


    # These parameters can be customized in (key=value) form
    #        RS - name of the resource for the application
    #        RG - name of the resource group containing RS
    #      PORT - name of any port number, as it's ignored
    #        LH - name of the LogicalHostname SC resource
    #   NETWORK - name of the DHCP Network, however comprised of following
    #               <network>@<nafo or ipmp>@<node number>
    #    HAS_RS - name of the DHCP HAStoragePlus SC resource
    # Additional parameters to Sun Cluster Carrier-Grade Edition
    #  USE_CGTP - ff CGTP is being used (TRUE/FALSE)
    #  USE_STATIC_DHCP - ff static DHCP tables should be used (TRUE/FALSE)
    #  TEST_CLIENTID - the mac-address of the test-client
    #  TFTPTESTFILE - path to Tftp testfile

    The following is an example for DHCP for a 2 node Sun Cluster 3.1 with CGTP, static DHCP, active client and tftp monitoring.


    RS=dhcp-res
    RG=dhcp-rg
    PORT=23
    LH=dhcp-lh-res
    NETWORK=
    HAS_RS=dhcp-has-res
    USE_CGTP=TRUE
    USE_STATIC_DHCP=TRUE
    TEST_CLIENTID=8:0:20:a7:95:f9
    TFTPTESTFILE=/tftpboot/SCTESTFILE

    After editing dhcp_config, you now register the resource.


    # ./dhcp_register
    
  10. Enable each DHCP resource.

    Repeat this step for each DHCP component as in the previous step.


    # scstat 
    

    # scswitch -e -j DHCP-resource
    

Verifying the Sun Cluster HA for DHCP Installation and Configuration

This section contains the procedure you need to verify that you installed and configured your data service correctly.

ProcedureHow to Verify the Sun Cluster HA for DHCP Installation and Configuration

Steps
  1. Become superuser on one of the nodes in the cluster that will host DHCP.

  2. Ensure that all the DHCP resources are online with scstat.


    # scstat 
    

    For each DHCP resource that is not online, use the scswitch command as follows.


    # scswitch -e -j DHCP- resouce
    
  3. Run the scswitch command to switch the DHCP resource group to another cluster node, such as node2.


    # scswitch -z -g DHCP-failover-resource-group -h node2
    

Upgrading Sun Cluster HA for DHCP

As a result of bug fixes, the configuration for IPMP based clusters has changed. If you are running Sun Cluster HA for DHCP on an IPMP-based cluster, you have to disable, delete and reregister the DHCP resource.

ProcedureHow to Upgrade Sun Cluster HA for DHCP

Steps
  1. Save the Sun Cluster DHCP resource definitions.


    # scrgadm -pvv -j resource > file1
    
  2. Disable the Sun Cluster DHCP resource.


    # scswitch -n -j resource
    
  3. Remove the Sun Cluster DHCP resource.


    # scrgadm -r -j resource
    
  4. Configure and register the Sun Cluster DHCP resource.

    1. Go to the directory that contains the dhcp_config file and the dhcp_register file.


      # cd /opt/SUNWscdhc/util
      
    2. Edit the dhcp_config file.


      # vi dhcp_config
      
    3. Run the dhcp_register file.


      # ./dhcp_register
      
  5. Save the Sun Cluster DHCP resource definitions.


    # scrgadm -pvv -j resource > file2
    
  6. Compare the updated definitions to the definitions that you saved before you updated the resource.

    Comparing these definitions enables you to determine if any existing extension properties have changed, for example, time-out values.


    # diff file1 file2
    
  7. Amend any resource properties that were reset.


    # scrgadm -c -j resource -x|y resource
    
  8. Bring online the Sun Cluster DHCP resource.


    # scswitch -e -j resource
    

Understanding Sun Cluster HA for DHCP Fault Monitor

This section describes the Sun Cluster HA for DHCP fault monitor's probing algorithm or functionality, states the conditions, messages, and recovery actions associated with unsuccessful probing.

For conceptual information on fault monitors, see the Sun Cluster Concepts Guide.

Resource Properties

Sun Cluster HA for DHCP fault monitor uses the same resource properties as resource type SUNW.gds. Refer to the SUNW.gds(5) man page for a complete list of resource properties used.

Probing Algorithm and Functionality

Debug Sun Cluster HA for DHCP

Read the information in this section to understand how to turn on debug for Sun Cluster HA for DHCP.

The DHCP component has a DEBUG file under /opt/SUNWscdhc/etc.

This file allows you to turn on debug for the DHCP resource on a particular node within Sun Cluster. If you require debug to be turned on for the DHCP resource across the whole Sun Cluster, to repeat this step on all nodes within Sun Cluster.

ProcedureHow to turn on debug for Sun Cluster HA for DHCP

Steps
  1. Edit /etc/syslog.conf and change daemon.notice to daemon.debug.


    # grep daemon /etc/syslog.conf
    *.err;kern.debug;daemon.notice;mail.crit        /var/adm/messages
    *.alert;kern.err;daemon.err                     operator
    #

    Change the daemon.notice to daemon.debug and restart syslogd. The output below, from the command grep daemon /etc/syslog.conf, shows that daemon.debug has been set.


    # grep daemon /etc/syslog.conf
    *.err;kern.debug;daemon.debug;mail.crit        /var/adm/messages
    *.alert;kern.err;daemon.err                    operator
    #
    # pkill -1 syslogd
    #
  2. Edit /opt/SUNWscdhc/etc/config and change DEBUG= to DEBUG=ALL or DEBUG=resource.


    # cat /opt/SUNWscdhc/etc/config
    #
    # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # Usage:
    #       DEBUG=<RESOURCE_NAME> or ALL
    #
    DEBUG=ALL
    #

    Note –

    To turn off debug, reverse the steps shown above.