merge from 2.2
[Samba/gbeck.git] / docs / textdocs / BROWSING-Config.txt
blobba0f399f48dbad0d0e7056e5f6884be612ebb4cd
1 Date:           July 5, 1998
2 Contributor:    John H Terpstra <jht@samba.org>
4 Subject:        Cross Subnet Browsing / Cross Workgroup Browsing
5 ===============================================================================
7 OVERVIEW:
8 =========
10 This document should be read in conjunction with BROWSING.txt and may
11 be taken as the fast track guide to implementing browsing across subnets
12 and / or across workgroups (or domains). WINS is the best tool for resolution
13 of NetBIOS names to IP addesses. WINS is NOT involved in browse list handling
14 except by way of name to address mapping.
17 DISCUSSION:
18 ===========
20 Firstly, all MS Windows networking is based on SMB (Server Message
21 Block) based messaging. SMB messaging is implemented using NetBIOS. Samba
22 implements NetBIOS by encapsulating it over TCP/IP. MS Windows products can
23 do likewise. NetBIOS based networking uses broadcast messaging to affect
24 browse list management. When running NetBIOS over TCP/IP this uses UDP
25 based messaging. UDP messages can be broadcast or unicast.
27 Normally, only unicast UDP messaging can be forwarded by routers. The
28 "remote announce" parameter to smb.conf helps to project browse announcements
29 to remote network segments via unicast UDP. Similarly, the "remote browse sync"
30 parameter of smb.conf implements browse list collation using unicast UDP.
32 Secondly, in those networks where Samba is the only SMB server technology
33 wherever possible nmbd should be configured on one (1) machine as the WINS
34 server. This makes it easy to manage the browsing environment. If each network
35 segment is configured with it's own Samba WINS server, then the only way to
36 get cross segment browsing to work is by using the "remote announce" and
37 the "remote browse sync" parameters to your smb.conf file.
39 If only one WINS server is used then the use of the "remote announce" and the
40 "remote browse sync" parameters should NOT be necessary.
42 Samba WINS does not support MS-WINS replication. This means that when setting up
43 Samba as a WINS server there must only be one nmbd configured as a WINS server
44 on the network. Some sites have used multiple Samba WINS servers for redundancy
45 (one server per subnet) and then used "remote browse sync" and "remote announce"
46 to affect browse list collation across all segments. Note that this means
47 clients will only resolve local names, and must be configured to use DNS to
48 resolve names on other subnets in order to resolve the IP addresses of the
49 servers they can see on other subnets. This setup is not recommended, but is
50 mentioned as a practical consideration (ie: an 'if all else fails' scenario).
52 Lastly, take note that browse lists are a collection of unreliable broadcast
53 messages that are repeated at intervals of not more than 15 minutes. This means
54 that it will take time to establish a browse list and it can take up to 45
55 minutes to stabilise, particularly across network segments.
58 A) Use of the "Remote Announce" parameter
59 ------------------------------------------
60 The "remote announce" parameter of smb.conf can be used to forcibly ensure
61 that all the NetBIOS names on a network get announced to a remote network.
62 The syntax of the "remote announce" parameter is:
64         remote announce = a.b.c.d [e.f.g.h] ...
65 _or_
66         remote announce = a.b.c.d/WORKGROUP [e.f.g.h/WORKGROUP] ...
68 where:
69         a.b.c.d:        is either the LMB (Local Master Browser) IP address
70         e.f.g.h:        or the broadcst address of the remote network.
71                         ie: the LMB is at 192.168.1.10, or the address
72                         could be given as 192.168.1.255 where the netmask
73                         is assumed to be 24 bits (255.255.255.0).
74                         When the remote announcement is made to the broadcast
75                         address of the remote network every host will receive
76                         our announcements. This is noisy and therefore
77                         undesirable but may be necessary if we do NOT know
78                         the IP address of the remote LMB.
80         WORKGROUP:      is optional and can be either our own workgroup
81                         or that of the remote network. If you use the
82                         workgroup name of the remote network then our
83                         NetBIOS machine names will end up looking like
84                         they belong to that workgroup, this may cause
85                         name resolution problems and should be avoided.
88 B) Use of the "Remote Browse Sync" parameter
89 --------------------------------------------
91 The "remote browse sync" parameter of smb.conf is used to announce to
92 another LMB that it must synchronise it's NetBIOS name list with our
93 Samba LMB. It works ONLY if the Samba server that has this option is
94 simultaneously the LMB on it's network segment.
96 The syntax of the "remote browse  sync" parameter is:
98         remote browse sync = a.b.c.d
100 where:
101         a.b.c.d:        is either the IP address of the remote LMB or else
102                         is the network broadcast address of the remote segment.
105 C) Use of WINS
106 --------------
108 Use of WINS (either Samba WINS _or_ MS Windows NT Server WINS) is highly
109 recommended. Every NetBIOS machine registers it's name together with a
110 name_type value for each of of several types of service it has available.
111 eg: It registers it's name directly as a unique (the type 0x03) name.
112 It also registers it's name if it is running the lanmanager compatible
113 server service (used to make shares and printers available to other users)
114 by registering the server (the type 0x20) name.
116 All NetBIOS names are up to 15 characters in length. The name_type variable
117 is added to the end of the name - thus creating a 16 character name. Any
118 name that is shorter than 15 characters is padded with spaces to the 15th
119 character. ie: All NetBIOS names are 16 characters long (including the
120 name_type information).
122 WINS can store these 16 character names as they get registered. A client
123 that wants to log onto the network can ask the WINS server for a list
124 of all names that have registered the NetLogon service name_type. This saves
125 broadcast traffic and greatly expedites logon processing. Since broadcast
126 name resolution can not be used across network segments this type of
127 information can only be provided via WINS _or_ via statically configured
128 "lmhosts" files that must reside on all clients in the absence of WINS.
130 WINS also serves the purpose of forcing browse list synchronisation by all
131 LMB's. LMB's must synchronise their browse list with the DMB (domain master
132 browser) and WINS helps the LMB to identify it's DMB. By definition this
133 will work only within a single workgroup. Note that the domain master browser
134 has NOTHING to do with what is referred to as an MS Windows NT Domain. The
135 later is a reference to a security environment while the DMB refers to the
136 master controller for browse list information only.
138 Use of WINS will work correctly only if EVERY client TCP/IP protocol stack
139 has been configured to use the WINS server/s. Any client that has not been
140 configured to use the WINS server will continue to use only broadcast based
141 name registration so that WINS may NEVER get to know about it. In any case,
142 machines that have not registered with a WINS server will fail name to address
143 lookup attempts by other clients and will therefore cause workstation access
144 errors.
146 To configure Samba as a WINS server just add "wins support = yes" to the
147 smb.conf file [globals] section.
149 To configure Samba to register with a WINS server just add
150 "wins server = a.b.c.d" to your smb.conf file [globals] section.
152 DO NOT EVER use both "wins support = yes" together with "wins server = a.b.c.d"
153 particularly not using it's own IP address.
156 D) Do NOT use more than one (1) protocol on MS Windows machines
157 ---------------------------------------------------------------
159 A very common cause of browsing problems results from installing more than
160 one protocol on an MS Windows machine.
162 Every NetBIOS machine take part in a process of electing the LMB (and DMB)
163 every 15 minutes. A set of election criteria is used to determine the order
164 of precidence for winning this election process. A machine running Samba or
165 Windows NT will be biased so that the most suitable machine will predictably
166 win and thus retain it's role.
168 The election process is "fought out" so to speak over every NetBIOS network
169 interface. In the case of a Windows 9x machine that has both TCP/IP and IPX
170 installed and has NetBIOS enabled over both protocols the election will be
171 decided over both protocols. As often happens, if the Windows 9x machine is
172 the only one with both protocols then the LMB may be won on the NetBIOS
173 interface over the IPX protocol. Samba will then lose the LMB role as Windows
174 9x will insist it knows who the LMB is. Samba will then cease to function
175 as an LMB and thus browse list operation on all TCP/IP only machines will
176 fail.
178 The safest rule of all to follow it this - USE ONLY ONE PROTOCOL!
181 E) Name Resolution Order
182 ========================
184 Resolution of NetBIOS names to IP addresses can take place using a number
185 of methods. The only ones that can provide NetBIOS name_type information
186 are:
187         WINS:           the best tool!
188         LMHOSTS:        is static and hard to maintain.
189         Broadcast:      uses UDP and can not resolve names across
190                         remote segments.
192 Alternative means of name resolution includes:
193         /etc/hosts:     is static, hard to maintain, and lacks name_type info.
194         DNS:            is a good choice but lacks essential name_type info.
196 Many sites want to restrict DNS lookups and want to avoid broadcast name
197 resolution traffic. The "name resolve order" parameter is of great help here.
198 The syntax of the "name resolve order" parameter is:
200         name resolve order = wins lmhosts bcast host
201 _or_
202         name resolve order = wins lmhosts       (eliminates bcast and host)
204 the default is:
205         name  resolve order = host lmhost wins bcast
207 where:
208         "host" refers the the native methods used by the Unix system
209         to implement the gethostbyname() function call. This is normally
210         controlled by:
211                 /etc/host.conf
212                 /etc/nsswitch.conf
213                 /etc/resolv.conf
215 ===============================================================================