Using DNS Aging and Scavenging

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Aging and scavenging of stale resource records are features of Domain Name System (DNS) that are available when you deploy your server with primary zones.

Where aging and scavenging are available, you can use the DNS snap-in to perform the following related tasks for your DNS servers and any directory-integrated zones that they load:

  • Enable or disable the use of scavenging at a DNS server

  • Enable or disable the use of scavenging for selected zones at the DNS server

  • Modify the no-refresh interval, either as a server default or by specifying an overriding value at selected zones

  • Modify the refresh interval, either as a server default or by specifying an overriding value at selected zones

  • Specify whether periodic scavenging occurs automatically at the DNS server for any of its eligible zones and how often these operations are repeated

  • Manually initiate a single scavenging operation for all eligible zones at the DNS server

  • View other related properties, such as the time stamp for individual resource records or the start-scavenging time for a specified zone

Enabling Scavenging of Stale Resource Records

By default, aging and scavenging features are disabled on all DNS servers and any of their zones. Before using these features, you should configure the following settings for the applicable server and its directory-integrated zones:

  • Server aging and scavenging properties for determining the use of these features on a server-wide basis. These settings are used to determine the affect of zone-level properties for any directory-integrated zones that are loaded at the server. For more information, see Set aging and scavenging properties for a DNS server.

  • Zone aging and scavenging properties for determining the use of these features on a per zone basis. When zone-specific properties are set for a selected zone, these settings apply only to the applicable zone and its resource records. Unless these zone-level properties are otherwise configured, they inherit their defaults from comparable settings that are maintained in server aging and scavenging properties. For more information, see Set aging and scavenging properties for a zone.

    Caution   Enabling aging and scavenging for use with standard primary zones modifies the format of zone files. This change does not affect zone replication to secondary servers, but the modified zone files cannot be loaded by other versions of DNS servers.

Modifying No-refresh Intervals

When the no-refresh interval is in effect for a specific resource record, attempts to dynamically refresh its time stamp are suppressed by the DNS server. This aspect of the aging and scavenging mechanism prevents unnecessary refreshes from being processed by the server for aged resource records. These early refresh attempts, if not handled in this way, might otherwise increase Active Directory replication traffic related to processing DNS zone changes.

To ensure that records do not refresh prematurely, keep the no-refresh interval comparable in length to the current refresh interval for each resource record. For example, if you increase the refresh interval to a higher value, you can similarly increase the no-refresh interval.

In most instances, the default interval of seven days is sufficient and does not need to be changed.

Modifying Refresh Intervals

When the refresh interval is in effect for a resource record, attempts to dynamically refresh its time stamp are accepted and processed by the DNS server. When you set this interval, it is important that the length of time used be greater than the maximum possible refresh period for any resource records that are contained in the zone. This period is equal to the maximum amount of time that it might take the record to be refreshed under normal network conditions, based on the specific source generating the record refresh.

For example, the following table shows default refresh periods for various services that are known to register and refresh records dynamically in DNS.

Service Default refresh period

Net logon

24 hours

Clustering

24 hours

DHCP client

24 hours

The DHCP Client service sends dynamic updates for the DNS records. This includes both computers that obtain a leased Internet Protocol (IP) address by using Dynamic Host Configuration Protocol (DHCP) and computers that are configured statically for TCP/IP.

DHCP server

Four days (half of the lease interval, which is eight days by default).

Refresh attempts are made only by DHCP servers that are configured to perform DNS dynamic updates on behalf of their clients, for example, Windows 2000 Server DHCP servers and Windows Server 2003 DHCP servers. The period is based on the frequency in which DHCP clients renew their IP address leases with the server. Typically, this occurs when 50 percent of the scope lease time has elapsed. If the DNS default scope lease duration of eight days is used, the maximum refresh period for records that are updated by DHCP servers on behalf of clients is four days.

By default, the refresh interval is seven days. In most instances, this value is sufficient and does not need to be changed, unless any resource records in the zone are refreshed less often than once every seven days.

Automated and Manually Initiated Scavenging

Although scavenging start time and other factors determine when zones and records are actually eligible for scavenging, you can initiate scavenging by using either of two methods:

  • Automatic scavenging. Automatic scavenging specifies that aging and scavenging of stale records is to be performed automatically by the server for any eligible zones at a recurring interval that is specified as the scavenging period. When you use automatic scavenging, the default scavenging period is one day, and the minimum allowed value that you can use for the scavenging period is one hour. For more information, see Configure automatic scavenging of stale resource records.

  • Manual scavenging. Manual scavenging specifies that aging and scavenging of stale records is to be performed as a nonrecurring operation for any eligible zones at the server. For more information, see Start scavenging of stale resource records.

Modifying Time-Stamp Values

For resource records that are not added dynamically to DNS zone data, a record time-stamp value of zero is applied, which prevents these records from aging or removal during scavenging.

You can, however, reset record properties manually to enable any statically entered records to qualify for the aging and scavenging process. If you do this, the record will be deleted based on the modified time-stamp value, at which point you might need to re-create a record if it is still needed.

For more information, see Reset aging and scavenging properties for a specific resource record.

To complete this task, perform the following procedures:

  1. Set aging and scavenging properties for a DNS server

  2. Set aging and scavenging properties for a zone

  3. Configure automatic scavenging of stale resource records

  4. Start scavenging of stale resource records

  5. Reset aging and scavenging properties for a specific resource record