how to discover all netbios scopes on a LAN?

Christopher R. Hertel crh at
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 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:

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 --     -)-----   Christopher R. Hertel
jCIFS Team --   -)-----   ubiqx development, uninq.
ubiqx Team --     -)-----   crh at
OnLineBook --    -)-----   crh at

More information about the samba-technical mailing list