NetBIOS, NetBEUI, NetBIOS Frames Protocol

Overview

The use of NetBIOS, (otherwise known as NetBEUI, NetBIOS Frames Protocol, NBF) is not a popular choice. Many networks use some form of encapsulation with the most popular being TCP/IP. It is important to understand that the various encapsulation implementations are designed to emulate the use of NetBIOS "on the wire"; the goal is to allow higher level protocols (such as SMB or CIFS) or applications to make use of the NetBIOS protocol irrespective of whether it is running "on the wire" or encapsulated. Thus in order to fully understand implementations that use encapsulation, it is necessary to understand "NetBIOS on the wire".

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 following protocols: Name Management protocol (NMP), Diagnostic and Monitoring Protocol (DMP), User Datagram Protocol (UDP) and Session Management Protocol (SMP). The distinction is less clear with NetBIOS on Token-Ring and other Implementations; the official IBM documentation [IBM LAN Technical Reference IEEE 802.2 and NetBIOS Application Program Interfaces ] simply describes a collection of 22 frame formats, see Table 1 . 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.

Table 1. NBF Frames

Frame name Command code
ADD_NAME_QUERY 0x01
ADD_GROUP_NAME 0x00
ADD_NAME_RESPONSE 0x0D
NAME_IN_CONFLICT 0x02
NAME_QUERY 0x0A
NAME_RECOGNISED 0x0E
DATAGRAM 0x08
DATAGRAM_BROADCAST 0x09
STATUS_QUERY 0x03
STATUS_RESPONSE 0x0F
TERMINATE_TRACE 0x07
TERMINATE_TRACE local and remote 0x13
SESSION_ALIVE 0x1F
SESSION_CONFIRM 0x17
SESSION_END 0x18
SESSION_INITIALIZE 0x19
DATA_ACK 0x14
DATA_FIRST_MIDDLE 0x15
DATA_ONLY_LAST 0x16
NO_RECEIVE 0x1A
RECEIVE_OUTSTANDING 0x1B
RECEIVE_CONTINUE 0x1C

NetBIOS systems communicate in one of two manners; the protocols are often described as Session layer protocols because most of the communications occur over sessions established between two nodes on the network. The other form of communication does not involve sessions and uses a simple datagram transmission mechanism for simple communications between systems on a network. Non-session frames are used for functions such as name management or other functions that simply require a datagram delivery service. In general when one system needs to communicate with another it will contact that system and a session will be established between the two nodes; the session will be maintained as long as either node needs to communicate until one of the nodes closes the session.

Sessions are established using an exchange of packets. The station wishing to establish the session sends an Open request that should be responded to with an Open acknowledgment. The station initiating the session will then send a Session request which will elicit either a Session accept or Session reject.

Data is transmitted using an established session through the sending system sending data packets which are responded to with either acknowledgment packets (ACK) or negative acknowledgment packets (NACK) prompting re-transmission.

Sessions are closed by the system that received data sending a close request that should be responded to by the system that initiated the session sending a close response. This is followed by the system that received data sending a packet indicating that the session is closed.

Obviously in order to communicate, systems need an address scheme and this is described in the section called Addressing - NetBIOS names.