1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�1.�Definition of NetBIOS Protocol and Name Resolution Modes</title><link rel="stylesheet" href="samba.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="SAMBA Developers Guide"><link rel="up" href="pt01.html" title="Part�I.�The protocol"><link rel="prev" href="pt01.html" title="Part�I.�The protocol"><link rel="next" href="unix-smb.html" title="Chapter�2.�NetBIOS in a Unix World"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�1.�Definition of NetBIOS Protocol and Name Resolution Modes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pt01.html">Prev</a>�</td><th width="60%" align="center">Part�I.�The protocol</th><td width="20%" align="right">�<a accesskey="n" href="unix-smb.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="netbios"></a>Chapter�1.�Definition of NetBIOS Protocol and Name Resolution Modes</h2></div><div><div class="author"><h3 class="author"><span class="firstname">Luke</span> <span class="surname">Leighton</span></h3></div></div><div><p class="pubdate">12 June 1997</p></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="netbios.html#id2464924">NETBIOS</a></span></dt><dt><span class="sect1"><a href="netbios.html#id2463685">BROADCAST NetBIOS</a></span></dt><dt><span class="sect1"><a href="netbios.html#id2463711">NBNS NetBIOS</a></span></dt></dl></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2464924"></a>NETBIOS</h2></div></div></div><p> 2NetBIOS runs over the following transports: TCP/IP; NetBEUI and IPX/SPX. 3Samba only uses NetBIOS over TCP/IP. For details on the TCP/IP NetBIOS 4Session Service NetBIOS Datagram Service, and NetBIOS Names, see 5rfc1001.txt and rfc1002.txt. 6</p><p> 7NetBEUI is a raw NetBIOS frame protocol implementation that allows NetBIOS 8datagrams to be sent out over the 'wire' embedded within LLC frames. 9NetBEUI is not required when using NetBIOS over TCP/IP protocols and it 10is preferable NOT to install NetBEUI if it can be avoided. 11</p><p> 12IPX/SPX is also not required when using NetBIOS over TCP/IP, and it is 13preferable NOT to install the IPX/SPX transport unless you are using Novell 14servers. At the very least, it is recommended that you do not install 15'NetBIOS over IPX/SPX'. 16</p><p> 17[When installing Windows 95, you will find that NetBEUI and IPX/SPX are 18installed as the default protocols. This is because they are the simplest 19to manage: no Windows 95 user-configuration is required]. 20</p><p> 21NetBIOS applications (such as samba) offer their services (for example, 22SMB file and print sharing) on a NetBIOS name. They must claim this name 23on the network before doing so. The NetBIOS session service will then 24accept connections on the application's behalf (on the NetBIOS name 25claimed by the application). A NetBIOS session between the application 26and the client can then commence. 27</p><p> 28NetBIOS names consist of 15 characters plus a 'type' character. This is 29similar, in concept, to an IP address and a TCP port number, respectively. 30A NetBIOS-aware application on a host will offer different services under 31different NetBIOS name types, just as a host will offer different TCP/IP 32services on different port numbers. 33</p><p> 34NetBIOS names must be claimed on a network, and must be defended. The use 35of NetBIOS names is most suitable on a single subnet; a Local Area Network 36or a Wide Area Network. 37</p><p> 38NetBIOS names are either UNIQUE or GROUP. Only one application can claim a 39UNIQUE NetBIOS name on a network. 40</p><p> 41There are two kinds of NetBIOS Name resolution: Broadcast and Point-to-Point. 42</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2463685"></a>BROADCAST NetBIOS</h2></div></div></div><p> 43Clients can claim names, and therefore offer services on successfully claimed 44names, on their broadcast-isolated subnet. One way to get NetBIOS services 45(such as browsing: see ftp.microsoft.com/drg/developr/CIFS/browdiff.txt; and 46SMB file/print sharing: see cifs4.txt) working on a LAN or WAN is to make 47your routers forward all broadcast packets from TCP/IP ports 137, 138 and 139. 48</p><p> 49This, however, is not recommended. If you have a large LAN or WAN, you will 50find that some of your hosts spend 95 percent of their time dealing with 51broadcast traffic. [If you have IPX/SPX on your LAN or WAN, you will find 52that this is already happening: a packet analyzer will show, roughly 53every twelve minutes, great swathes of broadcast traffic!]. 54</p></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2463711"></a>NBNS NetBIOS</h2></div></div></div><p> 55rfc1001.txt describes, amongst other things, the implementation and use 56of, a 'NetBIOS Name Service'. NT/AS offers 'Windows Internet Name Service' 57which is fully rfc1001/2 compliant, but has had to take specific action 58with certain NetBIOS names in order to make it useful. (for example, it 59deals with the registration of <1c> <1d> <1e> names all in different ways. 60I recommend the reading of the Microsoft WINS Server Help files for full 61details). 62</p><p> 63The use of a WINS server cuts down on broadcast network traffic for 64NetBIOS name resolution. It has the effect of pulling all the broadcast 65isolated subnets together into a single NetBIOS scope, across your LAN 66or WAN, while avoiding the use of TCP/IP broadcast packets. 67</p><p> 68When you have a WINS server on your LAN, WINS clients will be able to 69contact the WINS server to resolve NetBIOS names. Note that only those 70WINS clients that have registered with the same WINS server will be 71visible. The WINS server _can_ have static NetBIOS entries added to its 72database (usually for security reasons you might want to consider putting 73your domain controllers or other important servers as static entries, 74but you should not rely on this as your sole means of security), but for 75the most part, NetBIOS names are registered dynamically. 76</p><p> 77This provides some confusion for lots of people, and is worth mentioning 78here: a Browse Server is NOT a WINS Server, even if these services are 79implemented in the same application. A Browse Server _needs_ a WINS server 80because a Browse Server is a WINS client, which is _not_ the same thing]. 81</p><p> 82Clients can claim names, and therefore offer services on successfully claimed 83names, on their broadcast-isolated subnet. One way to get NetBIOS services 84(such as browsing: see ftp.microsoft.com/drg/developr/CIFS/browdiff.txt; and 85SMB file/print sharing: see cifs6.txt) working on a LAN or WAN is to make 86your routers forward all broadcast packets from TCP/IP ports 137, 138 and 139. 87You will find, however, if you do this on a large LAN or a WAN, that your 88network is completely swamped by NetBIOS and browsing packets, which is why 89WINS was developed to minimise the necessity of broadcast traffic. 90</p><p> 91WINS Clients therefore claim names from the WINS server. If the WINS 92server allows them to register a name, the client's NetBIOS session service 93can then offer services on this name. Other WINS clients will then 94contact the WINS server to resolve a NetBIOS name. 95</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pt01.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="pt01.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="unix-smb.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Part�I.�The protocol�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Chapter�2.�NetBIOS in a Unix World</td></tr></table></div></body></html> 96