how to discover all netbios scopes on a LAN?

Christopher R. Hertel crh at ubiqx.mn.org
Wed Oct 22 21:12:53 GMT 2003


On Wed, Oct 22, 2003 at 01:39:03PM -0700, David Wuertele wrote:
> Me> How can my app discover all the netbios scopes in use on the LAN?
> 
> Chris> Ya can't.
> Chris> Well... there's always a fudge.
> Chris> One way is to sniff traffic, but that's a pain and it only
> Chris> collects information from the local LAN.
> Chris> Another way is to ask the WINS server itself.  I have no idea
> Chris> how to do this on a Windows WINS server,
> 
> Footnote 21 of http://ubiqx.org/cifs/NetBIOS.html#foot23 says that the
> MS WINS replication protocol is fairly straight-forward and has been
> untangled.  Maybe if my WINS server is a MS server, I could prompt it
> to send me its database, then parse the reply for ScopeIDs?

I imagine that there are some RPC calls that could be made to query the
WINS database directly, but that would mean finding the docs and writing
programs to make RPC calls.

The WINS replication protocol was reversed.  It's not too bad, I'm told.  
There was an effort made to write a replication daemon.  Unfortunately,
only the first testing-only drafts of the daemon (wrepld) were produced.  
The secrets are hidden in there.  There is also some information on 
Microsoft's website(s).

Some links:
  http://msdn.microsoft.com/library/en-us/dnnetbios/html/msdn_winswp.asp
  http://www.microsoft.com/technet/prodtechnol/windowsserver2003/proddocs/entserver/sag_WINS_und_Topnode.asp
  http://www.microsoft.com/technet/prodtechnol/windowsserver2003/proddocs/entserver/sag_WINS_und_AdministeringTopnode.asp

The first one of those gives a good overview of the theory of operation.  
I don't know much about the others (they looked good in my Google query).

Some day, I need to document this protocol.  I haven't had time to dig 
into it, and I don't have the equipment to test it.  Sounds as though you 
have the equipment and the need to make the time.  :)

Keep in touch.

Chris -)-----

-- 
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the samba-technical mailing list