I recently started supporting an application.
We often get IP address in error logs something like: Couldn't connect to 1.2.3.4, Time Out. We've many systems (servers) in whole application infrastructure.
There is no document which says that this ip belongs to this server, probably because ips are not static or servers are being referred by their names to no one cared for ips.
Is there anyway to determine hostname from ip address?
I checked some websites but our ips are "unknown" to them, may be some firewall thing.
ankur rathi wrote:
Is there anyway to determine hostname from ip address?
I checked some websites but our ips are "unknown" to them, may be some firewall thing.
Don't your company have a sys admin? Who you can ask this stuff? Static addresses should hopefully be documented somewhere. For dynamic addresses, you should be able to determine the switch(es) from the subnet, which can get you to a location. You can also probably figure out other information from the DHCP logs, like the MAC address... and then, hopefully, it is documented somewhere.
But as mentioned, you'll need the help of your sys admin for this stuff.
Then it is impossible to find out the host names in the usual manner (using network commands, or the code xsunil provided). You will either have to ask your system admin, or if the machines are maintained in some directory service, perhaps an LDAP query will yield the information.
Then it is impossible to find out the host names in the usual manner (using network commands, or the code xsunil provided).
Are you sure? A normal reverse DNS lookup should give you the results even if you can't access the particular IP addresses. This assumes, of course, that the IP addresses in question actually resolve to a hostname, and that the reverse DNS is configured properly.
Note: folks upthread are talking about using PING, in a slightly incorrect way. Ping is a network test which is handy, but it is not necessary. Ping is a separate protocol and is often blocked by firewalls, etc. You do *not* need to be able to ping a host to be able to talk to it via TCP/IP
R sona
Greenhorn
Joined: May 09, 2011
Posts: 3
posted
0
Pat Farrell wrote:
Peter Johnson wrote:
but I can't access those ips from my local system
Then it is impossible to find out the host names in the usual manner (using network commands, or the code xsunil provided).
Are you sure? A normal reverse DNS lookup should give you the results even if you can't access the particular IP addresses. This assumes, of course, that the IP addresses in question actually resolve to a hostname, and that the reverse DNS is configured properly.
Note: folks upthread are talking about using PING, in a slightly incorrect way. Ping is a network test which is handy, but it is not necessary. Ping is a separate protocol and is often blocked by firewalls, etc. You do *not* need to be able to ping a host to be able to talk to it via TCP/IP
NBTSTAT -A 10.10.10.10 will work on windows.
nmblookup -A 10.10.10.10 is for linux.
Much of this thread assumes that there is a 1-1 relationship between IP address and domain name. This is not the case. My fixed IP address has 4 domain names so given the IP address which domain name should be returned in any lookup?
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
James Sabre wrote:Much of this thread assumes that there is a 1-1 relationship between IP address and domain name. This is not the case. My fixed IP address has 4 domain names so given the IP address which domain name should be returned in any lookup?
No, all of the thread.
The standard method of getting a reverse DNS returns one value. Its a feature.