How to find IP address from netbios host name?

72k Views Asked by At

What network tool can I use under DOS/windows to find the ip address of a netbios host as easily as is done in Linux?

For example under Linux (ubuntu) I can find the ip address like so:

# nmblookup imac
querying imac on 192.168.1.255
192.168.1.75 imac<00>

Now, this is the IP of the macbook when connected wirelessly

But under windows I can't ping it:

C:\>ping imac

Pinging imac.gateway.2wire.net [192.168.1.68] with 32 bytes of data:
Request timed out.

And the closest tool I could find returns TWO IPs (it returns the hardwired IP even though it got a different IP by connecting wirelessly

C:\>nslookup imac
Address:  192.168.1.254
Name:    imac.gateway.2wire.net
Addresses:  192.168.1.68, 192.168.1.75

Isnt there a windows command to return only the active IP address for the host?

4

There are 4 best solutions below

2
On

On Windows, you can try

  • ping -a IP_address (lookup for both DNS name and NetBIOS name)
  • nslookup IP_address (this command requires you to have an internal DNS server configured)

I like to use ping -a personally.

1
On

http://technet.microsoft.com/en-us/library/bb490938.aspx :

Nbtstat.exe -a NETBIOSNAME
Nbtstat.exe -A IP

Come with Windows XP and upward.

1
On

on mac OSX, the command is smbutil lookup NETBIOS_NAME

0
On
nbtstat -a [hostname] -c 

This gives IP address of NetBIOS name on Windows