DNS Scavenging is a great answer to a problem that has been nagging everyone since RFC 2136 came out way back in 1997.
Despite many clever methods of ensuring that clients and DHCP servers that perform dynamic updates clean up after themselves sometimes DNS can get messy. There are two big issues with DNS scavenging that seem to come up a lot: This post should help us figure out when the first issue will happen and completely avoid the second.
Because of the time it takes scavenging to do it’s thing people find this command and get tempted to give it a try. Before a server will even look at a record to see if it will be scavenged the zone must have scavenging enabled.
To access the scavenging settings for a zone right click the zone, select properties then on the general tab hit the “Aging” button. If you view it on any DNS server where this zone is replicated it will be the same.
The “zone can be scavenged after” timestamp is the first of your safety valves.
Because deletion is involved there are quite a few safety valves built into scavenging that take a long time to pop. To see the scavenging setting on a record hit View | Advanced in the DNS MMC then bring up properties on a record.
Scavenging gets set on a resource record in one of three ways.
The first is by someone coming in here, checking the “Delete this record when it becomes stale” checkbox and hitting apply.
Remember that old test server that you built two years ago that caught fire before it could be used? We’ll go through how scavenging is setup then I’ll give you my best practices.
Scavenging will help you clean up old unused records in DNS.Let’s pause here for a few moments to consider a few important words: All, Records, Delete, Stuff. Once a timestamp is set on a record it will replicate around to all servers that host the zone. If scavenging is not enabled on the zone that hosts the record then it will never scavenge so the timestamp is essentially irrelevant.