Solved

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

Posted on 2006-11-16
6
2,939 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

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)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
home folder path for users 4 87
SolarWind and DNS Server 12 87
Windows 2003 PDC Trust Root Certificate About to Expire 5 63
Windows server 2003 bootable iso 9 194
by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …

820 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