Troubleshoot Windows 2000 DHCP server
Published: 21 Jan 2003 11:01 GMT
I'll go over the steps necessary to carry out a successful recovery of a broken DHCP installation on your Windows 2000 server. I'll also outline some best practices you can use to minimize the disruption caused by DHCP server problems. While these practices won't eradicate the problems that do crop up, they'll help you handle problems more efficiently -- and without an endless parade of users asking you why they can't use the LAN.
Start with the obvious
First things first: If DHCP-enabled clients aren't communicating with the rest of the LAN, you're obviously not going to sit right down at the DHCP server and try to figure out what's gone wrong. Remember Networking 101 and start with the basics:
- Check the PC's network cable(s) and the network card(s) first.
- Ping the local loopback address.
- Use the Ipconfig/all command at the command line of a workstation. If you get an address in the range 169.254.x.x on a Windows 2000 client, you'll know that the client was unable to obtain an IP address from the DHCP server.
- Try using the Ipconfig/release command followed by Ipconfig/renew. Reboot the failing workstation.
- Reinstall the TCP/IP stack on the failing workstation.
If the problem PCs are on a different subnet from the DHCP server and are connected by a non-BOOTP router, verify the status of the DHCP Relay Agent. If the router is BOOTP-capable, verify its status as well. This may seem obvious, but in the heat of the moment you can sometimes forget to check the basics, especially if you're further distracted when users begin to complain that they can't connect to the LAN.
Find the culprit
If running through the basic checklist doesn't solve the problem, you'll need to log on to the Windows 2000 server that is running the DHCP Server Service. Run through the basics on this machine as well, taking care to verify the physical integrity of the server and its components, particularly the network cable(s) and netcard(s). Then check the status of the DHCP Server Service and the IP address leases themselves. You can do this in the DHCP MMC by clicking Start | Programs | Administrative Tools | DHCP.
Next, check the Event Viewer to see if it has thrown up any error codes (event IDs) commonly associated with DHCP. These will most likely refer to JET database corruption. The DHCP database, which is a JET database called Dhcp.mdb and is located at %Systemroot% \System32 \Dhcp, can sometimes become corrupted, and this will be enough to throw your DHCP server off course.
Big JET databases, those over 25-30 MB in size, are most prone to corruption, so bear this in mind if your installation has problems. If you think this might be a cause of the problem, check the available disk space because insufficient space will prevent the DHCP server from servicing clients. Some common JET database error codes you'll see in Event Viewer include:
- The JET database returned the following Error: -510.
- The JET database returned the following Error: -1022.
- The JET database returned the following Error: -1850.
If you see any of these errors, your first course of action should be to perform an offline repair of the Dhcp.mdb file using a utility called Jetpack.exe. Jetpack is included on the Windows 2000 CD-ROM. To use Jetpack, open a command prompt on your Windows 2000 server and type jetpack database_name.mdb temporary_database_name.mdb, where database_name.mdb is the Dhcp.mdb file and temporary_database_name.mdb is any temporary database you create.
You can use the following commands to compact the DHCP database:cd %systemroot% \system32 \dhcpnet stop dhcpserverjetpack dhcp.mdb tmp.mdbnet start dhcpserver
In this example, Jetpack repairs and compacts the current Dhcp.mdb file into a new file called Tmp.mdb. It then deletes the original (corrupted) database file and renames Tmp.mdb, Dhcp.mdb. If your original Dhcp.mdb file was fairly big, you'll notice that the file size has shrunk, maybe significantly, once Jetpack has run.
If this method succeeds and the DHCP Server Service starts smoothly, your clients should be able to reconnect to the LAN and successfully renew their IP address leases.
Is your DHCP server a Windows NT server?
Note that the inclusion of dynamic compaction in Windows 2000 minimizes DHCP database corruption, which simply means that the same operation is carried out periodically without stopping the DHCP Server Service. However, this is not the case in Windows NT. If you're using a Windows NT server as a DHCP server, you must stop the DHCP Server Service before you run Jetpack.exe.




