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.

Sun Cluster HA for DHCP Overview

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

Table 1 Protection of Components

Component 

Protected by 

DHCP 

Sun Cluster HA for DHCP 

Overview of Installing and Configuring Sun Cluster HA for DHCP

The following table summarizes the tasks for installing and configuring Sun Cluster HA for DHCP and provides cross-references to detailed instructions for performing these tasks. Perform the tasks in the order that they are listed in the table.

Table 2 Tasks for Installing and Configuring Sun Cluster HA for DHCP

Task 

Instructions 

Plan the installation 

Planning the Sun Cluster HA for DHCP Installation and Configuration

Install and configure the DHCP software 

How to Install and Configure DHCP

Verify the installation and configuration 

How to Verify the Installation and Configuration of DHCP

Install Sun Cluster HA for DHCP packages 

How to Install the Sun Cluster HA for DHCP Packages

Register and configure Sun Cluster HA for DHCP resources 

How to Register and Configure Sun Cluster HA for DHCP

Verify the Sun Cluster HA for DHCP installation and configuration 

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

Upgrade the Sun Cluster HA for DHCP data service 

How to Upgrade to the New Version of Sun Cluster HA for DHCP

Tune the Sun Cluster HA for DHCP fault monitor 

Understanding the Sun Cluster HA for DHCP Fault Monitor

Debug Sun Cluster HA for DHCP 

How to turn on debug for 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

The configuration restrictions in the subsections that follow apply only to Sun Cluster HA for DHCP.


Caution – Caution –

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


Restriction for the supported configurations of Sun Cluster HA for DHCP

The Sun Cluster HA for DHCP data service can only be configured as a failover service.

DHCP must operate as a DHCP server and not as a relay host.

Only one DHCP instance can be configured within the cluster, however you can have multiple DHCP networks within that DHCP instance.

Restriction for the location of DHCP files

The DHCP files is the network table that is created when you configure DHCP using the /usr/sadm/admin/bin/dhcpmgr.

The DHCP files must be placed on shared storage as either a cluster file system or a highly available local file system.

Configuration Requirements

The configuration requirements in this section apply only to Sun Cluster HA for DHCP.


Caution – Caution –

If your data service configuration does not conform to these requirements, the data service configuration might not be supported.


Required /etc/inet/dhcpsvc.conf parameters.

The following parameters must be set within /etc/inet/dhcpsvc.conf

Installing and Configuring DHCP

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

ProcedureHow to Install and Configure DHCP

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

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Create a cluster file system or highly available local file system for the DHCP files.

    Refer to Sun Cluster Software Installation Guide for Solaris OS for information about creating a cluster file system and to Sun Cluster Data Services Planning and Administration Guide for Solaris OS for information about creating a highly available local file system.

  3. Mount the highly available local file system if used.

  4. Configure DHCP.

    As root, execute /usr/sadm/admin/bin/dhcpmgr.


    # /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. Ensure /etc/inet/dhcpsvc.conf is the same on all cluster nodes.

    This can be done by either.

    • Copying /etc/inet/dhcpsvc.conf to each cluster node.

    • Moving your edited /etc/inet/dhcpsvc.conf to a cluster file system and create a symbolic link from /etc/inet/dhcpsvc.conf to dhcpsvc.conf on the cluster file system.

  6. Ensure DHCP is stopped on all nodes.


    # /usr/sadm/admin/bin/dhcpmgr
    
    1. If running Solaris 9


      # /etc/init.d/K21dhcp stop
      
    2. If running Solaris 10


      # svcadm disable dhcp-server
      

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 yet installed your data service.

  1. Verify /etc/inet/dhcpsvc.conf.

    Ensure that the parameters are set to your requirements.

  2. Check /etc/inet/dhcpsvc.conf is consistent on all cluster nodes.

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

    1. If running Solaris 9


      # /etc/init.d/K21dhcp stop
      
    2. If running Solaris 10


      # svcadm disable dhcp-server
      

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 to install the packages. To install the packages, use the Sun JavaTM Enterprise System Installation Wizard.

ProcedureHow to Install the Sun Cluster HA for DHCP Packages

Perform this procedure on each cluster node where you are installing the Sun Cluster HA for DHCP packages.

You can run the Sun Java Enterprise System Installation Wizard 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.


Note –

Install the packages for this data service in the global zone.


Before You Begin

Ensure that you have the Sun Java Availability Suite DVD-ROM.

If you intend to run the Sun Java Enterprise System Installation Wizard with a GUI, ensure that your DISPLAY environment variable is set.

  1. On the cluster node where you are installing the data service packages, become superuser.

  2. Load the Sun Java Availability Suite DVD-ROM into the DVD-ROM drive.

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

  3. Change to the Sun Java Enterprise System Installation Wizard directory of the DVD-ROM.

    • If you are installing the data service packages on the SPARC® platform, type the following command:


      # cd /cdrom/cdrom0/Solaris_sparc
      
    • If you are installing the data service packages on the x86 platform, type the following command:


      # cd /cdrom/cdrom0/Solaris_x86
      
  4. Start the Sun Java Enterprise System Installation Wizard.


    # ./installer
    
  5. When you are prompted, accept the license agreement.

    If any Sun Java Enterprise System components are installed, you are prompted to select whether to upgrade the components or install new software.

  6. From the list of Sun Cluster agents under Availability Services, select the data service for DHCP.

  7. If you require support for languages other than English, select the option to install multilingual packages.

    English language support is always installed.

  8. When prompted whether to configure the data service now or later, choose Configure Later.

    Choose Configure Later to perform the configuration after the installation.

  9. Follow the instructions on the screen to install the data service packages on the node.

    The Sun Java Enterprise System Installation Wizard displays the status of the installation. When the installation is complete, the wizard displays an installation summary and the installation logs.

  10. (GUI only) If you do not want to register the product and receive product updates, deselect the Product Registration option.

    The Product Registration option is not available with the CLI. If you are running the Sun Java Enterprise System Installation Wizard with the CLI, omit this step

  11. Exit the Sun Java Enterprise System Installation Wizard.

  12. Unload the Sun Java Availability Suite DVD-ROM from the DVD-ROM drive.

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

    2. Eject the DVD-ROM.


      # eject cdrom
      
Next Steps

See Registering and Configuring Sun Cluster HA for DHCP to register Sun Cluster HA for DHCP and to configure the cluster for the data service.

Registering and Configuring Sun Cluster HA for DHCP

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

Some procedures within this section require you to use certain Sun Cluster commands. Refer to the relevant Sun Cluster command man page for more information about these command and their parameters.

The Sun Cluster HA for DHCP data service

ProcedureHow to Register and Configure Sun Cluster HA for DHCP

Perform this procedure on one node of the cluster only.

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.

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Register the following resource types.


    # clresourcetype register SUNW.HAStoragePlus
    # clresourcetype register SUNW.gds
    
  3. Create a failover resource group for DHCP.


    # clresourcegroup create -n nodelist dhcp-resource-group
    
  4. Create a resource for the DHCP Logical Hostname.


    # clreslogicalhostname create -g dhcp-resource-group \
    > -h logical-hostname \
    > logical-hostname-resource
    
  5. Create a resource for the DHCP Disk Storage.

    1. If a ZFS highly available local file system is being used.


      # clresource create -g dhcp-resource-group \
      > -t SUNW.HAStoragePlus \
      > -p Zpools=dhcp-zspool \
      > dhcp-hastorage-resource
      
    2. If a cluster file system or a non ZFS highly available local file system is being used.


      # clresource create -g dhcp-resource-group \
      > -t SUNW.HAStoragePlus \
      > -p FilesystemMountPoints=dhcp-filesystem-mountpoint \
      > dhcp-hastorage-resource
      
  6. Enable the Resource Group.


    # clresourcegroup enable -M dhcp-resource-group
    
  7. Create and register a resource for DHCP.

    Edit /opt/SUNWscdhc/util/dhcp_config and follow the comments within that file. After you have edited dhcp_config, you must register the resource.


    # cd /opt/SUNWscdhc/util
    # vi dhcp_config
    # ./dhcp_register
    

    The following example shows dhcp_config that has been edited for a two node cluster with IPMP. The entries for Sun Cluster Carrier-Grade Edition can be ignored.


    RS=dhcp
    RG=dhcp-rg
    PORT=23
    LH=dhcp-lh
    NETWORK=192.168.100.0@sc_ipmp0@1/192.168.100.0@sc_ipmp0@2
    HAS_RS=dhcp-has
    
    # Options to Sun Cluster Carrier-Grade Edition
    
    USE_CGTP=FALSE
    USE_STATIC_DHCP=FALSE
    TEST_CLIENTID=
    TFTPTESTFILE=
  8. Enable the DHCP resource.


    # clresource enable 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

  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Ensure the DHCP resource is online.


    # cluster status 
    

    Enable the DHCP resource if it is not online.


    # clresource enable dhcp-resource
    
  3. Switch the DHCP resource group to another cluster node or node.


    # clresourcegroup switch -n node dhcp-resource-group
    

Upgrading Sun Cluster HA for DHCP

Upgrade the Sun Cluster HA for DHCP data service if you are upgrading from an earlier version of the Sun Cluster HA for DHCP data service.

ProcedureHow to Upgrade to the New Version of Sun Cluster HA for DHCP


Note –

Before performing this procedure you should consider if your current DHCP resource has been modified to have specific timeout values that suit your deployment. If timeout values were previously adjusted you should reapply those timeout values to your new DHCP resource.


  1. On a cluster member, become superuser or assume a role that provides solaris.cluster.modify RBAC authorization.

  2. Disable the DHCP resource.


    # clresource disable dhcp-resource
    
  3. Install the new version of Sun Cluster HA for DHCP to each cluster.

    Refer to How to Install the Sun Cluster HA for DHCP Packages for more information.

  4. Delete the DHCP resource.


    # clresource delete dhcp-resource
    
  5. Reregister the DHCP resource.

    Refer to How to Register and Configure Sun Cluster HA for DHCP for more information.

  6. Enable the DHCP resource.


    # clresource enable dhcp-resource
    

Understanding the Sun Cluster HA for DHCP Fault Monitor

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

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

Resource Properties

The 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

The Sun Cluster HA for DHCP fault monitor is controlled by the extension properties that control the probing frequency. The default values of these properties determine the preset behavior of the fault monitor. The preset behavior should be suitable for most Sun Cluster installations. Therefore, you should tune the Sun Cluster HA for DHCP fault monitor only if you need to modify this preset behavior.

The Sun Cluster HA for DHCP fault monitor checks within an infinite loop. During each cycle the fault monitor will perform a check and report either a failure or success.

If the fault monitor is successful it returns to its infinite loop and continues the next cycle of probing and sleeping.

If the fault monitor reports a failure a request is made to the cluster to restart the resource. If the fault monitor reports another failure another request is made to the cluster to restart the resource. This behavior will continue whenever the fault monitor reports a failure.

If successive restarts exceed the Retry_count within the Thorough_probe_interval a request to failover the resource group onto a different node or zone is made.

DHCP Probe

Test whether PNM (Public Network Monitoring) has changed the active interface for the network that DHCP is using. If this fails, then the probe will restart the DHCP resource.

Debug Sun Cluster HA for DHCP

ProcedureHow to turn on debug for Sun Cluster HA for DHCP

/opt/SUNWscdhc/etc/config allows you to turn on debug for a DHCP instance on a particular node within the cluster. If you require debug to be turned on for Sun Cluster HA for DHCP across the whole cluster, repeat this step on all nodes within the cluster.

  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. Note that the output below, from 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

    Restart the syslog daemon.

    1. If running Solaris 9


      # pkill -1 syslogd
      
    2. If running Solaris 10


      # svcadm disable system-log
      # svcadm enable system-log
      
  2. Edit /opt/SUNWscdhc/etc/config.

    Perform this step on each node of cluster as required.

    Edit /opt/SUNWscdhc/etc/config and change DEBUG= to DEBUG=ALL or DEBUG=sun-cluster-resource.


    # cat /opt/SUNWscdhc/etc/config
    #
    # Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
    # Use is subject to license terms.
    #
    # ident "@(#)config     1.1     06/03/06 SMI"
    #
    # Usage:
    #       DEBUG=<RESOURCE_NAME> or ALL
    #
    DEBUG=ALL

    Note –

    To turn off debug, reverse the steps above.