Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


September 2001

Recovering DHCP


RSS
Subscribe to Windows IT Pro | See More Protocols Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
SideBar    DhcpExim in Action, Using Jetpack for Proactive Compacting

After you locate the backup copy of your DHCP database, take the following steps to restore the corrupt database:

  1. Use Win2K's Administrative Tools Services Console or NT 4.0's Control Panel Services applet to stop the DHCP service. Alternatively, you can issue the command
  2. net stop dhcpserver
    at a command prompt.

  3. To preserve the contents of the DHCP database folder, create a backup copy of the folder (\%systemroot%\system32\dhcp) in another location.


  4. Either use the DHCP Export Import (DhcpExim) utility to import the backup DHCP database, or copy the backup copy of the dhcp.mdb database file that's in the \%systemroot%\system32\dhcp\backup\jet\new folder to the primary DHCP database folder (\%systemroot%\system32\dhcp). You can also restore a backup copy of the database from an alternative source (e.g., a tape drive or other backup device, a replication partner server). However, use the direct file-copy method only if the two servers involved are running the same OS. For more information about the DhcpExim utility, see the sidebar "DhcpExim in Action."


  5. The DHCP service is still stopped, so take this opportunity to use the Jetpack utility to compact and verify the restored copy of the database. Go to a command prompt window, change to the \%systemroot%\system32\dhcp folder, and type
    jetpack dhcp.mdb tmp.mdb
    For more information about Jetpack, see the sidebar "Using Jetpack for Proactive Compacting," page 66.


  6. Restart the DHCP service.

The Microsoft article "How to Move a DHCP Database to Another Windows NT Server" (http://support.microsoft.com/support/kb/articles/q130/6/42.asp) recommends using the file-copy method rather than the DhcpExim utility when moving a database from an NT 4.0 system to a Win2K system. Don't follow this recommendation. For seamless cross-platform DHCP management and data migration, use the DhcpExim utility.

Regeneration Recovery
What can you do if you don't have a good backup of the DHCP configuration database? In that case, take the following steps to generate a new database from information stored in the registry:

  1. Stop the DHCP service through Win2K's Administrative Tools Services Console or NT 4.0's Control Panel Services applet or by issuing the command
  2. net stop dhcpserver
    at a command prompt.

  3. Move all files from the DHCP database folder (\%systemroot%\system32\dhcp) to another location, leaving an empty DHCP database folder in the original location.


  4. Restart the DHCP service.

This process causes DHCP to use the configuration information in the registry to regenerate the database.

After you complete this process, if you discover that your DHCP address-scope and address-reservation information is missing, you might need to take additional steps to complete the database recovery. In such cases, use the following procedure to restore a backup of the DHCP registry configuration data:

  1. Run regedt32.exe and navigate to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Configuration registry subkey.


  2. Click the Configuration subkey to select it, then select Restore from the Registry menu.


  3. When prompted for the name of the file to restore, input (or browse to locate) \%systemroot%\system32\dhcp\backup\dhcpcfg.


  4. Click Yes when the system asks you to confirm that you want to restore over the existing subkey.

After you regenerate a DHCP database, the Win2K Microsoft Management Console (MMC) DHCP snap-in or the NT 4.0 DHCP Manager shows the IP address scopes but doesn't show any active client leases, which brings us to the final step in the database regeneration method: reconciling active leases. This procedure verifies client leases currently recorded in the database (none at this point) against those recorded in the registry. You must perform this process for each scope on the DHCP server.

To reconcile leases for a particular scope on an NT 4.0 DHCP server, select the scope, then select Scope\Active Leases from the menu. In the resulting dialog box, click Reconcile, then click OK. For Win2K servers, in the left pane of the DHCP snap-in, right-click the scope for which you want to reconcile leases and select Reconcile from the drop-down menu, as Figure 1 shows. You must repeat this procedure for each scope on the server.

   Previous  1  [2]  3  Next 


Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Related Events WinConnections and Microsoft® Exchange Connections

Deep Dive into Windows Server 2008 R2 presented by John Savill

Managing IT Across Multiple Locations

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement