Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

inetaddress dns?  RSS feed

Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am in the process of writing a kind of a ping application.
Essentially, given a range of ip addresses the application returns the host names associated with ip addresses that it can locate.
1) The problem is that the while the app does return host names for some ip addresses, it does not for others and just returns the ip address back for the method InetAddress().getHostName().
When these same ip addresses are pinged they time out.
If the ip address cannot be located, I would think there should be an UnknownHostException thrown, but it does not seem to be happening.
2) How does the host name get resolved given the ip address? I would think this would be using DNS servers, but the hostname was also successfully returned in a scenario where there were no dns servers running. I checked the host file on the clients and these did not have any entries either.Could any one point to relavent posts,articles here?
Thanks in advance,
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!