Thursday, 8 September 2016

Managing DHCP Database

               DHCP is a Dynamic database, which frequently updates the IP address leased, erase the expired ones, contains the configuration data, DHCP options, Information about scopes, reservation etc. The most important file for DHCP is the dhcp.mdb as shown below.
    This is the actual DHCP database itself and the second important files are the service log files. There will be separate log files for each day of the week. It has the information about when the DHCP service started, stopped, lease information etc. The dhcp.pat file is used in multi scope environment to determine which scope has to be used to lease based on the DHCP relay agent's IP. The j50.chk file ensures the changes are being written to the database. The j50tmp is used during the maintenance of the database for temporary storage of changes. 

       There is an automatic backup of DHCP server in each 60 minutes. By default it will go to c:\windows\system32\dhcp\backup folder.
Even though we can change the backup path, it should be local to the server. To manually backup the DHCP database, open the dhcp console and  right click the server and you will get the option to backup.
By default this backup will go to the exact same location as automatic backup and it will overwrite that. So always choose an alternate path.
                To restore right click on the server from dhcp console and choose restore. It will go to the default automatic location to choose the file or you have to navigate to the exact location in which you backup.

                        If you want to decommission the old DHCP server, you can copy the backup to a removable drive. Either stop the DHCP service or shutdown the old server. Setup DHCP in the new server and restore the database from the removable media.

Reconciling a Scope

  The summary of DHCP lease,reservation etc are kept in the registry. Reconciling will check for inconsistencies between this registry summary and actual DHCP database. To reconcile the scope, right click the scope and click on reconcile.
Click verify to check for inconsistencies. 
 In case the DHCP server detects any inconsistencies, it allows the administrators to rectify the issue. While rectifying, the DHCP server uses the detailed information about the DHCP client computers, and assigns the inconsistent IP address settings to the corresponding client computers for a specific predefined lease duration.

                      With this approach, when the lease duration expires, all the inconsistent and inappropriately assigned IP addresses are revoked back to the DHCP IP address pool, hence making the entire DHCP database consistent.

No comments:

Post a Comment