1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN">
5 >Quick Cross Subnet Browsing / Cross Workgroup Browsing guide
</TITLE
8 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.76b+
11 TITLE=
"SAMBA Project Documentation"
12 HREF=
"samba-howto-collection.html"><LINK
14 TITLE=
"General installation"
15 HREF=
"introduction.html"><LINK
17 TITLE=
"Improved browsing in samba"
18 HREF=
"improved-browsing.html"><LINK
20 TITLE=
"LanMan and NT Password Encryption in Samba"
21 HREF=
"pwencrypt.html"></HEAD
32 SUMMARY=
"Header navigation table"
41 >SAMBA Project Documentation
</TH
49 HREF=
"improved-browsing.html"
76 NAME=
"BROWSING-QUICK">Chapter
3. Quick Cross Subnet Browsing / Cross Workgroup Browsing guide
</H1
78 >This document should be read in conjunction with Browsing and may
79 be taken as the fast track guide to implementing browsing across subnets
80 and / or across workgroups (or domains). WINS is the best tool for resolution
81 of NetBIOS names to IP addesses. WINS is NOT involved in browse list handling
82 except by way of name to address mapping.
</P
88 NAME=
"AEN377">3.1. Discussion
</H1
90 >Firstly, all MS Windows networking is based on SMB (Server Message
91 Block) based messaging. SMB messaging is implemented using NetBIOS. Samba
92 implements NetBIOS by encapsulating it over TCP/IP. MS Windows products can
93 do likewise. NetBIOS based networking uses broadcast messaging to affect
94 browse list management. When running NetBIOS over TCP/IP this uses UDP
95 based messaging. UDP messages can be broadcast or unicast.
</P
97 >Normally, only unicast UDP messaging can be forwarded by routers. The
98 "remote announce" parameter to smb.conf helps to project browse announcements
99 to remote network segments via unicast UDP. Similarly, the
"remote browse sync"
100 parameter of smb.conf implements browse list collation using unicast UDP.
</P
102 >Secondly, in those networks where Samba is the only SMB server technology
103 wherever possible nmbd should be configured on one (
1) machine as the WINS
104 server. This makes it easy to manage the browsing environment. If each network
105 segment is configured with it's own Samba WINS server, then the only way to
106 get cross segment browsing to work is by using the
"remote announce" and
107 the
"remote browse sync" parameters to your smb.conf file.
</P
109 >If only one WINS server is used then the use of the
"remote announce" and the
110 "remote browse sync" parameters should NOT be necessary.
</P
112 >Samba WINS does not support MS-WINS replication. This means that when setting up
113 Samba as a WINS server there must only be one nmbd configured as a WINS server
114 on the network. Some sites have used multiple Samba WINS servers for redundancy
115 (one server per subnet) and then used
"remote browse sync" and
"remote announce"
116 to affect browse list collation across all segments. Note that this means
117 clients will only resolve local names, and must be configured to use DNS to
118 resolve names on other subnets in order to resolve the IP addresses of the
119 servers they can see on other subnets. This setup is not recommended, but is
120 mentioned as a practical consideration (ie: an 'if all else fails' scenario).
</P
122 >Lastly, take note that browse lists are a collection of unreliable broadcast
123 messages that are repeated at intervals of not more than
15 minutes. This means
124 that it will take time to establish a browse list and it can take up to
45
125 minutes to stabilise, particularly across network segments.
</P
132 NAME=
"AEN385">3.2. Use of the
"Remote Announce" parameter
</H1
134 >The
"remote announce" parameter of smb.conf can be used to forcibly ensure
135 that all the NetBIOS names on a network get announced to a remote network.
136 The syntax of the
"remote announce" parameter is:
138 CLASS=
"PROGRAMLISTING"
139 > remote announce = a.b.c.d [e.f.g.h] ...
</PRE
143 CLASS=
"PROGRAMLISTING"
144 > remote announce = a.b.c.d/WORKGROUP [e.f.g.h/WORKGROUP] ...
</PRE
154 >a.b.c.d and e.f.g.h
</DT
157 >is either the LMB (Local Master Browser) IP address
158 or the broadcst address of the remote network.
159 ie: the LMB is at
192.168.1.10, or the address
160 could be given as
192.168.1.255 where the netmask
161 is assumed to be
24 bits (
255.255.255.0).
162 When the remote announcement is made to the broadcast
163 address of the remote network every host will receive
164 our announcements. This is noisy and therefore
165 undesirable but may be necessary if we do NOT know
166 the IP address of the remote LMB.
</P
172 >is optional and can be either our own workgroup
173 or that of the remote network. If you use the
174 workgroup name of the remote network then our
175 NetBIOS machine names will end up looking like
176 they belong to that workgroup, this may cause
177 name resolution problems and should be avoided.
</P
188 NAME=
"AEN399">3.3. Use of the
"Remote Browse Sync" parameter
</H1
190 >The
"remote browse sync" parameter of smb.conf is used to announce to
191 another LMB that it must synchronise it's NetBIOS name list with our
192 Samba LMB. It works ONLY if the Samba server that has this option is
193 simultaneously the LMB on it's network segment.
</P
195 >The syntax of the
"remote browse sync" parameter is:
197 CLASS=
"PROGRAMLISTING"
198 > remote browse sync = a.b.c.d
</PRE
201 where a.b.c.d is either the IP address of the remote LMB or else is the network broadcast address of the remote segment.
</P
208 NAME=
"AEN404">3.4. Use of WINS
</H1
210 >Use of WINS (either Samba WINS _or_ MS Windows NT Server WINS) is highly
211 recommended. Every NetBIOS machine registers it's name together with a
212 name_type value for each of of several types of service it has available.
213 eg: It registers it's name directly as a unique (the type
0x03) name.
214 It also registers it's name if it is running the lanmanager compatible
215 server service (used to make shares and printers available to other users)
216 by registering the server (the type
0x20) name.
</P
218 >All NetBIOS names are up to
15 characters in length. The name_type variable
219 is added to the end of the name - thus creating a
16 character name. Any
220 name that is shorter than
15 characters is padded with spaces to the
15th
221 character. ie: All NetBIOS names are
16 characters long (including the
222 name_type information).
</P
224 >WINS can store these
16 character names as they get registered. A client
225 that wants to log onto the network can ask the WINS server for a list
226 of all names that have registered the NetLogon service name_type. This saves
227 broadcast traffic and greatly expedites logon processing. Since broadcast
228 name resolution can not be used across network segments this type of
229 information can only be provided via WINS _or_ via statically configured
230 "lmhosts" files that must reside on all clients in the absence of WINS.
</P
232 >WINS also serves the purpose of forcing browse list synchronisation by all
233 LMB's. LMB's must synchronise their browse list with the DMB (domain master
234 browser) and WINS helps the LMB to identify it's DMB. By definition this
235 will work only within a single workgroup. Note that the domain master browser
236 has NOTHING to do with what is referred to as an MS Windows NT Domain. The
237 later is a reference to a security environment while the DMB refers to the
238 master controller for browse list information only.
</P
240 >Use of WINS will work correctly only if EVERY client TCP/IP protocol stack
241 has been configured to use the WINS server/s. Any client that has not been
242 configured to use the WINS server will continue to use only broadcast based
243 name registration so that WINS may NEVER get to know about it. In any case,
244 machines that have not registered with a WINS server will fail name to address
245 lookup attempts by other clients and will therefore cause workstation access
248 >To configure Samba as a WINS server just add
"wins support = yes" to the
249 smb.conf file [globals] section.
</P
251 >To configure Samba to register with a WINS server just add
252 "wins server = a.b.c.d" to your smb.conf file [globals] section.
</P
260 > use both
"wins support = yes" together with
"wins server = a.b.c.d"
261 particularly not using it's own IP address.
</P
268 NAME=
"AEN415">3.5. Do NOT use more than one (
1) protocol on MS Windows machines
</H1
270 >A very common cause of browsing problems results from installing more than
271 one protocol on an MS Windows machine.
</P
273 >Every NetBIOS machine take part in a process of electing the LMB (and DMB)
274 every
15 minutes. A set of election criteria is used to determine the order
275 of precidence for winning this election process. A machine running Samba or
276 Windows NT will be biased so that the most suitable machine will predictably
277 win and thus retain it's role.
</P
279 >The election process is
"fought out" so to speak over every NetBIOS network
280 interface. In the case of a Windows
9x machine that has both TCP/IP and IPX
281 installed and has NetBIOS enabled over both protocols the election will be
282 decided over both protocols. As often happens, if the Windows
9x machine is
283 the only one with both protocols then the LMB may be won on the NetBIOS
284 interface over the IPX protocol. Samba will then lose the LMB role as Windows
285 9x will insist it knows who the LMB is. Samba will then cease to function
286 as an LMB and thus browse list operation on all TCP/IP only machines will
289 >The safest rule of all to follow it this - USE ONLY ONE PROTOCOL!
</P
296 NAME=
"AEN421">3.6. Name Resolution Order
</H1
298 >Resolution of NetBIOS names to IP addresses can take place using a number
299 of methods. The only ones that can provide NetBIOS name_type information
308 >WINS: the best tool!
</TD
312 >LMHOSTS: is static and hard to maintain.
</TD
316 >Broadcast: uses UDP and can not resolve names across remote segments.
</TD
324 >Alternative means of name resolution includes:
332 >/etc/hosts: is static, hard to maintain, and lacks name_type info
</TD
336 >DNS: is a good choice but lacks essential name_type info.
</TD
344 >Many sites want to restrict DNS lookups and want to avoid broadcast name
345 resolution traffic. The
"name resolve order" parameter is of great help here.
346 The syntax of the
"name resolve order" parameter is:
348 CLASS=
"PROGRAMLISTING"
349 > name resolve order = wins lmhosts bcast host
</PRE
353 CLASS=
"PROGRAMLISTING"
354 > name resolve order = wins lmhosts (eliminates bcast and host)
</PRE
358 CLASS=
"PROGRAMLISTING"
359 > name resolve order = host lmhost wins bcast
</PRE
361 where
"host" refers the the native methods used by the Unix system
362 to implement the gethostbyname() function call. This is normally
368 >/etc/nsswitch.conf
</TT
371 >/etc/resolv.conf
</TT
380 SUMMARY=
"Footer navigation table"
391 HREF=
"improved-browsing.html"
400 HREF=
"samba-howto-collection.html"
409 HREF=
"pwencrypt.html"
419 >Improved browsing in samba
</TD
425 HREF=
"introduction.html"
433 >LanMan and NT Password Encryption in Samba
</TD