2.Press and hold or right-click a reservation, and then tap or click Properties. You can now modify the reservation properties. You can’t modify options that are shaded, but you can modify other options. These options are the same options described in the previous section.
Deleting leases and reservations
You can delete active leases and reservations by following these steps:
1.In the DHCP console, expand the scope with which you want to work, and then tap or click the Address Leases folder or Reservations folder, as appropriate.
2.Press and hold or right-click the lease or reservation you want to delete, and then tap or click Delete.
3.Confirm the deletion by tapping or clicking Yes.
4.The lease or reservation is now removed from DHCP; however, the client isn’t forced to release the IP address. To force the client to release the IP address, log on to the client that holds the lease or reservation and enter the command ipconfi /releaseat an elevated command prompt.
Backing up and restoring the DHCP database
DHCP servers store DHCP lease and reservation information in database files. By default, these files are stored in the %SystemRoot%\System32\DHCP directory. The key files in this directory are used as follows:
■ Dhcp.mdbThe primary database file for the DHCP server
■ J50.logA transaction log file used to recover incomplete transactions in case of a server malfunction
■ J50.chkA checkpoint file used in truncating the transaction log for the DHCP server
■ J50000 NN .logA reserved log file for the DHCP server
■ Tmp.edbA temporary working file for the DHCP server
Backing up the DHCP database
The %SystemRoot%\System32\DHCP\Backup folder contains the backup information for the DHCP configuration and the DHCP database. By default, the DHCP database is backed up every 60 minutes automatically. To manually back up the DHCP database at any time, follow these steps:
1.In the DHCP console, press and hold or right-click the server you want to back up, and then tap or click Backup.
2.In the Browse For Folder dialog box, select the folder that will contain the backup DHCP database, and then tap or click OK.
Registry keys that control the location and timing of DHCP backups, in addition to other DHCP settings, are located under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\DHCPServer\Parameters.
The following keys control the DHCP database and backup configuration:
■ BackupDatabasePathSets the location of the DHCP database. You should set this option through the DHCP Properties dialog box. Tap or click the Advanced tab, and then set the Database Path as appropriate.
■ DatabaseNameSets the name of the primary DHCP database file. The default value is DHCP.mdb.
■ BackupIntervalDetermines how often the DHCP client information database is backed up. The default is 60 minutes.
■ DatabaseCleanupIntervalDetermines how often the DHCP service deletes expired records from the DHCP client information database. The default is four hours.
Restoring the DHCP database from backup
In the case of a server crash and recovery, you might need to restore and then reconcile the DHCP database. To force DHCP to restore the database from backup, follow these steps:
1.If necessary, restore a good copy of the %SystemRoot%\System32\DHCP\Backup directory from the archive. Afterward, start the DHCP console, press and hold or right-click the server you want to restore, and then tap or click Restore.
2.In the Browse For Folder dialog box, select the folder that contains the backup you want to restore, and then tap or click OK.
3.During the restoration of the database, the DHCP Server service is stopped. As a result, DHCP clients are temporarily unable to contact the DHCP server to obtain IP addresses.
Using backup and restore to move the DHCP database to a new server
If you need to rebuild a server providing DHCP services, you might want to move the DHCP services to another server prior to rebuilding the server. To do this, you need to perform several tasks on the source and destination servers. On the destination server, do the following:
1.Install the DHCP Server service on the destination server, and then restart the server.
2.Stop the DHCP Server service in the Services console.
3.Delete the contents of the %SystemRoot%\System32\DHCP folder.
On the source server, do the following:
1.Stop the DHCP Server service in the Services console.
2.After the DHCP Server service is stopped, disable the service so that it can no longer be started.
3.Copy the entire contents of the %SystemRoot%\System32\DHCP folder to the %SystemRoot%\System32\DHCP folder on the destination server.
Now all the necessary files are on the destination server. Start the DHCP Server service on the destination server to complete the migration.
Forcing the DHCP Server service to regenerate the DhCP database
If the DHCP database becomes corrupt and Windows is unable to repair the database when you stop and restart the DHCP Server service, you can attempt to restore the database as described in “Restoring the DHCP database from backup” earlier in this chapter. If this fails or you prefer to start with a fresh copy of the DHCP database, follow these steps:
1.Stop the DHCP Server service in the Services console.
2.Delete the contents of the %SystemRoot%\System32\DHCP folder. If you want to force a complete regeneration of the database and not allow the server to restore from a previous backup, you should also delete the contents of the Backup folder.
CAUTION Don’t delete DHCP files if the DHCPServer registry keys aren’t intact. These keys must be available to restore the DhCP database.
3.Restart the DHCP Server service.
4.No active leases or other information for scopes are displayed in the DHCP console. To regain the active leases for each scope, you must reconcile the server scopes as discussed in the next section.
5.To prevent conflicts with previously assigned leases, you should enable address conflict detection for the next few days, as discussed in “Avoiding IP address conflicts” earlier in this chapter.
Reconciling leases and reservations
Reconciling checks the client leases and reservations against the DHCP database on the server. If inconsistencies are found between what is registered in the Windows registry and what is recorded in the DHCP server database, you can select and reconcile any inconsistent entries. After the entries you select are reconciled, DHCP either restores the IP address to the original owner or creates a temporary reservation for the IP address. When the lease time expires, the address is recovered for future use.
You can reconcile scopes individually, or you can reconcile all scopes on a server. To reconcile a scope individually, follow these steps:
1.In the DHCP console, press and hold or right-click the scope with which you want to work, and then tap or click Reconcile.
Читать дальше