* merge fixes for SGML syntax errors (does no one ever regenerate the docs?)
[gd/samba-autobuild/.git] / docs / htmldocs / improved-browsing.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Improved browsing in samba</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
9 "><LINK
10 REL="HOME"
11 TITLE="SAMBA Project Documentation"
12 HREF="samba-howto-collection.html"><LINK
13 REL="UP"
14 TITLE="General installation"
15 HREF="introduction.html"><LINK
16 REL="PREVIOUS"
17 TITLE="How to Install and Test SAMBA"
18 HREF="install.html"><LINK
19 REL="NEXT"
20 TITLE="Quick Cross Subnet Browsing / Cross Workgroup Browsing guide"
21 HREF="browsing-quick.html"></HEAD
22 ><BODY
23 CLASS="CHAPTER"
24 BGCOLOR="#FFFFFF"
25 TEXT="#000000"
26 LINK="#0000FF"
27 VLINK="#840084"
28 ALINK="#0000FF"
29 ><DIV
30 CLASS="NAVHEADER"
31 ><TABLE
32 SUMMARY="Header navigation table"
33 WIDTH="100%"
34 BORDER="0"
35 CELLPADDING="0"
36 CELLSPACING="0"
37 ><TR
38 ><TH
39 COLSPAN="3"
40 ALIGN="center"
41 >SAMBA Project Documentation</TH
42 ></TR
43 ><TR
44 ><TD
45 WIDTH="10%"
46 ALIGN="left"
47 VALIGN="bottom"
48 ><A
49 HREF="install.html"
50 ACCESSKEY="P"
51 >Prev</A
52 ></TD
53 ><TD
54 WIDTH="80%"
55 ALIGN="center"
56 VALIGN="bottom"
57 ></TD
58 ><TD
59 WIDTH="10%"
60 ALIGN="right"
61 VALIGN="bottom"
62 ><A
63 HREF="browsing-quick.html"
64 ACCESSKEY="N"
65 >Next</A
66 ></TD
67 ></TR
68 ></TABLE
69 ><HR
70 ALIGN="LEFT"
71 WIDTH="100%"></DIV
72 ><DIV
73 CLASS="CHAPTER"
74 ><H1
75 ><A
76 NAME="IMPROVED-BROWSING">Chapter 2. Improved browsing in samba</H1
77 ><DIV
78 CLASS="SECT1"
79 ><H1
80 CLASS="SECT1"
81 ><A
82 NAME="AEN229">2.1. Overview of browsing</H1
83 ><P
84 >SMB networking provides a mechanism by which clients can access a list
85 of machines in a network, a so-called "browse list".  This list
86 contains machines that are ready to offer file and/or print services
87 to other machines within the network. Thus it does not include
88 machines which aren't currently able to do server tasks.  The browse
89 list is heavily used by all SMB clients.  Configuration of SMB
90 browsing has been problematic for some Samba users, hence this
91 document.</P
92 ><P
93 >Browsing will NOT work if name resolution from NetBIOS names to IP
94 addresses does not function correctly. Use of a WINS server is highly
95 recommended to aid the resolution of NetBIOS (SMB) names to IP addresses.
96 WINS allows remote segment clients to obtain NetBIOS name_type information
97 that can NOT be provided by any other means of name resolution.</P
98 ></DIV
99 ><DIV
100 CLASS="SECT1"
101 ><H1
102 CLASS="SECT1"
103 ><A
104 NAME="AEN233">2.2. Browsing support in samba</H1
105 ><P
106 >Samba now fully supports browsing.  The browsing is supported by nmbd
107 and is also controlled by options in the smb.conf file (see smb.conf(5)).</P
108 ><P
109 >Samba can act as a local browse master for a workgroup and the ability
110 for samba to support domain logons and scripts is now available.  See
111 DOMAIN.txt for more information on domain logons.</P
112 ><P
113 >Samba can also act as a domain master browser for a workgroup.  This
114 means that it will collate lists from local browse masters into a
115 wide area network server list.  In order for browse clients to
116 resolve the names they may find in this list, it is recommended that
117 both samba and your clients use a WINS server.</P
118 ><P
119 >Note that you should NOT set Samba to be the domain master for a
120 workgroup that has the same name as an NT Domain: on each wide area
121 network, you must only ever have one domain master browser per workgroup,
122 regardless of whether it is NT, Samba or any other type of domain master
123 that is providing this service.</P
124 ><P
125 >[Note that nmbd can be configured as a WINS server, but it is not
126 necessary to specifically use samba as your WINS server.  NTAS can
127 be configured as your WINS server.  In a mixed NT server and
128 samba environment on a Wide Area Network, it is recommended that
129 you use the NT server's WINS server capabilities.  In a samba-only
130 environment, it is recommended that you use one and only one nmbd
131 as your WINS server].</P
132 ><P
133 >To get browsing to work you need to run nmbd as usual, but will need
134 to use the "workgroup" option in smb.conf to control what workgroup
135 Samba becomes a part of.</P
136 ><P
137 >Samba also has a useful option for a Samba server to offer itself for
138 browsing on another subnet.  It is recommended that this option is only
139 used for 'unusual' purposes: announcements over the internet, for
140 example.  See "remote announce" in the smb.conf man page.  </P
141 ></DIV
142 ><DIV
143 CLASS="SECT1"
144 ><H1
145 CLASS="SECT1"
146 ><A
147 NAME="AEN242">2.3. Problem resolution</H1
148 ><P
149 >If something doesn't work then hopefully the log.nmb file will help
150 you track down the problem.  Try a debug level of 2 or 3 for finding
151 problems. Also note that the current browse list usually gets stored
152 in text form in a file called browse.dat.</P
153 ><P
154 >Note that if it doesn't work for you, then you should still be able to
155 type the server name as \\SERVER in filemanager then hit enter and
156 filemanager should display the list of available shares.</P
157 ><P
158 >Some people find browsing fails because they don't have the global
159 "guest account" set to a valid account.  Remember that the IPC$
160 connection that lists the shares is done as guest, and thus you must
161 have a valid guest account.</P
162 ><P
163 >Also, a lot of people are getting bitten by the problem of too many
164 parameters on the command line of nmbd in inetd.conf.  This trick is to
165 not use spaces between the option and the parameter (eg: -d2 instead
166 of -d 2), and to not use the -B and -N options.  New versions of nmbd
167 are now far more likely to correctly find your broadcast and network
168 address, so in most cases these aren't needed.</P
169 ><P
170 >The other big problem people have is that their broadcast address,
171 netmask or IP address is wrong (specified with the "interfaces" option
172 in smb.conf)</P
173 ></DIV
174 ><DIV
175 CLASS="SECT1"
176 ><H1
177 CLASS="SECT1"
178 ><A
179 NAME="AEN249">2.4. Browsing across subnets</H1
180 ><P
181 >With the release of Samba 1.9.17(alpha1 and above) Samba has been
182 updated to enable it to support the replication of browse lists
183 across subnet boundaries.  New code and options have been added to
184 achieve this.  This section describes how to set this feature up
185 in different settings.</P
186 ><P
187 >To see browse lists that span TCP/IP subnets (ie.  networks separated
188 by routers that don't pass broadcast traffic) you must set up at least
189 one WINS server.  The WINS server acts as a DNS for NetBIOS names, allowing
190 NetBIOS name to IP address translation to be done by doing a direct
191 query of the WINS server.  This is done via a directed UDP packet on
192 port 137 to the WINS server machine.  The reason for a WINS server is
193 that by default, all NetBIOS name to IP address translation is done
194 by broadcasts from the querying machine.  This means that machines
195 on one subnet will not be able to resolve the names of machines on
196 another subnet without using a WINS server.</P
197 ><P
198 >Remember, for browsing across subnets to work correctly, all machines,
199 be they Windows 95, Windows NT, or Samba servers must have the IP address
200 of a WINS server given to them by a DHCP server, or by manual configuration 
201 (for Win95 and WinNT, this is in the TCP/IP Properties, under Network 
202 settings) for Samba this is in the smb.conf file.</P
203 ><DIV
204 CLASS="SECT2"
205 ><H2
206 CLASS="SECT2"
207 ><A
208 NAME="AEN254">2.4.1. How does cross subnet browsing work ?</H2
209 ><P
210 >Cross subnet browsing is a complicated dance, containing multiple
211 moving parts.  It has taken Microsoft several years to get the code
212 that achieves this correct, and Samba lags behind in some areas.
213 However, with the 1.9.17 release, Samba is capable of cross subnet
214 browsing when configured correctly.</P
215 ><P
216 >Consider a network set up as follows :</P
217 ><P
218 ><PRE
219 CLASS="PROGRAMLISTING"
220 >                                   (DMB)
221              N1_A      N1_B        N1_C       N1_D        N1_E
222               |          |           |          |           |
223           -------------------------------------------------------
224             |          subnet 1                       |
225           +---+                                      +---+
226           |R1 | Router 1                  Router 2   |R2 |
227           +---+                                      +---+
228             |                                          |
229             |  subnet 2              subnet 3          |
230   --------------------------       ------------------------------------
231   |     |     |      |               |        |         |           |
232  N2_A  N2_B  N2_C   N2_D           N3_A     N3_B      N3_C        N3_D 
233                     (WINS)</PRE
234 ></P
235 ><P
236 >Consisting of 3 subnets (1, 2, 3) connected by two routers
237 (R1, R2) - these do not pass broadcasts.  Subnet 1 has 5 machines
238 on it, subnet 2 has 4 machines, subnet 3 has 4 machines.  Assume
239 for the moment that all these machines are configured to be in the
240 same workgroup (for simplicities sake).  Machine N1_C on subnet 1
241 is configured as Domain Master Browser (ie.  it will collate the
242 browse lists for the workgroup).  Machine N2_D is configured as
243 WINS server and all the other machines are configured to register
244 their NetBIOS names with it.</P
245 ><P
246 >As all these machines are booted up, elections for master browsers
247 will take place on each of the three subnets.  Assume that machine
248 N1_C wins on subnet 1, N2_B wins on subnet 2, and N3_D wins on
249 subnet 3 - these machines are known as local master browsers for
250 their particular subnet.  N1_C has an advantage in winning as the
251 local master browser on subnet 1 as it is set up as Domain Master
252 Browser.</P
253 ><P
254 >On each of the three networks, machines that are configured to 
255 offer sharing services will broadcast that they are offering
256 these services.  The local master browser on each subnet will
257 receive these broadcasts and keep a record of the fact that
258 the machine is offering a service.  This list of records is
259 the basis of the browse list.  For this case, assume that
260 all the machines are configured to offer services so all machines
261 will be on the browse list.</P
262 ><P
263 >For each network, the local master browser on that network is
264 considered 'authoritative' for all the names it receives via
265 local broadcast.  This is because a machine seen by the local
266 master browser via a local broadcast must be on the same 
267 network as the local master browser and thus is a 'trusted'
268 and 'verifiable' resource.  Machines on other networks that
269 the local master browsers learn about when collating their
270 browse lists have not been directly seen - these records are
271 called 'non-authoritative'.</P
272 ><P
273 >At this point the browse lists look as follows (these are 
274 the machines you would see in your network neighborhood if
275 you looked in it on a particular network right now).</P
276 ><P
277 ><PRE
278 CLASS="PROGRAMLISTING"
279 >Subnet           Browse Master   List
280 ------           -------------   ----
281 Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E
282
283 Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
284
285 Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D</PRE
286 ></P
287 ><P
288 >Note that at this point all the subnets are separate, no
289 machine is seen across any of the subnets.</P
290 ><P
291 >Now examine subnet 2.  As soon as N2_B has become the local
292 master browser it looks for a Domain master browser to synchronize
293 its browse list with.  It does this by querying the WINS server
294 (N2_D) for the IP address associated with the NetBIOS name 
295 WORKGROUP&gt;1B&lt;.  This name was registerd by the Domain master
296 browser (N1_C) with the WINS server as soon as it was booted.</P
297 ><P
298 >Once N2_B knows the address of the Domain master browser it
299 tells it that is the local master browser for subnet 2 by
300 sending a MasterAnnouncement packet as a UDP port 138 packet.
301 It then synchronizes with it by doing a NetServerEnum2 call.  This
302 tells the Domain Master Browser to send it all the server
303 names it knows about.  Once the domain master browser receives
304 the MasterAnnouncement packet it schedules a synchronization
305 request to the sender of that packet.  After both synchronizations
306 are done the browse lists look like :</P
307 ><P
308 ><PRE
309 CLASS="PROGRAMLISTING"
310 >Subnet           Browse Master   List
311 ------           -------------   ----
312 Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E, 
313                                  N2_A(*), N2_B(*), N2_C(*), N2_D(*)
314
315 Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
316                                  N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
317
318 Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
319
320 Servers with a (*) after them are non-authoritative names.</PRE
321 ></P
322 ><P
323 >At this point users looking in their network neighborhood on
324 subnets 1 or 2 will see all the servers on both, users on
325 subnet 3 will still only see the servers on their own subnet.</P
326 ><P
327 >The same sequence of events that occured for N2_B now occurs
328 for the local master browser on subnet 3 (N3_D).  When it
329 synchronizes browse lists with the domain master browser (N1_A)
330 it gets both the server entries on subnet 1, and those on
331 subnet 2.  After N3_D has synchronized with N1_C and vica-versa
332 the browse lists look like.</P
333 ><P
334 ><PRE
335 CLASS="PROGRAMLISTING"
336 >Subnet           Browse Master   List
337 ------           -------------   ----
338 Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E, 
339                                  N2_A(*), N2_B(*), N2_C(*), N2_D(*),
340                                  N3_A(*), N3_B(*), N3_C(*), N3_D(*)
341
342 Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
343                                  N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
344
345 Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
346                                  N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
347                                  N2_A(*), N2_B(*), N2_C(*), N2_D(*)
348
349 Servers with a (*) after them are non-authoritative names.</PRE
350 ></P
351 ><P
352 >At this point users looking in their network neighborhood on
353 subnets 1 or 3 will see all the servers on all sunbets, users on
354 subnet 2 will still only see the servers on subnets 1 and 2, but not 3.</P
355 ><P
356 >Finally, the local master browser for subnet 2 (N2_B) will sync again
357 with the domain master browser (N1_C) and will recieve the missing
358 server entries.  Finally - and as a steady state (if no machines
359 are removed or shut off) the browse lists will look like :</P
360 ><P
361 ><PRE
362 CLASS="PROGRAMLISTING"
363 >Subnet           Browse Master   List
364 ------           -------------   ----
365 Subnet1          N1_C            N1_A, N1_B, N1_C, N1_D, N1_E, 
366                                  N2_A(*), N2_B(*), N2_C(*), N2_D(*),
367                                  N3_A(*), N3_B(*), N3_C(*), N3_D(*)
368
369 Subnet2          N2_B            N2_A, N2_B, N2_C, N2_D
370                                  N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*)
371                                  N3_A(*), N3_B(*), N3_C(*), N3_D(*)
372
373 Subnet3          N3_D            N3_A, N3_B, N3_C, N3_D
374                                  N1_A(*), N1_B(*), N1_C(*), N1_D(*), N1_E(*),
375                                  N2_A(*), N2_B(*), N2_C(*), N2_D(*)
376         
377 Servers with a (*) after them are non-authoritative names.</PRE
378 ></P
379 ><P
380 >Synchronizations between the domain master browser and local
381 master browsers will continue to occur, but this should be a
382 steady state situation.</P
383 ><P
384 >If either router R1 or R2 fails the following will occur:</P
385 ><P
386 ></P
387 ><OL
388 TYPE="1"
389 ><LI
390 ><P
391 >       Names of computers on each side of the inaccessible network fragments
392         will be maintained for as long as 36 minutes, in the network neighbourhood
393         lists.
394         </P
395 ></LI
396 ><LI
397 ><P
398 >       Attempts to connect to these inaccessible computers will fail, but the
399         names will not be removed from the network neighbourhood lists.
400         </P
401 ></LI
402 ><LI
403 ><P
404 >       If one of the fragments is cut off from the WINS server, it will only
405         be able to access servers on its local subnet, by using subnet-isolated
406         broadcast NetBIOS name resolution.  The effects are similar to that of
407         losing access to a DNS server.
408         </P
409 ></LI
410 ></OL
411 ></DIV
412 ></DIV
413 ><DIV
414 CLASS="SECT1"
415 ><H1
416 CLASS="SECT1"
417 ><A
418 NAME="AEN289">2.5. Setting up a WINS server</H1
419 ><P
420 >Either a Samba machine or a Windows NT Server machine may be set up
421 as a WINS server.  To set a Samba machine to be a WINS server you must
422 add the following option to the smb.conf file on the selected machine :
423 in the [globals] section add the line </P
424 ><P
425 ><B
426 CLASS="COMMAND"
427 >               wins support = yes</B
428 ></P
429 ><P
430 >Versions of Samba previous to 1.9.17 had this parameter default to
431 yes.  If you have any older versions of Samba on your network it is
432 strongly suggested you upgrade to 1.9.17 or above, or at the very
433 least set the parameter to 'no' on all these machines.</P
434 ><P
435 >Machines with "<B
436 CLASS="COMMAND"
437 >wins support = yes</B
438 >" will keep a list of 
439 all NetBIOS names registered with them, acting as a DNS for NetBIOS names.</P
440 ><P
441 >You should set up only ONE wins server.  Do NOT set the
442 "<B
443 CLASS="COMMAND"
444 >wins support = yes</B
445 >" option on more than one Samba 
446 server.</P
447 ><P
448 >To set up a Windows NT Server as a WINS server you need to set up
449 the WINS service - see your NT documentation for details.  Note that
450 Windows NT WINS Servers can replicate to each other, allowing more
451 than one to be set up in a complex subnet environment.  As Microsoft
452 refuse to document these replication protocols Samba cannot currently
453 participate in these replications.  It is possible in the future that
454 a Samba-&#62;Samba WINS replication protocol may be defined, in which
455 case more than one Samba machine could be set up as a WINS server
456 but currently only one Samba server should have the "wins support = yes"
457 parameter set.</P
458 ><P
459 >After the WINS server has been configured you must ensure that all
460 machines participating on the network are configured with the address
461 of this WINS server.  If your WINS server is a Samba machine, fill in
462 the Samba machine IP address in the "Primary WINS Server" field of
463 the "Control Panel-&#62;Network-&#62;Protocols-&#62;TCP-&#62;WINS Server" dialogs
464 in Windows 95 or Windows NT.  To tell a Samba server the IP address
465 of the WINS server add the following line to the [global] section of
466 all smb.conf files :</P
467 ><P
468 ><B
469 CLASS="COMMAND"
470 >wins server = &gt;name or IP address&lt;</B
471 ></P
472 ><P
473 >where &gt;name or IP address&lt; is either the DNS name of the WINS server
474 machine or its IP address.</P
475 ><P
476 >Note that this line MUST NOT BE SET in the smb.conf file of the Samba
477 server acting as the WINS server itself.  If you set both the
478 "<B
479 CLASS="COMMAND"
480 >wins support = yes</B
481 >" option and the 
482 "<B
483 CLASS="COMMAND"
484 >wins server = &gt;name&lt;</B
485 >" option then
486 nmbd will fail to start.</P
487 ><P
488 >There are two possible scenarios for setting up cross subnet browsing.
489 The first details setting up cross subnet browsing on a network containing
490 Windows 95, Samba and Windows NT machines that are not configured as
491 part of a Windows NT Domain.  The second details setting up cross subnet
492 browsing on networks that contain NT Domains.</P
493 ></DIV
494 ><DIV
495 CLASS="SECT1"
496 ><H1
497 CLASS="SECT1"
498 ><A
499 NAME="AEN308">2.6. Setting up Browsing in a WORKGROUP</H1
500 ><P
501 >To set up cross subnet browsing on a network containing machines
502 in up to be in a WORKGROUP, not an NT Domain you need to set up one
503 Samba server to be the Domain Master Browser (note that this is *NOT*
504 the same as a Primary Domain Controller, although in an NT Domain the
505 same machine plays both roles).  The role of a Domain master browser is
506 to collate the browse lists from local master browsers on all the
507 subnets that have a machine participating in the workgroup.  Without
508 one machine configured as a domain master browser each subnet would
509 be an isolated workgroup, unable to see any machines on any other
510 subnet.  It is the presense of a domain master browser that makes
511 cross subnet browsing possible for a workgroup.</P
512 ><P
513 >In an WORKGROUP environment the domain master browser must be a
514 Samba server, and there must only be one domain master browser per
515 workgroup name.  To set up a Samba server as a domain master browser,
516 set the following option in the [global] section of the smb.conf file :</P
517 ><P
518 ><B
519 CLASS="COMMAND"
520 >domain master = yes</B
521 ></P
522 ><P
523 >The domain master browser should also preferrably be the local master
524 browser for its own subnet.  In order to achieve this set the following
525 options in the [global] section of the smb.conf file :</P
526 ><P
527 ><PRE
528 CLASS="PROGRAMLISTING"
529 >        domain master = yes
530         local master = yes
531         preferred master = yes
532         os level = 65</PRE
533 ></P
534 ><P
535 >The domain master browser may be the same machine as the WINS
536 server, if you require.</P
537 ><P
538 >Next, you should ensure that each of the subnets contains a
539 machine that can act as a local master browser for the
540 workgroup.  Any NT machine should be able to do this, as will
541 Windows 95 machines (although these tend to get rebooted more
542 often, so it's not such a good idea to use these).  To make a 
543 Samba server a local master browser set the following
544 options in the [global] section of the smb.conf file :</P
545 ><P
546 ><PRE
547 CLASS="PROGRAMLISTING"
548 >        domain master = no
549         local master = yes
550         preferred master = yes
551         os level = 65</PRE
552 ></P
553 ><P
554 >Do not do this for more than one Samba server on each subnet,
555 or they will war with each other over which is to be the local
556 master browser.</P
557 ><P
558 >The "local master" parameter allows Samba to act as a local master
559 browser.  The "preferred master" causes nmbd to force a browser
560 election on startup and the "os level" parameter sets Samba high
561 enough so that it should win any browser elections.</P
562 ><P
563 >If you have an NT machine on the subnet that you wish to
564 be the local master browser then you can disable Samba from
565 becoming a local master browser by setting the following
566 options in the [global] section of the smb.conf file :</P
567 ><P
568 ><PRE
569 CLASS="PROGRAMLISTING"
570 >        domain master = no
571         local master = no
572         preferred master = no
573         os level = 0</PRE
574 ></P
575 ></DIV
576 ><DIV
577 CLASS="SECT1"
578 ><H1
579 CLASS="SECT1"
580 ><A
581 NAME="AEN326">2.7. Setting up Browsing in a DOMAIN</H1
582 ><P
583 >If you are adding Samba servers to a Windows NT Domain then
584 you must not set up a Samba server as a domain master browser.
585 By default, a Windows NT Primary Domain Controller for a Domain
586 name is also the Domain master browser for that name, and many
587 things will break if a Samba server registers the Domain master
588 browser NetBIOS name (DOMAIN&gt;1B&lt;) with WINS instead of the PDC.</P
589 ><P
590 >For subnets other than the one containing the Windows NT PDC
591 you may set up Samba servers as local master browsers as
592 described.  To make a Samba server a local master browser set 
593 the following options in the [global] section of the smb.conf 
594 file :</P
595 ><P
596 ><PRE
597 CLASS="PROGRAMLISTING"
598 >        domain master = no
599         local master = yes
600         preferred master = yes
601         os level = 65</PRE
602 ></P
603 ><P
604 >If you wish to have a Samba server fight the election with machines
605 on the same subnet you may set the "os level" parameter to lower
606 levels.  By doing this you can tune the order of machines that
607 will become local master browsers if they are running.  For
608 more details on this see the section "FORCING SAMBA TO BE THE MASTER"
609 below.</P
610 ><P
611 >If you have Windows NT machines that are members of the domain
612 on all subnets, and you are sure they will always be running then
613 you can disable Samba from taking part in browser elections and
614 ever becoming a local master browser by setting following options 
615 in the [global] section of the smb.conf file :</P
616 ><P
617 ><B
618 CLASS="COMMAND"
619 >        domain master = no
620         local master = no
621         preferred master = no
622         os level = 0</B
623 ></P
624 ></DIV
625 ><DIV
626 CLASS="SECT1"
627 ><H1
628 CLASS="SECT1"
629 ><A
630 NAME="AEN336">2.8. Forcing samba to be the master</H1
631 ><P
632 >Who becomes the "master browser" is determined by an election process
633 using broadcasts.  Each election packet contains a number of parameters
634 which determine what precedence (bias) a host should have in the
635 election.  By default Samba uses a very low precedence and thus loses
636 elections to just about anyone else.</P
637 ><P
638 >If you want Samba to win elections then just set the "os level" global
639 option in smb.conf to a higher number.  It defaults to 0.  Using 34
640 would make it win all elections over every other system (except other
641 samba systems!)</P
642 ><P
643 >A "os level" of 2 would make it beat WfWg and Win95, but not NTAS.  A
644 NTAS domain controller uses level 32.</P
645 ><P
646 >The maximum os level is 255</P
647 ><P
648 >If you want samba to force an election on startup, then set the
649 "preferred master" global option in smb.conf to "yes".  Samba will
650 then have a slight advantage over other potential master browsers
651 that are not preferred master browsers.  Use this parameter with
652 care, as if you have two hosts (whether they are windows 95 or NT or
653 samba) on the same local subnet both set with "preferred master" to
654 "yes", then periodically and continually they will force an election
655 in order to become the local master browser.</P
656 ><P
657 >If you want samba to be a "domain master browser", then it is
658 recommended that you also set "preferred master" to "yes", because
659 samba will not become a domain master browser for the whole of your
660 LAN or WAN if it is not also a local master browser on its own
661 broadcast isolated subnet.</P
662 ><P
663 >It is possible to configure two samba servers to attempt to become
664 the domain master browser for a domain.  The first server that comes
665 up will be the domain master browser.  All other samba servers will
666 attempt to become the domain master browser every 5 minutes.  They
667 will find that another samba server is already the domain master
668 browser and will fail.  This provides automatic redundancy, should
669 the current domain master browser fail.</P
670 ></DIV
671 ><DIV
672 CLASS="SECT1"
673 ><H1
674 CLASS="SECT1"
675 ><A
676 NAME="AEN345">2.9. Making samba the domain master</H1
677 ><P
678 >The domain master is responsible for collating the browse lists of
679 multiple subnets so that browsing can occur between subnets.  You can
680 make samba act as the domain master by setting "domain master = yes"
681 in smb.conf.  By default it will not be a domain master.</P
682 ><P
683 >Note that you should NOT set Samba to be the domain master for a
684 workgroup that has the same name as an NT Domain.</P
685 ><P
686 >When samba is the domain master and the master browser it will listen
687 for master announcements (made roughly every twelve minutes) from local
688 master browsers on other subnets and then contact them to synchronise
689 browse lists.</P
690 ><P
691 >If you want samba to be the domain master then I suggest you also set
692 the "os level" high enough to make sure it wins elections, and set
693 "preferred master" to "yes", to get samba to force an election on
694 startup.</P
695 ><P
696 >Note that all your servers (including samba) and clients should be
697 using a WINS server to resolve NetBIOS names.  If your clients are only
698 using broadcasting to resolve NetBIOS names, then two things will occur:</P
699 ><P
700 ></P
701 ><OL
702 TYPE="1"
703 ><LI
704 ><P
705 >       your local master browsers will be unable to find a domain master
706         browser, as it will only be looking on the local subnet.
707         </P
708 ></LI
709 ><LI
710 ><P
711 >       if a client happens to get hold of a domain-wide browse list, and
712         a user attempts to access a host in that list, it will be unable to
713         resolve the NetBIOS name of that host.
714         </P
715 ></LI
716 ></OL
717 ><P
718 >If, however, both samba and your clients are using a WINS server, then:</P
719 ><P
720 ></P
721 ><OL
722 TYPE="1"
723 ><LI
724 ><P
725 >       your local master browsers will contact the WINS server and, as long as
726         samba has registered that it is a domain master browser with the WINS
727         server, your local master browser will receive samba's ip address
728         as its domain master browser.
729         </P
730 ></LI
731 ><LI
732 ><P
733 >       when a client receives a domain-wide browse list, and a user attempts
734         to access a host in that list, it will contact the WINS server to
735         resolve the NetBIOS name of that host.  as long as that host has
736         registered its NetBIOS name with the same WINS server, the user will
737         be able to see that host.  
738         </P
739 ></LI
740 ></OL
741 ></DIV
742 ><DIV
743 CLASS="SECT1"
744 ><H1
745 CLASS="SECT1"
746 ><A
747 NAME="AEN363">2.10. Note about broadcast addresses</H1
748 ><P
749 >If your network uses a "0" based broadcast address (for example if it
750 ends in a 0) then you will strike problems.  Windows for Workgroups
751 does not seem to support a 0's broadcast and you will probably find
752 that browsing and name lookups won't work.</P
753 ></DIV
754 ><DIV
755 CLASS="SECT1"
756 ><H1
757 CLASS="SECT1"
758 ><A
759 NAME="AEN366">2.11. Multiple interfaces</H1
760 ><P
761 >Samba now supports machines with multiple network interfaces.  If you
762 have multiple interfaces then you will need to use the "interfaces"
763 option in smb.conf to configure them.  See smb.conf(5) for details.</P
764 ></DIV
765 ></DIV
766 ><DIV
767 CLASS="NAVFOOTER"
768 ><HR
769 ALIGN="LEFT"
770 WIDTH="100%"><TABLE
771 SUMMARY="Footer navigation table"
772 WIDTH="100%"
773 BORDER="0"
774 CELLPADDING="0"
775 CELLSPACING="0"
776 ><TR
777 ><TD
778 WIDTH="33%"
779 ALIGN="left"
780 VALIGN="top"
781 ><A
782 HREF="install.html"
783 ACCESSKEY="P"
784 >Prev</A
785 ></TD
786 ><TD
787 WIDTH="34%"
788 ALIGN="center"
789 VALIGN="top"
790 ><A
791 HREF="samba-howto-collection.html"
792 ACCESSKEY="H"
793 >Home</A
794 ></TD
795 ><TD
796 WIDTH="33%"
797 ALIGN="right"
798 VALIGN="top"
799 ><A
800 HREF="browsing-quick.html"
801 ACCESSKEY="N"
802 >Next</A
803 ></TD
804 ></TR
805 ><TR
806 ><TD
807 WIDTH="33%"
808 ALIGN="left"
809 VALIGN="top"
810 >How to Install and Test SAMBA</TD
811 ><TD
812 WIDTH="34%"
813 ALIGN="center"
814 VALIGN="top"
815 ><A
816 HREF="introduction.html"
817 ACCESSKEY="U"
818 >Up</A
819 ></TD
820 ><TD
821 WIDTH="33%"
822 ALIGN="right"
823 VALIGN="top"
824 >Quick Cross Subnet Browsing / Cross Workgroup Browsing guide</TD
825 ></TR
826 ></TABLE
827 ></DIV
828 ></BODY
829 ></HTML
830 >