Link to home
Start Free TrialLog in
Avatar of BadFishToo
BadFishToo

asked on

Server 2003 DNS Scavenging

We've been working the past few months to implement DNS scavenging on 2 production domains. Process we followed was first implemented in DEV successfully and proted to domain1 with great success. Implemented in domain2 approx 30 days ago. Scavenging runs but does not scavenge any records. When viewing timestamps of records there is obviously dated/stale records that should be scavenged. Here was the process we followed:

Turn off scavenging on all servers.  To confirm scavenging won't inadvertently run use the DNSCmd /ZoneResetScavengeServers to confine scavenging to a single server then ensure this server has scavenging disabled.
Turn on scavenging on the zones you wish to scavenge.  Set the refresh and No-refresh intervals as desired 7days/8days.  Left the refresh at the default.
Waited past interval and reviewed aged records. After being satisfied that records had aged correctly and nothing important would be scavenged - we enabled scavenging on single DC.
In first 2 successful attempts/stale records were scavenged and job runs approx every 170hrs.
In unsuccessful attempt on 3rd domain - 2501 appeared in DNS log after time-frame - correct zones were reviewed by device but stale records were not scavenged. Every week since (3) scavenging has run but records are not removed.

Reference site from Technet blogs.
 
http://blogs.technet.com/networking/archive/2008/03/19/don-t-be-afraid-of-dns-scavenging-just-be-patient.aspx

Open in new window

Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image


Each record you're expecting to be Scavenged is showing a Time Stamp more than 15 days old?

Chris
Avatar of BadFishToo
BadFishToo

ASKER

Yes. All records appeared to age correctly. Some time stamps are years old. In our primary domain - following this process - we scavenged 20k records the first run through. Forest has been around for 8 years without ever having scavenging enabled.  - thanks, Shawn

For those that are years old, if you open one up does it have the tick box for Scavenge when stale ticked? Might need View / Advanced if you don't have that on already.

It shouldn't really have a time-stamp if it's not going to be scavenged, but it's worth checking.

Chris
Yes "scavenge when stale" is enabled. Also - we actually view the records using a 2008 DNS MGMT console which shows the timestamps from the console.

Is Scavenging running on the 2008 server?

And is it clearing out records that have been created since?

If its only leaving very old records.... Does the system concerned have rights to delete them? I'd expect "ENTERPRISE DOMAIN CONTROLLERS" to have Full Control and potentially SYSTEM as well.

Chris
No neither scavenging nor DNS is running on a 2008 server. We're just using 2008 MGMT console to view the zones as it shows the timestamps right in the console window rather than drilling down each individual record. Our forest DCs our entirely 2003 standard R2.

Ahh okay, fair enough, it's a good enough reason to use the tools :)

Still curious if it's cleaning out newer records, and if those it's failing to clean are because of security :)

Chris
It's not scavenging any records at all...new or old.

Event Type:      Information
Event Source:      DNS
Event Category:      None
Event ID:      2501
Date:            5/19/2009
Time:            5:31:57 PM
User:            N/A
Computer:      XXXXXX
Description:
The DNS server has completed a scavenging cycle:
Visited Zones     = 26,
Visited Nodes     = 65,
Scavenged Nodes   = 9,
Scavenged Records = 0. <-------HERE
 
This cycle took 0 seconds.
 
The next scavenging cycle is scheduled to run in 168 hours.
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I saw that too - never noticed that until today. I think I have enough to go on thanks. The replication mode here has been changed several times and as a result - there are copies of the zone in several partitions...I think what is happening here is that the DC is attempting to scavenge the "wrong" zone - I needed to review the ForestDNSZones, DomainDNSZones and MicrosoftDNS partitions and clear out what is no longer vailid. Thank you for your help.

Shawn

That would make a lot of sense. Presumably you're getting events logged stating that it encountered multiple zones of the same name?

Chris
correct 4515 in DNS log on start-up.

Yeah, I know that one :)

I even have a script for listing zones stored in the two main partitions to save myself the bother of opening ADSIEdit ;)

Chris
Option Explicit
 
Function ListDNSZonesInPartition(strPartition)
 
  On Error Resume Next : Err.Clear
  Dim objPartition : Set objPartition = GetObject("LDAP://" & strPartition)
  Dim strReturn
 
  If Err.Number <> 0 Then
 
    strReturn = strReturn & "Error connecting to partition: " & strPartition & vbCrLf
    strReturn = strReturn & "Message: " & Err.Description & vbCrLf
 
  Else
 
    strReturn = strReturn & "Zones stored in partition: " & strPartition & vbCrLf
 
    Dim objMSDNS : Set objMSDNS = GetObject("LDAP://CN=MicrosoftDNS," & _
      objPartition.Get("distinguishedName"))
 
    Dim objZone
    For Each objZone in objMSDNS
      strReturn = strReturn & objZone.Get("name") & vbCrlf
    Next
 
  End If
 
  ListDNSZonesInPartition = strReturn
End Function
 
Dim objRootDSE : Set objRootDSE = GetObject("LDAP://RootDSE")
 
Dim strDomainDNS : strDomainDNS = "DC=DomainDNSZones," & objRootDSE.Get("defaultNamingContext")
WScript.Echo ListDNSZonesInPartition(strDomainDNS)
 
Dim strForestDNS : strForestDNS = "DC=ForestDNSZones," & objRootDSE.Get("rootDomainNamingContext")
WScript.Echo ListDNSZonesInPartition(strForestDNS)
 
Set objRootDSE = Nothing

Open in new window

awesome. Thanks for your help!