Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

August 14, 2001 12:00 AM

Recovering DHCP

Windows IT Pro
InstantDoc ID #21841
Rating: (0)
Techniques and tools for repairing this crucial network service

Users logging on, file servers serving, applications running—music to the ears of administrators and network users. Isn't life great when the network is running smoothly? Life is so great that you can easily forget how quickly your utopian computing world can come crashing down when a crucial network service fails. In a matter of minutes, your smoothly functioning masterpiece of connectivity can dissolve into a living nightmare.

DHCP is one of a set of services (others include Active Directory—AD—and WINS) that every Windows 2000, Windows NT, and mixed-environment network uses to provide essential functions to network users and applications. Knowing DHCP's vulnerabilities and being familiar with recovery techniques and tools will help you quickly recover when DHCP isn't functioning properly. In many cases, successful recovery also depends on you taking some necessary preparatory steps. To be sure that you're prepared to administer CPR should DHCP ever need it, let's review DHCP recovery.

DHCP: A Blessing and a Curse
In NT 3.5, Microsoft introduced an implementation of a new IP address­assignment protocol called DHCP. (Internet Engineering Task Force—IETF—Request for Comments—RFC—1531 defines DHCP.) Since then, DHCP has won the hearts and minds of many Win2K and NT network administrators. DHCP eliminates the administrative burden of manually configuring TCP/IP on network workstations. In addition, DHCP lets you automatically assign IP addresses to clients and configure additional properties of clients' IP stacks, such as the default gateway, DNS and WINS servers, and the WINS node type.

Although DHCP has been an administrative boon, it also presents challenges. One of the biggest problems with DHCP is that it doesn't provide solid fault-tolerance features. Microsoft designed its DHCP services so that one server on each subnet provides DHCP services to the clients on that subnet. Network administrators must configure network routers to pass BOOTP or DHCP requests from clients on one subnet to a DHCP server on a different subnet. (The IETF defines BOOTP forwarding in RFC 1542.) In this scenario, a DHCP server can respond to a remote client's DHCP request only if you've configured the server to serve addresses that are appropriate for the remote client's subnet.

This setup isn't convenient or realistic for many organizations because it requires each server to hold nonoverlapping IP address scopes for multiple subnets. These addresses are effectively unusable because the server is holding them for remote clients' use. In privately addressed networks (e.g., those using the subnet mask 10.x.x.x, 192.168.x.x, or 172.16.x.x), this situation doesn't pose much of a problem because IP addresses are free and plentiful. However, this solution isn't ideal for you if you're using routable IP addresses that your ISP has assigned and you don't have many to spread among multiple DHCP servers or if you have a complex network that contains many IP subnets.

During the development of Win2K, Microsoft promised to provide new fault-tolerance features in Win2K's DHCP services. However, the company actually delivered these features only for DHCP servers running in a clustered configuration, which requires the significantly more expensive Win2K Advanced Server or Win2K Datacenter Server and cluster-compatible hardware. As a result, in Windows networks that don't run Win2K AS or Win2K Datacenter, each network subnet tends to depend strongly on one DHCP server.

Reviving DHCP Services
Unless your DHCP servers run in a clustered Win2K configuration, a failure of the DHCP service or the server hosting it will cause you some major headaches. (For information about how to add DHCP to a clustered server configuration, see "Related Articles.") If DHCP fails, clients that have existing DHCP leases will continue to function properly, but new clients that want to request an IP address or those that attempt to renew their DHCP lease with the server will be unable to do so. When your DHCP service is unavailable, you can use one of two revival remedies: restore the functionality of the existing service or move the DHCP service to another server.

Repairing DHCP services on the original server is the desirable option if the server is operable but the DHCP service is malfunctioning as a result of a corrupt DHCP database. The DHCP database, dhcp.mdb, is a Jet database that contains DHCP server configuration data about address scopes and active client leases. On Win2K and NT DHCP servers, most of the configuration data in this database is mirrored in the system registry in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Configuration registry subkey.

Like any database, DHCP's configuration database can become damaged or acquire invalid data. A telltale sign of DHCP database corruption is the appearance of event ID 1014 error messages in a DHCP server's System event log. These messages' Source is DhcpServer, and their Description includes a reference to Jet database error code 510, 1022, or 1850. (For a list of Jet database error codes and their descriptions, see "Related Articles.") If your DHCP database is corrupt, you can restore a known good copy of the database or regenerate the database from the DHCP server registry subkey.

Restoring the database from a known good copy is the easier option if a recent backup is available. By default, Win2K and NT 4.0's DHCP services automatically create a backup copy of the DHCP database once per hour in the server's \%systemroot%\system32\dhcp\backup\jet\new folder. (To modify the frequency of these backups, change the value of the BackupInterval parameter in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Parameters subkey from the default setting of 60 minutes.)

Related Content:

ARTICLE TOOLS

Comments
  • Earl Hinkle
    10 years ago
    May 08, 2002

    Sean Daily's articles about recovering essential network services, "Recovering WINS" (March 2002, InstantDoc ID 23833) and "Recovering DHCP" (September 2001, InstantDoc ID 21841), were very informative, especially the suggestions about preparing for disaster. Do you recommend a time interval (e.g., once a month, once a quarter, once a year) for performing the maintenance for those crucial services? Also, have you written any articles about preparing for disaster recovery on Windows 2000 Server or Active Directory (AD)? I'm developing a maintenance schedule and plan to implement the recommendations from your articles.



    ---------------------------------------------------


    How frequently you need to perform the maintenance services I discussed in the articles depends on the size of your organization. Large networks will have an inherently greater use of services such as WINS and DHCP than small networks will have. Thus, performing more frequent maintenance tasks on the databases these services use is important for large networks. In any case, a quarterly maintenance schedule is an absolute minimum*
    a monthly schedule is a better idea for all but the smallest networks.
    Search the archive on Windows & .NET Magazine's Web site (http://www.winnet
    mag.com/magazine) to find other recovery-oriented articles. Look for the third part of my recovering essential services series, "Recovering AD," in an upcoming issue of the magazine.

    --Sean Daily

  • Rick De Bucce
    10 years ago
    Feb 05, 2002




    Sean Daily's article lists several steps to prepare for DHCP disaster. I'd like to replicate the DHCP database to another location. The article mentions using Windows 2000 or Windows NT's replication feature to perform this task. How do you do that, and which file do you replicate (e.g., dhcp.mdb in \\%systemroot%\\system32\\dhcp\\backup\\jet\\newfolder)? I was thinking of using a batch job to pull all the DHCP databases in our enterprise to one location for our administrators to access. Would you recommend that we pull the backup copy of dhcp.mdb that Win2K creates?



    Rick De Bucce


    I'd handle this task exactly as you suggest: Create a job on each server to stop the service, back up the current database to a centralized location (perhaps with a subfolder of the server's name or some similar method of keeping different DHCP server databases labeled and separated), and restart the DHCP service. The location you mentioned would be the backup of the database*you'll probably want to back up the current version of dhcp.mdb in the \\%systemroot%\\system32\\dhcp folder.



    Sean Daily

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.