?
Solved

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

Posted on 2006-11-16
6
Medium Priority
?
2,949 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Expert Comment

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

Assisted Solution

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

Use:

nbtstat -a ipaddress
0
 
LVL 33

Accepted Solution

by:
NJComputerNetworks earned 300 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

777 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