draca
draca

Reputation: 1399

How to find IP address from netbios host name?

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?

Upvotes: 14

Views: 73913

Answers (4)

Eric Leroy
Eric Leroy

Reputation: 55

on mac OSX, the command is smbutil lookup NETBIOS_NAME

Upvotes: 0

brudderkorn
brudderkorn

Reputation: 11

nbtstat -a [hostname] -c 

This gives IP address of NetBIOS name on Windows

Upvotes: 1

gavenkoa
gavenkoa

Reputation: 48723

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

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

Come with Windows XP and upward.

Upvotes: 8

Hao Nguyen
Hao Nguyen

Reputation: 536

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.

Upvotes: 9

Related Questions