DHCP & DNS creating duplicate entries

Our biggest issue with DHCP and DNS currently is that we are constantly re-imaging old systems, renaming systems, and rolling out new systems. These actions cause DHCP and DNS to not jive like we want them to. I have been beating my head against the desk trying to figure out a solution that will fit how we operate or only require minimal change in our current flow of operations. I am hoping someone else has some input on this issue.

We have our DHCP setup so that it currently does not manage DNS. It was updating DNS, but this was not fitting our flow and DNS Reverse Lookup was becoming a mess. We would have several entries for a single system name or a single IP in reverse lookup which would impact some of the local applications. To resolve this, we tried disabling the link between DHCP and DNS and are letting the PC's register with DNS on their own. DNS has never looked cleaner, expect for two problems. One is when we change the name of a system, it registers the new system with the same IP as it originally had. So DNS has 1 IP with 2 entries attached to it, the old name and the new name.  The second issue is when we replace a system with new hardware. The name stays the same, but the IP changes due to the new hardware. In this case, DNS has 2 entries for the same name but different IP's.

We do have scavenging enabled and it cleans up the older entries. What we need is an instant cleansing/purge of the old records.  I am at a loss as to the best way to resolve this. I have pursued numerous avenues, but am coming up dry.
pprintzQCCAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris DentPowerShell DeveloperCommented:

> One is when we change the name of a system, it registers the new system with the same IP as
> it originally had. So DNS has 1 IP with 2 entries attached to it, the old name and the new name.  

There's not much you can do about this one (unless you want to manually remove the old record).

> The second issue is when we replace a system with new hardware. The name stays the same,
> but the IP changes due to the new hardware. In this case, DNS has 2 entries for the same name
> but different IP's.

New computer account (or system joined to the domain to replace an old one)? If so it won't have permission to update the old record, which is why you end up with duplicates.

Neither of these is particularly easy to deal with, Scavenging will take care of it eventually, but eventually is obviously not immediately. Anything else would require manual intervention unfortunately.

Chris
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pprintzQCCAuthor Commented:
Thanks for the quick response Chris.

Not exactly what I was hoping for, but what can you do. :-)

Another thought was, if we could at least use a command-line script to clean up duplicate reverse lookup entries. Is it possible, from a command-line to delete a reverse lookup entry?

0
pprintzQCCAuthor Commented:
I actually found an answer to my last question.

http://technet.microsoft.com/en-us/library/cc759561(WS.10).aspx

Thanks for the help again chris. At least it will steer me in another direction that may help us work around the way DNS and DHCP work instead of fighting it.
0
Chris DentPowerShell DeveloperCommented:
Yes, it is possible :)

For example, if you had a record for 10.8.3.2 in a reverse lookup zone called "10.8.x.x Subnet" you could issue this command:

dnscmd <Server> /RecordDelete 8.10.in-addr.arpa 2.3 ptr

Note that the zone name and record name above combine to produce 2.3.8.10.in-addr.arpa which matches up to 10.8.3.2.

If you fancy PowerShell my DNS module can do it with:

Get-DnsRecord "^2.3.8.10.in-addr.arpa$" -RecordType PTR -Server <Server> | Remove-DnsObject

Chris
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DNS

From novice to tech pro — start learning today.