2
1
How do I trace the origin of a DNS resolution in Windows 7?
Hosts involved:
- Windows 7 host
WIN7
where I'm trying to remove the name-to-IP mapping - home router running a DHCP service
- host
ABC
renamed toDEF
On a Windows 7 host, I had a name ABC
mapped to an IP number via C:\Windows\System32\drivers\etc\hosts
. I removed the mapping from the HOSTS file. I renamed the Linux computer ABC
to DEF
and had it re-register with the DHCP server running on the router station (a Synology product) using its new name. (Just in case the DHCP server on the router would use DHCP leases to also offer some name resolution services.)
I issued a ipconfig /flushdns
on the Windows 7 host from an elevated command prompt. I even stopped the DNS cache using net stop dnscache
.
[Update:] An nslookup abc
returns Non-existent domain.
The host DNS queries are relayed to is the router I mentioned above. [/Update]
And yet, a ping abc
still resolves the bloody name to the wrong IP number, to the one I had removed the mapping for. What can I do to trace this issue to its root?
[Update 2:] I rebooted: the issue persists. I unplugged the Win7 host from the network. (Well, switched off WLAN.) The system still resolved abc
to IP number 192.168.33.102
, directly subsequent to an ipconfig /flushdns
executed as Administrator
. Which leads me to conclude that there is some local system cache that remains unaffected by ipconfig /flushdns
. [/Update 2]
A related question (but confined to the cache flush issue, and just flushing doesn't solve the problem for me): How do I update / flush / reset my DNS records in Windows?
This is it. But in a way that is somewhat embarrassing to reveal. Almost a year ago, I tried to figure out the NetBIOS business but never really properly understood it. Not disposing of a WINS server, I discovered you could have a substitute in editing the
LMHOSTS
file, which lives right next to theHOSTS
file. So that's what I did. And that's what the entry forabc
came from. It was bound to hit me with a vengeance when I would have forgotten about my dabbling with NetBIOS. Thank you for pointing me there. – Lumi – 2012-06-11T22:41:09.460