get hostname from a given IP

open cmd and write this command

ping -a 192.168.1.66

replace the IP address with the one you want to get it's host name
 
are you trying to figure out the DNS host name? That can be done by doing a reverse DNS look up by IP. Using the nslookup command.
 
I'd tried ping -a 192.168.1.66 but it won't , its the same as the normal ping, I got 3 replies.

tlarkin:
I am trying to get the hostname of an computer on LAN knowing its internal IP.
 
tlarkin:
I am trying to get the hostname of an computer on LAN knowing its internal IP.

You mean, the name of the PC on your LAN.... your trying to get the name of that..... by using it's IP.

Try PC Wizard, under network, it tells you what PCs are on the network, the name and their IP.
 
You mean, the name of the PC on your LAN.... your trying to get the name of that..... by using it's IP. yeah that what I want,
but is there some command on DOS that allow me to do that.
 
"ping -a" might work. It doens't in OP's network. A firewall for example can make it not work.

Any ping won't pass a firewall. I assumed everybody knows that. Thanks for pointing that out, it could be the reason why it's not working for him
 
Last edited:
"ping -a" might work. It doens't in OP's network. A firewall for example can make it not work.

ping works just fine though a firewall, if you open access for ICMP ....

ping -a "ip"

works fine, but unless you have a PTR record on your local dns server you wont get much.

Here is an example

ping -a 74.125.91.103

Pinging qy-in-f103.google.com [74.125.91.103] with 32 bytes of data:

Reply from 74.125.91.103: bytes=32 time=36ms TTL=241
Reply from 74.125.91.103: bytes=32 time=36ms TTL=241
 
Hi all,

The command stated is the correct one, as pointed out firewalls can cause netbios name resolution to fail. But you are also dependent on windows services, I am unsure of which ones.

Regards,
 
the host command works too, if you are running a *nix OS:

Code:
$ host www.google.com
www.google.com is an alias for www.l.google.com.
www.l.google.com has address 74.125.95.104
www.l.google.com has address 74.125.95.147
www.l.google.com has address 74.125.95.99
www.l.google.com has address 74.125.95.103
 
Back
Top