ZDNet UK


Skip to Main Content

ZDNet.co.uk - Winner of Best Business Website 2007
  1. Home
  2. News
  3. Blogs
  4. Reviews
  5. Jobs
  6. Resources
  7. Community
  8. My ZDNet

 

ZDNet UK RSS Feeds


Processors Toolkit

Troubleshoot Windows 2000 DHCP server

Peter Parsons

Published: 21 Jan 2003 11:01 GMT

  • Email
  • Trackback
  • Clip Link
  • Print friendly
  • Post Comment

Well, that didn't work -- now what?
It's quite possible that the above procedure won't solve the problem. If it doesn't, you have other options. Chief among these will be to restore a copy of the DHCP database from a backup. You can try this from a prior tape backup or from the \Backup folder under the \System32 \Dhcp folder.

If you do take this route, be sure to stop the DHCP Server Service first, and then make a new backup copy of the entire current (and possibly corrupted) System32 \Dhcp folder, preserving the folder hierarchy to a separate backup location or device from the one you're going to restore from. Next, delete all the files in \System32 \Dhcp and restore their equivalents from your secondary backup location. Then make sure to run the Jetpack.exe utility against the newly restored Dhcp.mdb file before restarting the service.

Once you've restarted the service and checked all the scope and lease information, you may see that not all of it is correct and up to date, and you may not see any of the active leases or reservations. This is because there's an inconsistency between what's in the backup and what's in the server's registry key.

To reconcile these two so that your DHCP database is consistent, open the DHCP console and choose Reconcile All Scope from the Action menu. This will open a dialog box called Reconcile Database in which you must click Verify. This runs through the DHCP database to check for inconsistencies. If it encounters any, it displays the relevant IP address information, which you need to select and then click Reconcile. Once the reconciliation is complete, the data is added back to the Active Leases for each scope. This information is based on the contents of the registry key atHKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \DHCPServer.

Restart the DHCP Server Service. If you subsequently notice that individual client lease information is incorrect, don't worry too much, because this will be corrected the next time the clients renew their DHCP leases. In fact, I recommend that you aim to have all the clients renew their leases as soon as possible thereafter so that your Active Leases and Reservations information will be correct, and you can make an immediate backup of the newly restored DHCP database.

Nope, it's still not working
The remedies I've described all assume that your DHCP server is in good physical health. However, if this is not the case and you need to repair or replace some hardware, you'll have to move the function of the DHCP server to another machine. This is not as complicated as it sounds, and you can do it fairly quickly and without the need to recreate a DHCP database from scratch. There are two phases to this procedure, the first on the source DHCP server and the second on the destination DHCP server.

First, on the source DHCP server, stop and disable the DHCP Server Service. Copy the DHCP folder hierarchy to a temporary location on the destination server. For example, copy %Systemroot \System32 \Dhcp to C: \Tempdhcp. Start the Registry Editor (Regedt32.exe) and find the HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \DHCPServer key. Save this key to a text file using Save Key from the File menu. (Make sure you don't choose Save Subtree As!) Finally, make sure this text file is available on the Destination DHCP server.

In the next phase, you must go to the destination DHCP server. Make sure the DHCP Server Service is installed and that the server has been rebooted. Stop the DHCP Server Service. Find the temporary location to which you copied the DHCP folder hierarchy in phase one. In this example, it would be C: \Tempdhcp.

Find the System.mdb file and rename it System.src. Move the \Sytem32 \Dhcp folder hierarchy (containing the renamed file) into this server's existing DHCP folder structure, thereby replacing it. Open the Registry Editor, and find and select the DHCPServer key, which is located in the HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \DHCPServer hive. Restore the registry key you saved as a text file in phase one to this location.

When you're prompted for a File Name in the Restore Key operation, use this path: Systemroot \System32 \Dhcp \Backup \Dhcpcfg. When prompted, click Yes, which will overwrite the current registry values with the ones you've transferred from the Source DHCP server.

Finally, close the Registry Editor and restart the DHCP Server Service. Open the DHCP Server console and choose the Reconcile All Scopes as I outlined earlier.

After doing so, you'll have successfully moved and recreated a working DHCP database on a new server. Be sure to renew all client IP address leases and make a backup of the new DHCP server installation as soon as possible.

  • Email
  • Trackback
  • Clip Link
  • Print friendlyPrint with Konica

Did you find this article useful?
134 out of 236 people found this useful


Full Talkback thread

0 comments

Company/Topic Alerts

Create a new alert from the list below:














Discussions

Luc Bollen Luc Bollen

ISO or Microsoft ?

Tuesday 7 October 2008, 11:19 AM

1 comment