DHCP Database TopicsPerhaps you have never given the DHCP database a thought. Well the time may come where you need to backup, reconcile or compact the DHCP database. At the very least, I expect you will want to check your lease statistics. Tutorial Topics for DHCP Database
‡ DHCP – Display StatisticsBizarrely, I find ‘Display Statistics’ the most difficult tab to find on the DHCP server. This is because it’s the first item on the menu, and is often masked by the very highlight that should attract me. I just hope that you are not afflicted by this blind spot. In any event, Display Statistics is one of the most interesting and rewarding items on the DHCP menu. Display Statistics is available at both the server and the scope level. My first thought is, ‘How many leases are left?’ Next, I look to see if there have been any NACKS or lease declines. See the screen shot to find the Display Statistics… menu. DHCP DatabaseDHCP has its own database. Stored in this DHCP.mdb are the addresses, scopes and leases of the clients. Understanding this database will help you backing up and restore a DHCP server. Check out this folder: %systemroot%\system32\dhcp\dhcp.mdb As time goes by the database will grow, and best practice dictates that you should consolidate the database by freeing up space taken up by old leases. The procedure for compacting the dhcp.mdb database is this. 1) Stop the DHCP service. Either right-click the DHCP Server icon, select All tasks then Stop. Alternatively, go to the command line and type: NET Stop DHCPServer. (For once the command really is DHCPserver, NOT DHCPyourservername.) 2) At the command line, navigate to: %systemroot%\system32\dhcp\dhcp.mdb. 3) Jetpack dhcp.mdb temp.mdb. What this does is copies the existing database, compacts it, then copies it back to the original location – clever. 4) Remember to restart DHCP. Either use the GUI, or if you are at the command line, NET Start DHCPServer Warning: Do not ‘mess’ with any of the files that you find in the %systemroot%\system32\dhcp folder, if you do, then DHCP will stop working and you will either have to restore, or else re-install DHCP. Backing up the DHCP DatabaseThe first surprise is that this dhcp.mdb database is backed up every hour. The second surprise is that the old jetpack database engine controls the database. The third surprise is that you can only automatically backup to a local folder. Should you need a ‘real’ backup, then just backup the files in the %systemroot%\system32\dhcp\Backup\ directory. Finally, and unsurprisingly, there is a GUI to backup the DHCP database. Guy Recommends: A Free Trial of the Network Performance Monitor (NPM) |