Sun Cluster 3.1 Data Service for DHCP

Installing and Configuring Sun Cluster HA for DHCP

Installing and Configuring Sun Cluster HA for DHCP

Table 1–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–1 Task Map: Installing and Configuring Sun Cluster HA for DHCP

Task 

For Instructions, Go To 

Plan the installation 

Sun Cluster HA for DHCP Overview

Planning the Sun Cluster HA for DHCP Installation and Configuration

Install and configure DHCP 

How to Install and Configure DHCP

Verify 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 

How to Register and Configure Sun Cluster HA for DHCP

Verify Sun Cluster HA for DHCP Installation and Configuration 

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

Understand Sun Cluster HA for DHCP fault monitor 

Understanding Sun Cluster HA for DHCP Fault Monitor

Debug Sun Cluster HA for DHCP 

How to turn debug on 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. The following DHCP component is protected by the Sun Cluster HA for DHCP data service.

Table 1–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


Caution – Caution –

Your data service configuration might not be supported if you do not observe these 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.

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

Configuration Requirements


Caution – Caution –

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


Use the requirements in this section to plan the installation and configuration of Sun Cluster HA for DHCP. 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.


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.



Note –

With respect to responses to DHCP requests, SUNWbinfiles should be used for the DHCP network table to achieve the best DHCP performance.


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 – You must 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 back to the Configuration Requirements for a list of patches that need to be installed.

  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 should be used to store host records

    • Choose Length of Lease and if 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 /etc/inet/dhcpsvc.conf – has the following parameters defined.

    • DAEMON_ENABLED should always be true

    • PATH should point to a Cluster File System

    • RUN_MODE should always be 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

    • Move your edited dhcpsvc.conf to your Cluster File System and create 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.

How to Verify the Installation and Configuration of DHCP

Use this procedure to verify the installation and configuration. This procedure does not verify that your application is highly available because you have not installed your data service yet.

  1. Check /etc/inet/dhcpsvc.conf

    Ensure that the parameters are set accordingly to your requirements

    • SERVER_MODE

    • PATH

    • DAEMON_ENABLED

  2. Check /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

This section contains the procedure you need to install the Sun Cluster HA for DHCP packages.

How to Install the Sun Cluster HA for DHCP Packages

Use this procedure to install the Sun Cluster HA for DHCP packages. 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.

  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.

How to Register and Configure Sun Cluster HA for DHCP

Use this procedure to configure Sun Cluster HA for DHCP as a failover data service. 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.

Otherwise, use this procedure to configure the Sun Cluster HA for DHCP data service.

  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. Create and register the DHCP component.


    # cd /opt/SUNWscdhc/util
    

    Edit the dhcp_config file and follow the comments within that file, i.e.


    # 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 nodename>@<node number>
    #    HAS_RS - name of the DHCP HAStoragePlus SC resource

    The following is an example for DHCP for a 2 node (tequila/sunrise) Sun Cluster 3.1 with IPMP.


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

    After editing dhcp_config you must now register the resource.


    # ./dhcp_register
    
  9. 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.

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

Use this procedure to verify that you installed and configured Sun Cluster HA for DHCP correctly.

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

  2. Ensure 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
    

Understanding Sun Cluster HA for DHCP Fault Monitor

Use the information in this section to understand 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

How to turn debug on for Sun Cluster HA for DHCP

Use 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 debug on 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, you will need to repeat this step on all nodes within Sun Cluster.

  1. Edit /etc/syslog.conf

    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 the command grep daemon /etc/syslog.conf, shows that daemon.debug has now 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

    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, simply reverse the steps above.