The DHCP server should be installed on all the nodes in cluster or on the nodes identified for running DHCP.
Create a shared NSS pool and volume for the DHCP server and cluster-enable the shared pool. You will configure the cluster resource later for DHCP services. For information, see Configuring Cluster Resources for Shared NSS Pools and Volumes
in the OES 2 SP3: Novell Cluster Services 1.8.8 Administration Guide for Linux. You need a unique, static IP address in the same IP subnet as the cluster to assign as the IP address for this DHCP cluster resource.
To ensure that the Novell Cluster Services is set up properly:
In iManager, select the
task.Click the
icon to open the eDirectory Object Selector. Browse to locate and select the Cluster object for the DHCP cluster. The list is displayed.Select the check box next to the Cluster Resource object that you created for the shared NSS pool, then click the
link.This opens the Cluster Resource Properties page to the
tab.Click the
tab to view a list of the nodes that are assigned as the preferred nodes for failover and migration.After executing these steps, you can mount the shared volume on the preferred nodes by using the Novell Client. The shared volume is mounted on the preferred node so that the directories and lease files are created. This process also assigns rights to the shared volume.
Ensure that association between the DHCP Server object and the DHCP Service object is set by using iManager. For details, see Viewing or Modifying a Service.
Use iManager to create a DHCP Subnet and a DHCP Pool object. For details, see Creating a Subnet Object and Creating a Pool Object.
or
Use Java Management Console for DHCP to create a DHCP Subnet and a DHCP Pool object. For details see Section 7.2.5, Subnet Management and Section 7.2.6, Pool Management.
The DHCP server by default uses the dhcpd user that is created in the local system during installation process. If you want to use another user, create the user by using the option in YaST.
After creating the user, update /etc/sysconfig/dhcpd file, then set the value of the variable DHCPD_RUN_AS to the new user.
Click the
task in iManager to open the Create User window. Specify the details and click to create user dhcpd or the new user in eDirectory.The user created in Step 4 needs to be LUM-enabled. To do this, click the task. This opens the Enable Users for Linux window. Search for and select the user created in Step 4, then click to select the user.
Make sure that every user belongs to a primary group. To add a user to a group, search for an
.Select the DHCPGroup object from the list.
Select the workstations to which the Linux-enabled user should have access.
Click
to confirm the selection.The user is now Linux-enabled, included in the DHCP Group, and granted access to cluster nodes.
Mount the shared volume on one of the nodes in the cluster.
Execute the following command at the command prompt:
/opt/novell/dhcp/bin/ncs_dir.sh <MountPath> <FQDN of Username with tree-name>
The MountPath parameter indicates the target directory in the volume where DHCP-specific directories are created.
For example, /opt/novell/dhcp/bin/ncs_dir.sh /media/nss/DHCPVOL/ cn=dhcpd.o=novell.T=MyTree;
When the script is executed, it creates the following folders:
/media/nss/DHCPVOL/etc
/media/nss/DHCPVOL/var/lib/dhcp/db
The script also takes care of assigning permissions for these directories.
Copy the /etc/dhcpd.conf file to /media/nss/DHCPVOL/etc directory and modify the LDAP attributes as required.
For example, ldap-server "192.168.0.1"; ldap-dhcp-server-cn "DHCP_acme";
Set the ldap-server attribute with the shared NSS pool IP Address.
Set the ldap-dhcp-server-cn attribute with the name of the DHCP server object that you want to use.
To hardlink, enable the shared volume on which the dhcpd.conf and dhcpd.leases files are hosted eg.DHCPVOL.
Invoke nsscon in the linux terminal and execute the following commands:
/ZLSSUpgradeCurrentVolumeMediaFormat=VolName /hardlinks=VolName
To ensure that hard links are enabled, execute the following commands in the shared volume:
touch testfile.txt ln testfile.txt testlink.txt unlink testlink.txt rm testfile.txt
If the hard link was successfully enabled, these commands execute without errors.
Open a terminal on the node where the shared volume is mounted and execute the following command at the prompt:
dhcpd -cf /media/nss/DHCPVOL/etc/dhcpd.conf -lf /media/nss/DHCPVOL/var/lib/dhcp/db/dhcpd.leases
This step ensures that the DHCP server can work on a cluster setup with shared volumes.
Stop the server by executing the following command at the prompt: killproc -p /var/run/dhcpd.pid -TERM /usr/sbin/dhcpd
Click
task in iManager. The Cluster objects are displayed.Select the DHCP Cluster resource that was created as part of Prerequisites and click . The Cluster Pool Properties are displayed. Click the tab. You can now view or edit the load or unload scripts.
Click
.Ensure that the DHCP load script is same as specified in DHCP Load Script.
Click
.Ensure that the DHCP unload script is same as specified in DHCP Unload Script.
Click
to save the changes.Set the DHCP resource online by using the
task in iManager.The load script contains commands to start the DHCP service.The load script appears similar to the following example:
#!/bin/bash . /opt/novell/ncs/lib/ncsfuncs exit_on_error add_secondary_ipaddress 10.10.2.1 exit_on_error nss /poolact=DHCPPOOL exit_on_error ncpcon mount DHCPVOL=254 exit_on_error ncpcon bind --ncpservername=DHCPCLUSTER_DHCPPOOL_SERVER --ipaddress=10.10.2.1 exit 0
Add the following line to the script before exit 0 to load DHCP:
exit_on_error /opt/novell/dhcp/bin/cluster_dhcpd.sh -m <MOUNT_POINT>
For example: MOUNT_POINT= /media/nss/DHCPVOL
Click
and continue with the unload script configuration.The unload script contains commands to stop the DHCP service. The unload script appears similar to the following example:
#!/bin/bash . /opt/novell/ncs/lib/ncsfuncs ignore_error ncpcon unbind --ncpservername=DHCPCLUSTER_DHCPPOOL_SERVER --ipaddress=10.10.2.1 ignore_error nss /pooldeact=DHCPPOOL ignore_error del_secondary_ipaddress 10.10.2.1 exit 0
Add the following line after the . /opt/novell/ncs/lib/ncsfuncs statement:
ignore_error killproc -p /var/run/dhcpd.pid -TERM /usr/sbin/dhcpd