<?xml version='1.0'?>
<chapter>
<title>Introduction</title>
<para>
There is a suite or family of protocols which includes the NetBIOS Frames 
Protocol, NBF, (often referred to as NetBEUI or sometimes as NetBIOS), the 
Server Message Block protocol, SMB, and Common Internet File System, CIFS. These 
protocols are associated with the original NetBIOS implementation with which 
they have a historical link.
</para>
<para>
Many systems use SMB including Microsoft's Windows for Workgroups, Windows 95 
/ 98 / ME, LAN Manager, Windows NT, Windows 2000 and IBM's OS/2 and LAN Server, 
NetWare 6 and the SAMBA implementation.  SAMBA is freely available for a wide range
of systems and further information can be found at the SAMBA web site.
<ulink url="http://www.samba.org">
<citetitle>http://www.samba.org</citetitle>
</ulink>
</para>
<para>
This document begins by describing 
NetBIOS (Network Basic Input / Output System) also known as 
NetBEUI (NetBIOS Extended User Interface) or NBF (NetBIOS Frames protocol)
in terms of an original
suite of protocols which includes the 
Name Management Protocol (NMP), Diagnostic and Monitoring Protocol (DMP), User 
Datagram Protocol (UDP) and the Session Management Protocol (SMP) that were
used in the original implementation.
</para>
<para>
Following a brief description of supporting technologies such as Ethernet and 
Token Ring, 
encapsulation of these protocols is considered as well as using these protocols 
to encapsulate other protocols.
</para>
<para>
There is no formal standard that defines the protocol(s) used with NetBIOS; 
in practice the IBM 
LAN Technical Reference IEEE 802.2 and NetBIOS Application Program Interface is used as a reference
(see <xref linkend='refs-References'/>).
</para>
<para>
There are many implementations of NetBIOS networking and these 
implementations are generally incompatible. It is because of the diversity and 
lack of a formal standard that makes understanding NetBIOS networking difficult.
</para>
<para>
It is not clear whether there is only one protocol or several protocols 
involved in NetBIOS networking. The original implementation for the PC Network 
certainly seemed to have the above-mentioned protocols (NMP, DMP, UDP and SMP) 
however the distinction is less clear with NetBIOS on Token-Ring and other 
implementations. Given that at least network layer and session layer functions 
are involved, the various packets used will be discussed in terms of the 
original protocols for convenience, even if the distinctions are somewhat 
arbitrary.
</para>
<para>
Following descriptions of the lower level protocols and encapsulation, important higher level
protocols (such as SMB, CIFS and the browser service) that run 
over these lower protocols are described.  The situation with respect to the higher level
protocols is also complicated; the protocols (SMB and CIFS) were developed as proprietary protocols
and information has been difficult to obtain.  Although information has been released from time to time,
it is not always easy to obtain information on the
latest version.  Currently Microsoft continues to develop CIFS for it's range of operating systems.
Teams of developers such as the SAMBA group reverse engineer the technology.  This documentation presents
information that is publicly available.
</para>
<section id='intro-History'>
<title>History</title>
<para>
The NetBIOS interface was developed
for International Business Machines Corporation (IBM) in 1983
by Sytec Inc. (which became Hughes LAN Systems,
then Whittaker Communications).
This operated 
over proprietary Sytec protocols on IBM's PC Network which is a broadband local 
area network. The broadband PC Network is a bus-attached LAN, which can 
accommodate up to 72 connecting devices. The baseband PC Network is also a 
bus-attached LAN which can accommodate up to 80 connecting devices; <emphasis>It is 
important to note the scale of LAN which NetBIOS was designed for.</emphasis> NetBIOS 
was not designed for large networks.
</para>
<para>
When IBM announced the Token-Ring, an emulator for NetBIOS was produced 
allowing applications developed for the PC Network to operate on Token-Ring. The 
NetBIOS Extended User Interface (NetBEUI) was introduced in 1985. The Token-Ring 
network can accommodate up to 260 devices on one ring and multiple rings can be 
connected by Bridges.
</para>
<para>
In 1986 Novell released Advanced NetWare version 2.0. With version 2.0 and 
all subsequent packages a NetBIOS interface has been included;  Novell
implemented NetBIOS encapsulated in IPX/SPX.  Later Microsoft reverse-
engineered the technology to provide encapsulation of NetBIOS in IPX/SPX that
is compatible with the Novell implementation.
</para>
<para>
With the Personal System /2 computer (PS/2) in 1987, IBM announced the PC LAN 
Support Program which included a NetBIOS driver.
</para>
<para>
In March 1987, RFC 1001 was published which described a "Protocol Standard 
for a NetBIOS Service on a TCP/UDP Transport". 
</para>
<para>
Prior to the IBM Lan Support Program, versions of NetBIOS were named with 
version numbers 1.X. With the LAN Support Program the following NetBIOS versions 
were used: 
</para>
<table frame='all'>
<title>
LAN Support Program versions compared with NetBIOS versions
</title>
<tgroup cols='2'>
<thead>
<row>
<entry>LAN Support Program version</entry>
<entry>NetBIOS version</entry>
</row>
</thead>
<tbody>
<row>
<entry>1.00</entry>
<entry>2.0</entry>
</row>
<row>
<entry>1.01</entry>
<entry>2.1</entry>
</row>
<row>
<entry>1.02</entry>
<entry>2.2</entry>
</row>
</tbody>
</tgroup>
</table>
<para>
Version 2.x of NetBIOS has been superseded by NetBIOS version 3.0 and version 
4.0.
</para>
<para>
In 1987 Microsoft announced the LAN Manager which runs natively over NetBIOS 
frames. 
</para>
<para>
Microsoft and Intel introduced the SMB Core Protocol in 1988 (SMB-CORE.PS).
SMB has been developed during subsequent years and is widely used be many systems.
The protocol began life as a proprietary protocol and documentation was very
difficult to find.  A Version of the protocol (version 2) was published by the 
Open Group X/Open 1992.  However since that time subsequent versions have been developed
by Microsoft which re-named the protocol 
<quote>Common Internet File System</quote> (CIFS).
</para>
<para>
The history of SMB and CIFS is further discussed in:
<xref linkend='smb-history'/>
</para>
</section>
<section>
<title>Overview</title>
<para>
The protocols considered here are mainly proprietary and documentation is 
often poor and hard to find.  A high level view is presented here that 
attempts to describe how the protocols relate to each other.
</para>
<para>
The original NetBIOS protocol was developed to become the NetBIOS Frames
Protocol (NFB) often referred to as NetBEUI or just NetBIOS.  This protocol
is still used today, but is not popular because it is not routable or
scalable.  NBF or NetBEUI provides a datagram delivery and session service
that can be used for a variety of network applications.
</para>
<para>
The above protocol is often encapsulated in other (routable) protocols such as
IPX/SPX (which Microsoft refers to as NBIPX) or TCP/IP (which Microsoft refers
to as NBT).  The use of NetBIOS over TCP/IP is still one of the most popular
network protocol configurations.
</para>
<para>
Although NBF (either in encapsulated form or "on the wire") can be used for
a variety of applications it is often used as a foundation for the Server
Message Block (SMB) protocol.  One of the most widely used network
configurations is SMB running over NetBIOS over TCP/IP.
</para>
<para>
SMB has been developed to become the Common Internet File System (CIFS).
Recently CIFS has been implemented directly on TCP/IP without requiring
the NetBIOS over TCP/IP layer.
</para>
<para>
The relationship between the various protocols
with respect to the OSI model
is illustrated in:
<xref linkend='osi-OSI'/>
</para>
</section>
<section id='intro-Implementation'>
<title>Implementation</title>
<para>
NetBIOS is often described as a "Session Layer" protocol and a variety of 
transport systems have been used in different implementations. Some of these 
implementations are described in
<xref linkend='encap-encap'/>
. The protocols used to encapsulate NetBIOS are generally well understood 
and well documented; what is often not well understood are implementations of 
NetBIOS "on the wire" in a "raw" un-encapsulated form.
</para>
<para>
Two implementations of NetBIOS "on the wire" are considered here: The 
original NetBIOS in IBM PC Networks (See
<xref linkend='nbibmpc-CompIBMpc'/>
) 
and NetBIOS Frames 
Protocol on 802.2 networks. Although the IBM PC Network version was developed 
first, the current NetBIOS Frames Protocol on 802.2 networks is emphasized in 
this document as being the more relevant.
</para>
<para>
It should be noted that the frames in NetBIOS in IBM PC Networks are more 
complex and seem less consistent than frames in the NetBIOS Frames Protocol on 
802.2 networks. The IBM PC Networks implementation separates in to the protocols 
mentioned above, where as all the frames in NetBIOS Frames Protocol on 802.2 
networks are more consistent in their format. 
</para>
</section>
<section id='Terminology'>
<title>Terminology</title>
<para>
Because of the history of the protocols being discussed here
(See 
<xref linkend='intro-History'/>
)
and 
lack of standards, there is often confusion in the use of some of the terms; it 
is not uncommon to hear statements of the form "NetBIOS is not a protocol" or 
"NetBEUI is a protocol".
<variablelist>
<varlistentry>
<term>NetBIOS is not a protocol</term>
<listitem>
<para>
As described in the history above, NetBIOS was designed as an interface. 
NetBIOS was designed to be an extension to the BIOS (Basic Input/Output System)
of PCs
to provide networking 
services. At the risk of being pedantic, NetBIOS was designed as an 
application programming interface (API). It is interesting (and the source of 
some confusion) that it was the API which was the standard.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>NetBIOS is a protocol</term>
<listitem>
<para>
The term "protocol" is often used as a shorthand reference to a suite of 
protocols (a well-known example is the use of the term "TCP/IP protocol" to 
refer to a collection of protocols). The informal use of the term "protocol" 
is well-understood and accepted practice. It has become standard practice to 
use the term "NetBIOS protocol" to refer to the original set of protocols in 
use with the NetBIOS API and the protocols which followed. The current 
official term used by IBM is "NetBIOS Frames Protocol" (NBF) and it is not 
unreasonable to shorten this to "NetBIOS".
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>NetBEUI is not a protocol</term>
<listitem>
<para>
If NetBIOS is not a protocol, but is an API, then an "Extended User 
Interface" to this API is also not a protocol. As mentioned above, and 
described in the history, when IBM developed Token Ring it was continuity of 
the API to ensure applications would continue to function which was important. 
The NetBIOS API was preserved and extended in the NetBIOS Extended user 
Interface, NetBEUI.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>NetBEUI is a protocol</term>
<listitem>
<para>
With the development of NetBEUI, a set of protocols was developed, now known 
as the NetBIOS Frames Protocol. Since the NetBIOS Frames Protocol was used 
with the NetBEUI API it became accepted practice to refer to these protocols 
as the "NetBEUI protocol". It is still common to find documentation which 
refers to the "NetBEUI protocol".
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
</chapter>
