updated this document. now, when we get browsing questions, we can say,
[kai/samba.git] / docs / textdocs / BROWSING.txt
1 BROWSING
2 ========
3
4 Samba now fully supports browsing. The browsing is supported by nmbd
5 and is also controlled by options in the smb.conf file (see
6 smb.conf(5)).
7
8 Samba can act as a local browse master for a workgroup and the ability
9 for samba to support domain logons and scripts is now available.  See
10 DOMAIN.txt for more information on domain logons.
11
12 Samba can also act as a domain master browser for a workgroup.  This
13 means that it will collate lists from local browse masters into a
14 wide area network server list.  In order for browse clients to
15 resolve the names they may find in this list, it is recommended that
16 both samba and your clients use a WINS server
17
18 [Note that nmbd can be configured as a WINS server, but it is not
19 necessary to specifically use samba as your WINS server.  NTAS can
20 be configured as your WINS server.  In a mixed NT server and
21 samba environment on a Wide Area Network, it is recommended that
22 you use the NT server's WINS server capabilities.  In a samba-only
23 environment, it is recommended that you use one and only one nmbd
24 as your WINS server].
25
26 To get browsing to work you need to run nmbd as usual, but will need
27 to use the "workgroup" option in smb.conf to control what workgroup
28 Samba becomes a part of.
29
30 Samba also has a useful option for a Samba server to offer itself for
31 browsing on another subnet.  It is recommended that this option is only
32 used for 'unusual' purposes: announcements over the internet, for
33 example. See "remote announce" in the smb.conf man page. 
34
35 If something doesn't work then hopefully the log.nmb file will
36 help you track down the problem. Try a debug level of 2 or 3 for
37 finding problems.
38
39 Note that if it doesn't work for you, then you should still be able to
40 type the server name as \\SERVER in filemanager then hit enter and
41 filemanager should display the list of available shares.
42
43 Some people find browsing fails because they don't have the global
44 "guest account" set to a valid account. Remember that the IPC$
45 connection that lists the shares is done as guest, and thus you must
46 have a valid guest account.
47
48 Also, a lot of people are getting bitten by the problem of too many
49 parameters on the command line of nmbd in inetd.conf. This trick is to
50 not use spaces between the option and the parameter (eg: -d2 instead
51 Of -d 2), and to not use the -B and -N options. New versions of nmbd
52 are now far more likely to correctly find your broadcast and network
53 addess, so in most cases these aren't needed.
54
55 The other big problem people have is that their broadcast address,
56 netmask or IP address is wrong (specified with the "interfaces" option
57 in smb.conf)
58
59
60 FORCING SAMBA TO BE THE MASTER
61 ==============================
62
63 Who becomes the "master browser" is determined by an election process
64 using broadcasts. Each election packet contains a number of parameters
65 which determine what precedence (bias) a host should have in the
66 election. By default Samba uses a very low precedence and thus loses
67 elections to just about anyone else.
68
69 If you want Samba to win elections then just set the "os level" global
70 option in smb.conf to a higher number. It defaults to 0. Using 34
71 would make it win all elections over every other system (except other
72 samba systems!)
73
74 A "os level" of 2 would make it beat WfWg and Win95, but not NTAS. A
75 NTAS domain controller uses level 32.
76
77 The maximum os level is 255
78
79 If you want samba to force an election on startup, then set the
80 "preferred master" global option in smb.conf to "yes".  Samba will
81 then have a slight advantage over other potential master browsers
82 that are not preferred master browsers.
83
84 If you want samba to be a "domain master browser", then it is
85 recommended that you also set "preferred master" to "yes", because
86 samba will not become a domain master browser for the whole of your
87 LAN or WAN if it is not also a local master browser on its own
88 broadcast isolated subnet.
89
90
91 MAKING SAMBA THE DOMAIN MASTER
92 ==============================
93
94 The domain master is responsible for collating the browse lists of
95 multiple subnets so that browsing can occur between subnets. You can
96 make samba act as the domain master by setting "domain master = yes"
97 in smb.conf. By default it will not be a domain master.
98
99 When samba is the domain master and the master browser it will listen
100 for master announcements (made roughly every twelve minutes) from local
101 master browsers on other subnets and then contact them to synchronise
102 browse lists.
103
104 If you want samba to be the domain master then I suggest you also set
105 the "os level" high enough to make sure it wins elections, and set
106 "preferred master" to "yes", to get samba to force an election on
107 startup.
108
109 Note that all your servers (including samba) and clients should be
110 using a WINS server to resolve NetBIOS names.  If your clients are only
111 using broadcasting to resolve NetBIOS names, then two things will occur:
112
113 a) your local master browsers will be unable to find a domain master
114    browser, as it will only be looking on the local subnet.
115
116 b) if a client happens to get hold of a domain-wide browse list, and
117    a user attempts to access a host in that list, it will be unable to
118    resolve the NetBIOS name of that host.
119
120 If, however, both samba and your clients are using a WINS server, then:
121
122 a) your local master browsers will contact the WINS server and, as long as
123    samba has registered that it is a domain master browser with the WINS
124    server, your local master browser will receive samba's ip address
125    as its domain master browser.
126
127 b) when a client receives a domain-wide browse list, and a user attempts
128    to access a host in that list, it will contact the WINS server to
129    resolve the NetBIOS name of that host.  as long as that host has
130    registered its NetBIOS name with the same WINS server, the user will
131    be able to see that host. 
132
133
134 NOTIFYING THE DOMAIN CONTROLLER
135 ===============================
136
137 If you have a domain controller for the domain which Samba is a part
138 of then you should add the line "domain controller = address" to
139 smb.conf. "address" can either be a name available via DNS or a IP
140 address or a broadcast address. If it is a broadcast address then
141 Samba will look for a domain controller on that network.
142
143 If you have a domain controller, then you also have a domain master
144 browser (if your domain controller is Microsoft's NT Advanced Server,
145 or AT&T's Advanced Server for Unix, or SCO's Advanced File and Print
146 Server).
147
148 It will therefore be unnecessary for you to make samba a domain master,
149 and the parameter "domain master" should be set to 'no', and the
150 parameter "os level" should be set to a value between 0 and 32.
151 This will ensure that the domain controller will become your domain
152 master browser, and it only becomes a local master browser for its
153 subnet.
154
155 When Samba is the local master browser it will regularly contact the
156 "domain controller" to synchronise browse lists.
157
158
159 NOTE ABOUT BROADCAST ADDRESSES
160 ==============================
161
162 If your network uses a "0" based broadcast address (for example if it
163 ends in a 0) then you will strike problems. Windows for Workgroups
164 does not seem to support a 0's broadcast and you will probably find
165 that browsing and name lookups won't work.
166
167
168 MULTIPLE INTERFACES
169 ===================
170
171 Samba now supports machines with multiple network interfaces. If you
172 have multiple interfaces then you will need to use the "interfaces"
173 option in smb.conf to configure them. See smb.conf(5) for details.
174