I am trying to use Dns.GetHostEntry
method to get the HOSTNAME for a given IP from the DNS server.
According to the documentation, the method first tries to do a reverse lookup on the IP address. In my case this is always successful when I use Dns.GetHostEntry
.
Now, the strange thing is that for the same IP nslookup doesn't give me anything. It either times out or gives me error: UnKnown can't find 10.4.202.16: Non-existent domain
. When I look into the DNS server (2008 R2), I can not find any PTR records in de reverse lookup zone. So the fact that nslookup fails doesn't surprise me much.
But what is going on here? Is Dns.GetHostEntry
using some undocumented ways to obtain the HOSTNAME?