Sun Cluster Data Service for DHCP Guide for Solaris OS

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 

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

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.31 cluster you must reconfigure the DHCP resource, due to changes in the agent.


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

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.



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.


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.

How 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.

  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 Java Enterprise System Accessory CD Volume 3.

If you are installing more than one data service simultaneously, perform the procedure in “Installing the Software” in Sun Cluster 3.1 10/03 Software Installation Guide.

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


Note –

The Web Start program is not available in releases earlier than Sun Cluster 3.1 Data Services 10/03.


How 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.


Note –

If you are working at a machine that is remotely connected to the machine where the CD-ROM is loaded, be careful. If you intend to run the Web Start program with a GUI, ensure that your DISPLAY environment variable is set. Otherwise, the Web Start program runs with the CLI.


  1. Become superuse on the cluster node where you are installing the Sun Cluster HA for DHCP packages.

  2. Load the Sun Java Enterprise System Accessory CD Volume 3 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.

  3. 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
    
  4. Start the Web Start program.


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

    • To install only the C locale, select Typical.

    • To install other locales, select Custom.

  6. Follow 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. You can view logs that the Web Start program created in the /var/sadm/install/logs directory.

  7. Exit the Web Start program.

  8. Unload the Sun Java Enterprise System Accessory CD Volume 3 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
      

How 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.

  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

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.

  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.

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

  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
    

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.

How to turn on debug for Sun Cluster HA for DHCP

  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.