Ping to get NetBios name

If I ping an NetBios name I get the IP, is it possible to do this in reverse? So I ping an IP and it gives me the name of the pc.

For example if I use the command 'ping laura' I get the IP 192.168.1.5 however if I want to find the PC name at 192.168.1.5 how do I do this?

Tony
tonelm54Asked:
Who is Participating?
 
PberSolutions ArchitectCommented:
doing a:

nbtstat -a 192.168.1.5 will produce more accurate info

Also:
nslookup 192.168.1.5 will return the name if in DNS.
0
 
PberSolutions ArchitectCommented:
ping -a 192.168.1.5
0
 
rindiCommented:
You'll either need a wins server or edit your hosts file for that. The hosts file is in c:\windows\system32\drivers\etc and is a hidden file. Just add all the PC's you want to get resolved with their IP address.

192.168.1.5      laura
192.168.1.6      Tony
0
 
tonelm54Author Commented:
Didnt work!

C:\>ping laura

Pinging laura [192.168.1.5] with 32 bytes of data:

Reply from 192.168.1.5: bytes=32 time=174ms TTL=123
Reply from 192.168.1.5: bytes=32 time=54ms TTL=123
Reply from 192.168.1.5: bytes=32 time=55ms TTL=123
Reply from 192.168.1.5: bytes=32 time=56ms TTL=123

Ping statistics for 192.168.1.5:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 54ms, Maximum = 174ms, Average = 84ms

C:\>ping -a 192.168.1.5

Pinging 192.168.1.5 with 32 bytes of data:

Reply from 192.168.1.5: bytes=32 time=54ms TTL=123
Reply from 192.168.1.5: bytes=32 time=55ms TTL=123
Reply from 192.168.1.5: bytes=32 time=51ms TTL=123
Reply from 192.168.1.5: bytes=32 time=53ms TTL=123

Ping statistics for 192.168.1.5:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 51ms, Maximum = 55ms, Average = 53ms

C:\>
0
 
PberSolutions ArchitectCommented:
As per what rindi said, you will require a WINS or DNS (or host/LMhost file) for ping -a to resolve the address to the name.

have you tried the nbtstat -a
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.