Configuring DNS Scavenging

Discover what DNS scavenging is and learn how to set it up.

John Savill

March 27, 2007

2 Min Read
ITPro Today logo in a gray background | ITPro Today

What's DNS scavenging, and why would I need it?
With Windows 2000 and the introduction of dynamic DNS (DDNS), whereby computers register their own hostname to IP address records (or the DHCP server registers on the client's behalf), the DNS zones can quickly become polluted with out-of-date records. To resolve this problem, you can configure how long records should stay in the zone before being removed or scavenged. To enable scavenging for a DNS zone, perform these steps:

  1. Right-click a zone in the Microsoft Management Console (MMC) DNS Management snap-in and select Properties.

  2. Click the Aging button.

  3. Select the Scavenge stale resource records check box, as Figure 1 shows. You'll see two options: no-refresh interval and refresh interval. The no-refresh interval stops unnecessary updates on an existing record, thus reducing replication traffic. The default is seven days, so any attempt to reregister the record within seven days will be ignored. The refresh interval is the time between when the no-refresh interval expires and the record is considered stale. If you leave the default of seven days, the client would need to reregister within 14 days (but after seven days).

  4. Leave the default settings and click OK.

The values for the refresh and no-refresh settings should be based on the DHCP lease time. The default lease time is eight days, which works well with seven-day no-refresh and refresh intervals. If you reduce the lease times, you should also reduce the refresh and no-refresh intervals to ensure that stale records aren't left in the DNS zones for too long. Also, the sum of the no-refresh and refresh values must be greater than the DHCP lease time; otherwise, records could be scavenged before the DHCP lease has expired.

The actual DNS scavenging by default occurs once a week. If your refresh intervals are much smaller than a week, you should configure the scavenging to occur more often. To do so, use the dnscmd command line tool, as follows:

dnscmd /config /scavenginginterval   

This command updates theHKEY_LOCAL_MACHINESYSTEMControlSet001ServicesDNSParametersscavenginginterval registry subkey.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like