how can i find out a netbios name from an IP address.

Craig Sanders cas at taz.net.au
Tue Dec 15 21:36:42 GMT 1998


On Tue, 15 Dec 1998, Bobo Rajec wrote:

> On Tue, Dec 15, 1998 at 09:41:11PM +1100, Craig Sanders wrote:
> 
> > how can i find out the netbios name of a machine when i have it's IP
> > address?
> 
> nmblookup -r -S -U <IP ADDRESS> '*'  works if you run it from a
> machine that is not running nmbd (already has port 137 bound)
> 
> The problem is that windows 95 does not answer if the packet does not
> come from port 137.

thanks for the reply.  it's most of what i wanted to know.

your tip about nmbd binding to port 137 explains why i haven't ever been
able to get nmblookup to do anything useful before.


> For Windows 98 or Windows NT targets you do not need the -r and it can
> be run on a machine with a running nmbd

that's odd. i get the following when i try an nmblookup on an NT
machine.

without nmbd running:

root at gw ~# /etc/init.d/samba stop
Stopping Samba daemons: nmbd smbd.
root at gw ~# nmblookup -r -S -U 192.168.0.68 '*'  
Sending queries to 192.168.0.68
192.168.0.68 *<00>
Looking up status of 192.168.0.68
received 5 names
        COBPUBINT2      <00> -         B <ACTIVE> 
        WORKGROUP       <00> - <GROUP> B <ACTIVE> 
        COBPUBINT2      <03> -         B <ACTIVE> 
        COBPUBINT2      <20> -         B <ACTIVE> 
        WORKGROUP       <1e> - <GROUP> B <ACTIVE> 
num_good_sends=0 num_good_receives=0


and with nmbd running:

root at gw ~# /etc/init.d/samba start
Starting Samba daemons: nmbd smbd.
root at gw ~# nmblookup -S -U 192.168.0.68 '*'  
Sending queries to 192.168.0.68
192.168.0.68 *<00>
Looking up status of 192.168.0.68
No status response (this is not unusual)

craig

--
craig sanders



More information about the samba mailing list