How to get Networked Computer Name from IP Address on a LAN
Mar 13, 2015WindowsComments (36)
If you have the local IP address of a computer on your network, and need to get that computer's name, there is an easy method using the ping command in a Windows command prompt.
Command Prompt
Open up a command prompt by typing "cmd" into the start menu search (Windows Vista, 7, or newer) or by opening a Run window and then running "cmd" (Windows XP).
Use the following command to ping the local IP address (change xxx.xxx.xxx.xxx to the IP address you want to ping):
The -a option of the ping command tells it to resolve the hostname of the IP address, so it will give you the name of the networked computer.
Here is an example of the output for a hypothetical computer named "Office1" that is at local IP address 192.168.1.123:
If you need to get the hostnames and other information for all of the PCs on your network, I recommend using Advanced IP Scanner.
Command Prompt
Open up a command prompt by typing "cmd" into the start menu search (Windows Vista, 7, or newer) or by opening a Run window and then running "cmd" (Windows XP).
Use the following command to ping the local IP address (change xxx.xxx.xxx.xxx to the IP address you want to ping):
ping -a xxx.xxx.xxx.xxx
The -a option of the ping command tells it to resolve the hostname of the IP address, so it will give you the name of the networked computer.
Here is an example of the output for a hypothetical computer named "Office1" that is at local IP address 192.168.1.123:
C:\Users\Username>ping -a 192.168.1.123
Pinging Office1 [192.168.1.123] with 32 bytes of data:
Reply from 192.168.1.123: bytes=32 time<1ms TTL=128
Reply from 192.168.1.123: bytes=32 time<1ms TTL=128
Reply from 192.168.1.123: bytes=32 time<1ms TTL=128
Reply from 192.168.1.123: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.1.123:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Pinging Office1 [192.168.1.123] with 32 bytes of data:
Reply from 192.168.1.123: bytes=32 time<1ms TTL=128
Reply from 192.168.1.123: bytes=32 time<1ms TTL=128
Reply from 192.168.1.123: bytes=32 time<1ms TTL=128
Reply from 192.168.1.123: bytes=32 time<1ms TTL=128
Ping statistics for 192.168.1.123:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
Full Network Discovery
If you need to get the hostnames and other information for all of the PCs on your network, I recommend using Advanced IP Scanner.