Solved

How to determine the computer name from a command prompt (have IP address)

Posted on 2006-11-16
6
2,932 Views
Last Modified: 2012-05-05
Does anyone know of a command in a command prompt (windows XP) to determine what the computer name is when I have an IP address?  Currently, I have to go to the domain controller, open up the DHCP server, and search through the active leases to find out what the computer name is.  I am trying to track down certain computers on my network with certain internet connections, and my firewall only reports the ip address (of course) and I'd like to quickly determine what the name of the computer is for the ip address that the firewall is giving.

It's kind of frustrating that the simple ping command will give IP address if you have a computer name, but not vice versa.  For example, if I ping "george-pc" it will return what the ipaddress is for George's PC.  If I ping the ip address, it doesn't tell me the computer name.

By the way, I have a single Windows 2003 domain controller, an exchange server and about 35 client machines...mostly WinXP.

Thanks,
Jeff
0
Comment
Question by:jbobst
6 Comments
 
LVL 8

Expert Comment

by:caddlady
ID: 17958060
how about pathping?
0
 
LVL 8

Assisted Solution

by:caddlady
caddlady earned 50 total points
ID: 17958100
mybad... didn't read enough.

Use:

nbtstat -a ipaddress
0
 
LVL 33

Accepted Solution

by:
NJComputerNetworks earned 75 total points
ID: 17958545
or... use the -a command with the IP address

ping -a 10.10.103.5

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] target_name

Options:
    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break;
                   To stop - type Control-C.
    -a             Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size        Send buffer size.
    -f             Set Don't Fragment flag in packet.
    -i TTL         Time To Live.
    -v TOS         Type Of Service.
    -r count       Record route for count hops.
    -s count       Timestamp for count hops.
    -j host-list   Loose source route along host-list.
    -k host-list   Strict source route along host-list.
    -w timeout     Timeout in milliseconds to wait for each reply.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 33

Expert Comment

by:NJComputerNetworks
ID: 17958559
could also use NSLOOKUP


NSLOOKUP 10.12.1.43 <enter>
0
 
LVL 1

Author Comment

by:jbobst
ID: 17958728
Thanks, all those options worked!

(I did have a machine on my network though, that wasn't a domain member so the ping -a and the nslooup didn't work for that particular machine)
0
 
LVL 2

Expert Comment

by:thelastoftheend
ID: 17971705
I like the "ping -a x.x.x.x" command the most, but sometimes when that doesn't work, this will: "nbtstat -a x.x.x.x". This will sometimes show the logged on user as well.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Organizations create, modify, and maintain huge amounts of data to help their businesses earn money and generally function.  Typically every network user within an organization has a bit of disk space to store in process items and personal files.   …
Learn about cloud computing and its benefits for small business owners.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now