Getting duplicate DNS entries for same IP address

dhcpdomain-name-systemvpn

I have a system (SYSTEMX) that is connected to our network through a VPN. Periodically the VPN gets disconnected and SYSTEMX loses its connection to the network. When this occurs I usually easily find out from a log generated during a nightly task that fails as a result of the sytem being offline.

I ping the system "ping SYSTEMX" and get timeouts as expected. Reconnect the VPN and it is good to go.

Two times however the log has had different results as a new system (SYSTEMSTEALTH) will come in and resolve to the same IP address that SYSTEMX was given.

I ping "ping SYSTEMX" and lo and behold responses come in.

When I do an "nslookup SYSTEMX" and "nslookup SYSTEMSTEALTH" both names resolve to the same IP address.

I am not an expert on network topology however it seems to me that upon distributing a new DHCP lease there should be communication to the name server to remove stale entries for that address to prevent this type of scenario.

Does anyone have any suggestions or are able to clarify a way to prevent this from occuring? I am working with my IT deptartment to resolve this issue, their current stance is that it is fine as SYSTEMX is not on the network SYSTEMSTEALTH comes in after and all is good. However being able to "ping SYSTEMX", connect to it, file share to it using admin shares; this does not seem right to me since SYSTEMX is really SYSTEMSTEALTH.

Thank you for your help.

Best Answer

What's happening is the VPN solution is registered a new PTR record every time a new connection is granted. This can also happen in any environment where dynamic DNS updates are permitted, BTW. So when you query based on IP, there are multiple PTR records because, as has been pointed out, the old ones haven't been cleaned up. So when you nslookup based on IP, you're getting one of the PTR records, which may not correspond to the correct computer name.

As has been mentioned, if the DNS server is set to scavenge, eventually the old PTR records will clean up, though this takes time. For instance, it could a few weeks in a default Windows Server 2003 DNS configuration (once scavenging is turned on).

And like what has already been mentioned, we found that by doing DHCP reservations was the way to go in those cases where it truly mattered to us. In cases where it didn't, we would ping the IP, verify it, then do an nbtstat -a IP address to see what Windows system was truly responding on that IP.