Use entities and add overview of directories
[kai/samba.git] / docs / docbook / devdoc / NetBIOS.sgml
1 <chapter id="netbios">
2 <chapterinfo>
3         <author>
4                 <firstname>Luke</firstname><surname>Leighton</surname>
5         </author>
6         <pubdate>12 June 1997</pubdate>
7 </chapterinfo>
8
9 <title>Definition of NetBIOS Protocol and Name Resolution Modes</title>
10
11 <sect1>
12 <title>NETBIOS</title>
13
14 <para>
15 NetBIOS runs over the following tranports: TCP/IP; NetBEUI and IPX/SPX.
16 Samba only uses NetBIOS over TCP/IP.  For details on the TCP/IP NetBIOS 
17 Session Service NetBIOS Datagram Service, and NetBIOS Names, see
18 rfc1001.txt and rfc1002.txt.
19 </para>
20
21 <para> 
22 NetBEUI is a raw NetBIOS frame protocol implementation that allows NetBIOS
23 datagrams to be sent out over the 'wire' embedded within LLC frames.
24 NetBEUI is not required when using NetBIOS over TCP/IP protocols and it
25 is preferable NOT to install NetBEUI if it can be avoided.
26 </para>
27
28 <para> 
29 IPX/SPX is also not required when using NetBIOS over TCP/IP, and it is
30 preferable NOT to install the IPX/SPX transport unless you are using Novell
31 servers.  At the very least, it is recommended that you do not install
32 'NetBIOS over IPX/SPX'.
33 </para>
34
35 <para>
36 [When installing Windows 95, you will find that NetBEUI and IPX/SPX are
37 installed as the default protocols.  This is because they are the simplest
38 to manage: no Windows 95 user-configuration is required].
39 </para>
40
41 <para> 
42 NetBIOS applications (such as samba) offer their services (for example,
43 SMB file and print sharing) on a NetBIOS name.  They must claim this name
44 on the network before doing so.  The NetBIOS session service will then
45 accept connections on the application's behalf (on the NetBIOS name
46 claimed by the application).  A NetBIOS session between the application
47 and the client can then commence.
48 </para>
49
50 <para> 
51 NetBIOS names consist of 15 characters plus a 'type' character.  This is
52 similar, in concept, to an IP address and a TCP port number, respectively.
53 A NetBIOS-aware application on a host will offer different services under
54 different NetBIOS name types, just as a host will offer different TCP/IP
55 services on different port numbers.
56 </para>
57
58 <para> 
59 NetBIOS names must be claimed on a network, and must be defended.  The use
60 of NetBIOS names is most suitable on a single subnet; a Local Area Network
61 or a Wide Area Network.
62 </para>
63
64 <para> 
65 NetBIOS names are either UNIQUE or GROUP.  Only one application can claim a
66 UNIQUE NetBIOS name on a network.
67 </para>
68
69 <para>
70 There are two kinds of NetBIOS Name resolution: Broadcast and Point-to-Point.
71 </para>
72
73 </sect1>
74
75 <sect1>
76 <title>BROADCAST NetBIOS</title>
77
78 <para> 
79 Clients can claim names, and therefore offer services on successfully claimed
80 names, on their broadcast-isolated subnet.  One way to get NetBIOS services
81 (such as browsing: see ftp.microsoft.com/drg/developr/CIFS/browdiff.txt; and
82 SMB file/print sharing: see cifs4.txt) working on a LAN or WAN is to make
83 your routers forward all broadcast packets from TCP/IP ports 137, 138 and 139.
84 </para>
85
86 <para> 
87 This, however, is not recommended.  If you have a large LAN or WAN, you will
88 find that some of your hosts spend 95 percent of their time dealing with
89 broadcast traffic.  [If you have IPX/SPX on your LAN or WAN, you will find
90 that this is already happening: a packet analyzer will show, roughly
91 every twelve minutes, great swathes of broadcast traffic!].
92 </para>
93
94 </sect1>
95
96 <sect1>
97 <title>NBNS NetBIOS</title>
98
99 <para>
100 rfc1001.txt describes, amongst other things, the implementation and use
101 of, a 'NetBIOS Name Service'.  NT/AS offers 'Windows Internet Name Service'
102 which is fully rfc1001/2 compliant, but has had to take specific action
103 with certain NetBIOS names in order to make it useful.  (for example, it
104 deals with the registration of &lt;1c&gt; &lt;1d&gt; &lt;1e&gt; names all in different ways.
105 I recommend the reading of the Microsoft WINS Server Help files for full
106 details).
107 </para>
108
109 <para> 
110 The use of a WINS server cuts down on broadcast network traffic for
111 NetBIOS name resolution.  It has the effect of pulling all the broadcast
112 isolated subnets together into a single NetBIOS scope, across your LAN
113 or WAN, while avoiding the use of TCP/IP broadcast packets.
114 </para>
115
116 <para>
117 When you have a WINS server on your LAN, WINS clients will be able to
118 contact the WINS server to resolve NetBIOS names.  Note that only those
119 WINS clients that have registered with the same WINS server will be
120 visible.  The WINS server _can_ have static NetBIOS entries added to its
121 database (usually for security reasons you might want to consider putting
122 your domain controllers or other important servers as static entries,
123 but you should not rely on this as your sole means of security), but for
124 the most part, NetBIOS names are registered dynamically.
125 </para>
126
127 <para>
128 This provides some confusion for lots of people, and is worth mentioning
129 here:  a Browse Server is NOT a WINS Server, even if these services are
130 implemented in the same application.  A Browse Server _needs_ a WINS server
131 because a Browse Server is a WINS client, which is _not_ the same thing].
132 </para>
133
134 <para>
135 Clients can claim names, and therefore offer services on successfully claimed
136 names, on their broadcast-isolated subnet.  One way to get NetBIOS services
137 (such as browsing: see ftp.microsoft.com/drg/developr/CIFS/browdiff.txt; and
138 SMB file/print sharing: see cifs6.txt) working on a LAN or WAN is to make
139 your routers forward all broadcast packets from TCP/IP ports 137, 138 and 139.
140 You will find, however, if you do this on a large LAN or a WAN, that your
141 network is completely swamped by NetBIOS and browsing packets, which is why
142 WINS was developed to minimise the necessity of broadcast traffic.
143 </para>
144
145 <para> 
146 WINS Clients therefore claim names from the WINS server.  If the WINS
147 server allows them to register a name, the client's NetBIOS session service
148 can then offer services on this name.  Other WINS clients will then
149 contact the WINS server to resolve a NetBIOS name.
150 </para>
151
152 </sect1>
153
154 </chapter>