Novell is now a part of Micro Focus

Migrating DHCP from OES 1.0 to OES 2.0 Linux

Novell Cool Solutions: Feature
By Bindu Nayar, Sulabh Sharma

Digg This - Slashdot This

Posted: 19 Oct 2007

The purpose of this document is to assist the users in migrating their DHCP configuration from OES 1.0 (file based DHCP Server) to OES 2.0 (directory integrated DHCP Server). In the steps mentioned below, the entire configuration inside the dhcpd.conf file is converted in to ldif format and then this ldif file is loaded on to eDirectory. There are no restrictions on the format or hierarchy of the configuration elements within the file. But, LDAP schema imposes some restrictions. Above that, Novell DHCP doesn't support all DHCP configurations and is more restrictive, e.g. hosts can be strictly under subnet or service only. So, the administrator may have to make changes to configuration before using this procedure.

The following sections will give you details on the migration procedure.

1. Requirements

  • Novell-NLDAPbase package install on the OES 2.0 Linux Server to use the 'ldapmodify' API.
  • DHCP Server should be installed on the OES 2.0 Linux Server.

2. Migration Procedure

  • From OES 1.0 server, copy the conf file (/etc/dhcpd.conf ) to OES 2.0 Linux server (SOMEFOLDER).
  • Run the following command on the OES 2.0 server's terminal.
perl /usr/share/doc/packages/dhcp-server/ -basedn $BASE -dhcpdn

$SERVICEDN -server $SERVERNAME -conf SOMEFOLDER/dhcpd.conf -ldif

BASE is the context on the eDirectory where you want your Server and Service objects to get created.

SERVICEDN is the FQDN(Fully Qualified Distinguished Name) of the Service object you want to create.

SERVERNAME is name of the Server Object.

For example, if you have the following values for the above variables-

BASE: "o=novell"
SERVICEDN: "cn=dhcpService,o=novell"
SOMEFOLDER = "/home/dhcp"

Then your command looks like this:

perl /usr/share/doc/packages/dhcp-server/ -basedn "o=novell" -dhcpdn
"cn=dhcpService,o=novell" -server "DHCP_SERVER" -conf /home/dhcp/dhcpd.conf -ldif

The above command creates the dhcpd.ldif file inside the /home/dhcp folder. This file contains all the configuration inside the /etc/dhcpd.conf file in the ldif format..

  • Now run the following command on the terminal:
/opt/novell/eDirectory/bin/ldapmodify -a -h $TARGET -p $TARGETPORT -f
SOMEFOLDER/dhcpd.ldif -x -c -w $PASSWORD -D $ADMINDN in case of non ssl port.
/opt/novell/eDirectory/bin/ldapmodify -a -h $TARGET -p $TARGETPORT -f
SOMEFOLDER/dhcpd.ldif -x -c -w $PASSWORD -D $ADMINDN ?E in case of ssl port.
TARGET = Tree IP Address
TARGETPORT = port number
ADMINDN = Tree Admin DN
PASSWORD = Tree Admin Password

For example, if you have the following values for the above variables-

ADMINDN = "cn=admin,o=novell"
PASSWORD = passwd
SOMEFOLDER = /home/dhcp

Then your command looks like this:

/opt/novell/eDirectory/bin/ldapmodify -a -h -p 636 -f /home/dhcp/dhcpd.ldif
-x -c -w passwd -D "cn=admin,o=novell" ?E

The above command creates the DHCP Server Object and DHCP Service Object in the specified BASEDN. All the other configuration objects (Subnets, hosts, Address Pools etc..) are created inside the Service object.

  • Since there is no difference in the lease data format, same lease file, as on OES 1.0 can be used for the DHCP Server on OES 2.0.
  • Using iManager, log in to the tree and click on the "View Objects" button at the top Panel.
  • Browse to the dhcpLocator object on the tree using the Tree browse Panel.
  • Now select the dhcpLocator object and click on Edit.
    A popup appears with the attribute details.
    1. Select the dhcpServerDN attribute and add the DN of the DHCP Server created after migration.
    2. Select the dhcpServiceDN attribute and add the DN of the DHCP Service object created after migration.
  • Now, click on the "Roles and Tasks" button on iManager and select DHCP (OES Linux).
  • Go to the DHCP Service object and associate the service to the DHCP Server object.
    If the user has an existing DHCP Server on the target (OES 2.0 Linux)server and wants to link the migrated server's configuration with this existing server, then user needs to associate the service object associated with the migrated server to the existing DHCP Server on the target OES 2.0 server, using iManager in the step above.

3. Post Migration Steps

  1. In the /etc/dhcpd.conf file, change ldap-base-dn to reflect the context of the migrated DHCP Server and change ldap-dhcp-server-cn to reflect the name of the migrated DHCP Server.

    For example:
    ldap-base-dn "o=novell"
    ldap-dhcp-server-cn "Migrated_DHCP_Server"

  2. Copy the dhcpd.leases file from OES 1.0 to the /var/lib/dhcp/db folder on the OES 2.0 server.

  3. Start the OES 2.0 Linux DHCP server by using the rcdhcpd start command

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates