i use this command to get the name of a computer in my network (nbtstat -a [192.168.1.5]). it works fine when that device is a pc,
but when i try to get a cellphone's name using the same command it says Host not found.
but i'm sure the device is in my network and when i ping the device it works fine. so what is the difference between a laptop and a cellphone that i cannot get the correct result?
Thanks.
-
Do you have something specific that you're expecting as "the cellphone's name"?– raksliceAug 11, 2014 at 8:23
1 Answer
The nbtstat
command is for doing NetBIOS over TCP/IP lookups and testing.
From the docs (http://technet.microsoft.com/en-us/library/cc940106.aspx):
The
nbtstat -a <name>
command performs a NetBIOS adapter status command on the computer name specified by<name>
. The adapter status command returns the local NetBIOS name table for that computer as well as the MAC address of the adapter card. Thenbtstat -A <IP address>
command performs the same function using a target IP address rather than a name.
If you run nbtstat -A
with an IP that doesn't have NetBIOS over TCP/IP, (typically Windows File Sharing or something similar like Samba), it's not going to respond to the adapter status command.
-
Oh, i get it now. is there another way i can get the name of the device from it's ip address? (i'm using windows 8)– cenaAug 11, 2014 at 8:30
-
1If the device left a hostname with the DHCP server, and the DHCP server is configured to update a DNS server with DHCP requested hostnames, you could try a DNS reverse lookup: e.g.
nslookup 8.8.8.8
– raksliceAug 11, 2014 at 8:36