Samba related question.

bscott at ntisys.com bscott at ntisys.com
Fri Feb 13 08:55:25 EST 2004


On Thu, 12 Feb 2004, at 11:22pm, p.lussier at comcast.net wrote:
> While I fully understand the use of the term 'peer to peer' to imply that
> there is no central server utilized for file storage or printing, I must
> state emphatically that:
> 
>    There is no such thing as a 'peer to peer' network.[1]

  While I do agree, it is important to understand that Microsoft Windows is
designed around Microsoft's concept of networking (i.e., "peer to peer" vs
"client/server").  If you put a Microsoft Windows Server computer on a LAN
of computers running Windows "clients", the server will automatically take
over the NetBIOS "Master Browser" roles, and the workstations will
automatically defer to it.  This is how Windows is coded.

  This is significant because one of the most common problems on so-called
"peer-to-peer" networks is name resolution and NetBIOS browsing issues (as
Ed Lawson is discovering).  Putting a Windows Server on a "peer-to-peer"  
network thus often makes everything magically better.  Samba can be put to
the same use, as you can configure Samba such that it will always win a
NetBIOS browser election (even over a Windows Server).

On Thu, 12 Feb 2004, at 11:43pm, p.lussier at comcast.net wrote:
>> I would like to know how the Windows boxes on my network know the name of
>> my Linux box running Samba with no DNS or host files beyond the one on
>> the router.
> 
> One of your systems is acting as a WINS server.

  Not necessarily true.  Both Microsoft's and Samba's implementations of
NetBIOS will use local broadcasts for name resolution.  This does not
require a WINS server.  It is also very unreliable, which is why setting up
a WINS server is recommended.  However, people who don't understand the
internals of all this often get upset that "everything worked before"  
without a WINS server.  Unfortunately, "unreliable" does not mean "always
does not work" but rather "sometimes does not work".  It appears the human
race has trouble with this concept.

> I believe by default, Samba will, if the config file does not contain a
> 'netbios name' statement, use the system's hostname as it's 'netbios name'
> and broadcast that the local network.

  Yes.  Specifically, the "first component" of the hostname, which is the
same as the output of the command "hostname -s".

> [Samba will] broadcast [it's NetBIOS name] to the local network.  As a
> result, whichever system is the WINS server will notice that system and
> announce it to all clients which register with it.

  No.  WINS is not broadcast.  Even though they are totally different
protocols, WINS functions much like DNS (or rather, DNS plus dynamic DNS
update).  WINS clients communicate with their WINS server via unicast.  
They send both registrations of their own names, and queries for other
names.

  WINS is not auto-discovered.  WINS is configured just like DNS.  That
means you can manually enter the IP address of your WINS server(s), or you
can assign them via DHCP.

> There is *always* a WINS server on a network unless you explicitly tell
> all Windows systems not to try to be one ...

  Totally incorrect.

> There's a whole election system built into the protocol such that the one
> most "qualified" to be the server "WINS" (pun intended :) the election.

  You're confusing WINS with NetBIOS master browsers.

  NetBIOS master browsers are responsible for maintaining the list of all
names on a network, so that other systems can list them (to power things
like "Network Neighborhood" and the "NET VIEW" command).  When a NetBIOS
node starts, it finds the browser for it's workgroup and registers itself
with said browser.

  (There's also the distinction between a Local Master Browser and a Domain
Master Browser, but that only matters if you have more then one IP subnet.)

  WINS just registers NetBIOS names (and their associated IP addresses).  
One of the NetBIOS names that should get registered is the Master Browser
for the workgroup.  WINS clients will query for that name, and then contact
the Master Browser for the Browse List.

  It happens that, in many networks, your WINS server also ends up being the
Master Browser (because, again, Microsoft Windows Server will always win a
browser election over a Microsoft Windows client, and Windows clients do not
include WINS functionality).  However, it is perfectly possible to have one
computer be the WINS server and another computer be the Master Browser.

-- 
Ben Scott <bscott at ntisys.com>
| The opinions expressed in this message are those of the author and do  |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind.              |




More information about the gnhlug-discuss mailing list