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 | |
Verify installation and configuration | |
Install Sun Cluster HA for DHCP Packages | |
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 | |
Debug Sun Cluster HA for DHCP |
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 |
This section contains the information you need to plan your Sun Cluster HA for DHCP installation and configuration.
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.
The Sun Cluster HA for DHCP data service can only be configured as a failover service – DHCP cannot operate as a scalable service and therefore the Sun Cluster HA for DHCP data service can only be configured to run as a failover service.
DHCP server – DHCP has to operate as a DHCP server and not as a relay host.
DHCP single instance – Only one DHCP resource can be configured within Sun Cluster.
DHCP network table – The DHCP network table can be text or binary files and can be mounted as either a Failover File System (FFS) or a Global File System (GFS).
It is considered best practice when mounting Global File Systems to mount them with the /global prefix and to mount Failover File Systems with the /local prefix. However, be aware that this is simply viewed as best practice.
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.
DHCP component and its dependencies —The Sun Cluster HA for DHCP data service can be configured to protect a DHCP component. This component and its dependencies are briefly described below.
Table 1–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.
# 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 # 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 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@tequila@1/192.168.100.0@sunrise@2 # RS= RG= PORT= LH= NETWORK= HAS_RS= :::::::::::::: util/dhcp_register :::::::::::::: # # Copyright 2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # . `dirname $0`/dhcp_config scrgadm -a -j $RS -g $RG -t SUNW.gds \ -x Start_command="/opt/SUNWscdhc/bin/start_dhcp \ -R $RS -G $RG -N $NETWORK " \ -x Stop_command="/opt/SUNWscdhc/bin/stop_dhcp \ -R $RS -G $RG -N $NETWORK " \ -x Probe_command="/opt/SUNWscdhc/bin/probe_dhcp \ -R $RS -G $RG -N $NETWORK " \ -y Port_list=$PORT/tcp -y Network_resources_used=$LH \ -x Stop_signal=9 \ -y Resource_dependencies=$HAS_RS # |
Sun Cluster HA for DHCP data service – requires Solaris 8 7/01 (or later) with patches 109077-07 (or later) and 111302-01 (or later) or Solaris 9.
/etc/inet/dhcpsvc.conf parameters – The following /etc/inet/dhcpsvc.conf parameters have to be set.
DAEMON_ENABLED should always be true
PATH should point to the Cluster File System for the DHCP network table
RUN_MODE should always be SERVER
RESOURCE is set to either SUNWbinfiles or SUNWfiles
The following parameter in etc/inet/dhcpsvc.conf cannot be set
INTERFACE
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.
With respect to responses to DHCP requests, SUNWbinfiles should be used for the DHCP network table to achieve the best DHCP performance.
This section contains the procedures you need to install and configure DHCP.
Use this procedure to install and configure DHCP.
Install the following packages from the Solaris CD
SUNWdhcsu
SUNWdhcsb
SUNWdhcm
Mount DHCP Cluster File Systems – You must ensure that the Cluster File System for the DHCP network table is mounted.
If a Failover File System is used by the DHCP network table, you must mount this manually.
Install the required DHCP patches — Refer back to the Configuration Requirements for a list of patches that need to be installed.
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
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
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.
Ensure that DHCP is stopped on all nodes
# /etc/rc2.d/K21dhcp stop |
Disable DHCP startup on boot on all nodes
# rm /etc/rc3.d/S34dhcp |
This section contains the procedure you need to verify the installation and configuration.
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.
Check /etc/inet/dhcpsvc.conf
Ensure that the parameters are set accordingly to your requirements
SERVER_MODE
PATH
DAEMON_ENABLED
Check /etc/inet/dhcpsvc.conf is consistent on all nodes within Sun Cluster
Check that DHCP startup on boot has been disabled
This section contains the procedure you need 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.
Load the Sun Cluster Agents CD-ROM into the CD-ROM drive.
Run the scinstall utility with no options.
This step starts the scinstall utility in interactive mode.
Choose the menu option, Add Support for New Data Service to This Cluster Node.
The scinstall utility prompts you for additional information.
Provide the path to the Sun Cluster Agents CD-ROM.
The utility refers to the CD as the “data services cd.”
Specify the data service to install.
The scinstall utility lists the data service that you selected and asks you to confirm your choice.
Exit the scinstall utility.
Unload the CD from the drive.
This section contains the procedures you need to 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.
Become superuser on one of the nodes in the cluster that will host DHCP.
Register the SUNW.gds resource type.
# scrgadm -a -t SUNW.gds |
Register the SUNW.HAStoragePlus resource type.
# scrgadm -a -t SUNW.HAStoragePlus |
Create a failover resource group .
# scrgadm -a -g DHCP-failover-resource-group |
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 |
Create a resource for the DHCP Logical Hostname.
# scrgadm -a -L -j DHCP-lh-resource \ -g DHCP-failover-resource-group \ -l DHCP-logical-hostname |
Enable the failover resource group that now includes the DHCP Disk Storage and Logical Hostname resources.
# scswitch -Z -g DHCP-failover-resource-group |
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 |
Enable each DHCP resource.
Repeat this step for each DHCP component as in the previous step.
# scstat |
# scswitch -e -j DHCP-resource |
This section contains the procedure you need to verify that you installed and configured your data service correctly.
Use this procedure to verify that you installed and configured Sun Cluster HA for DHCP correctly.
Become superuser on one of the nodes in the cluster that will host DHCP.
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 |
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 |
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.
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.
DHCP
Sleeps for Thorough_probe_interval
Checks that the in.dhcpd daemon is still running. If this fails then the probe will restart the DHCP resource.
Checks if PNM (Public Network Monitoring) or IPMP (IP Multi Pathing) has changed the active interface for the network that DHCP is using. If this fails then the probe will restart the DHCP resource.
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.
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 # |
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 # |
To turn off debug, simply reverse the steps above.