Get IT Done: DHCPexim helps migrate DHCP databases between Windows servers

Find out how to quickly migrate DHCP information with this utility

A dynamic host configuration protocol (DHCP) server has become a standard feature on modern networks—small, medium, and large—as it automates the assigning of IP addresses and network configurations to client machines. The bottom line is that DHCP servers are vital to almost every network.

So what happens if the DHCP server needs to be moved, if the DHCP hardware needs to be upgraded, or if the DHCP server crashes? In most of these cases, all of the DHCP information will need to be transferred to another machine. Depending on the complexity of the network, and the rules by which the information is transferred, this can be a burdensome task. In the past, it would have meant directly editing the registry on the target machine—and most IT professionals do not like to edit the registry directly, since it is too easy to make a mistake and disable a system.

However, Microsoft now provides a utility called DHCPexim to move the DHCP database from a Windows NT 4.0 Server or a Windows 2000 server to Windows 2000 Server, but a DHCP server must be properly configured to use DHCPexim. In this Daily Feature, I'm going to show you how to make it work.

Author's note
Windows 2000 Advanced Server was used for both the export and import portions of this article. These instructions should work equally well on Windows NT 4.0 Server, as specified in the README file that comes with the DHCPexim software.

Installation of DHCPexim
DHCPexim is one of the free tools included with the Windows 2000 Resource Kit and is available for download from the Microsoft Web site. The tool downloads as a self-extracting installer called DHCPexim_setup.exe. Once it is downloaded, you can simply double-click on the file to begin the installation.

A standard installer wizard will guide you through the installation. After the initial splash screen, you will be required to agree with the license agreement in order to proceed. Next is a prompt for where to install the software. By default the Windows 2000 Resource Kit is installed in <system_root>\Program Files\Resource Kit, and the DHCPexim installation chooses that location as well. You can accept the default or choose another directory and press the Install Now button to proceed. Note that Microsoft recommends the path name be kept short and kept the same for all resource kit tools that are installed, in order to facilitate later updates.

Installation will proceed and when it is completed a dialog box stating that installation was successful is displayed. No reboot is necessary since no system DLLs are changed or added.

The installation will have placed the following files in the directory chosen during the install:
  • DHCPEXIM.exe (the executable)
  • dhcpexim_license.txt (the end user license agreement)
  • DHCPEXIM_README (a description of the tool and basic directions for use)
  • ToolDownloadReadme.htm (a generic install/de-install guide for all the Windows 2000 Resource Kit free download tools)

The generic install/de-install file, ToolDownloadReadme.htm, suggests resource kit tools may be installed using the msiexec utility by using a .msi file. The download for DHCPexim did not contain a .msi file, so I did not test this. The generic install/de-install file also mentions the tools are only for installation under Windows 2000, although the Microsoft Web site and the included README file suggest the tool can be installed on Windows NT 4.0 Server with Service Pack 3 or higher.

Using DHCPexim
To run DHCPexim, find the icon for the executable in the directory chosen during the installation and double-click on it. When it opens, the dialog box shown in Figure A will be displayed.

Figure A

Since the originating DHCP server must be exported before another can be imported, choose the Export Configuration Of The Local Service To A File radio button.

This option is to read the content of all or part of the DHCP database and write it to a file. A standard file save box will be presented. Choose a directory and enter a file name (e.g., "dhcp_export") and then choose Save (it is possible to save the file to a share on the new DHCP server, and that's one of the easiest ways to transfer the file).

Once the file is chosen, a dialog box is present with all the scopes available on the DHCP server being exported. Choose the scopes that are to be exported using standard Windows selection techniques, such as [Shift]-click and/or [Ctrl]-click for multiple selections.

Note the Disable The Selected Scopes On Local Machine Before Export check box. This option should be selected to avoid the current DHCP server assigning network information during the export. If this option is not chosen, the Windows DHCP Manager can be used to disable the desired scopes, or the DHCP service can be stopped.

Once the scopes are selected, click Export. When the export is completed, a dialog box will be displayed saying, "The operation completed successfully." The file created is not readable, but it is ready for import to another DHCP server via the utility.

Once the export is completed, be sure to go back to the DHCP Manager and re-activate any scopes that the DHCP server is going to manage, or restart the DHCP service if it was stopped for the export.

To import the file into another DHCP server, the DHCPexim utility must be installed on that (Windows 2000) server. Follow the same installation instructions presented above. Once DHCPexim has been installed, find the directory chosen during the installation and launch the DHCPexim executable. Since this is the destination server, choose the second radio button (in Figure A), Import Configuration To The Local Service From A File.

A standard file selection dialog box will be opened. Find the file previously exported, in this case "dhcp_export," and choose Open. The DHCPexim utility will verify the format of the file, and if the file is valid, a dialog box with several import options will be presented. Using standard Windows selection techniques, choose all or some of the available scopes and click Import. If the import is successful, a dialog box will be displayed with the message: "The operation completed successfully."

Make sure the DHCP service is running and all the imported scopes have been activated. At this point, the transfer is complete.

Uninstalling DHCPexim
If DHCPexim is no longer needed, or does not perform as expected, it can be uninstalled using the standard Add/Remove Program Control Panel. Under Windows 2000, it is listed as "Microsoft Tool Web Package:dhcpexim.exe."

Summing up DHCPexim
DHCPexim is a free utility, and as such, it is a little rough around the edges. Some of the dialog boxes could be a little more descriptive, and it could use a little aesthetic work, but it does perform its advertised function well.

Not all networks are complex enough to have more than one DHCP scope, or more than one DHCP server, but this utility can still be useful in simply making a backup of the DHCP configuration and having it available in case there is ever a server failure.

Further study
If you would like to read more on DHCP, the Windows 2000 Resource Kit, or how DCHP is handled in the registry, please consult the following links:
  • See for more in-depth information on DHCP.
  • Click here for information on the Windows 2000 Resource Kit
  • Click here for more information on manually migrating DHCP databases and the registry entries.


Editor's Picks

Free Newsletters, In your Inbox