Encapsulation in various protocols and encapsulating
Introduction
NetBIOS is often described as a "Session Layer" protocol and a variety of
transport systems have been used in different implementations. Particularly
because NetBIOS is a non-routable protocol, it has often been implemented using
other routable protocols to provide the transport.
It has traditionally been the NetBIOS API that has been the "standard". In
most implementations (certainly NetBIOS over TCP/IP and NetBIOS over IPX),
encapsulation has been implemented to ensure that higher level protocols (such
as SMB) can run over the encapsulated protocol in the same way as they would run
over NetBIOS Frames Protocol, NBF (otherwise known as NetBEUI or NetBIOS). Thus
it is important to understand the NetBIOS Frames Protocol, NBF in order to
understand the various encapsulation implementations.
IPX/SPX
IPX/SPX are the protocols native to Novell NetWare. Details of these
protocols can be found in:
Novell's Guide to NetWare LAN Analysis, see
Novell introduced an implementation of NetBIOS over IPX in 1986. The
implementation uses IPX datagrams to carry the NetBIOS Frames protocol described
above.
The IPX addressing scheme is compared with the native NetBIOS and other
schemes in
above. In IPX/SPX networks, a 48 bit address (usually a MAC
address) identifies a node on a network and a 32 bit address identifies each
network. Thus IPX is a routable protocol requiring relatively little
administration, which makes it a useful means of implementing NetBIOS.
IPX packets are broadly analogous to IP packets in the TCP/IP suite of
protocols; IPX packets provide an unreliable datagram delivery service. The
structure of the IPX Header is given below for reference:
The IPX Header
Checksum (2 bytes)
Length (2 bytes)
Transport Control (1 byte)
Packet Type (1 byte) 0 or 4 for IPX, 5 for SPX, 17 (0x11) for NCP, 20
(0x14) WAN broadcast
Destination Node Address (6 bytes)
Destination Network Address (4 bytes)
Destination Socket (2 bytes)
Source Node Address (6 bytes)
Source Network Address (4 bytes)
source Socket ( 2 bytes)
The Destination Socket indicates the service being carried over IPX, some
examples and the identifier for NetBIOS are given below:
0x451
NetWare Core Protocol (NCP)
0x452
Service Advertising Protocol packet (SAP)
0x453
Routing Information Protocol packet (RIP)
0x455
NetBIOS packet
0x456
Diagnostic packet
0x457
Serialization packet
0x4000 to 0x8000
Dynamically assigned for use with file servers etc.
Microsoft Implementation of NetBIOS over IPX
Microsoft have implemented NetBIOS over the NWLink IPX/SPX compatible
transport. (NWLink is a clone of Novell's IPX/SPX). The Microsoft implementation
is compatible with Novell's NetBIOS over IPX. Microsoft sometimes refers to
NetBIOS over IPX as NBIPX.
IPX packets (Octets in order transmitted.)
Length
IPX Field
NBIPX
2
Checksum
2
Length
1
Transport Control
1
Packet Type 0 or 4 for IPX, 20 (0x14)
WAN broadcast
6
Destination Node Address
4
Destination Network Address
2
Destination Socket
6
Source Node Address
4
Source Network Address
2
source Socket
n
Data
NBIXP packet
NBIPX session packets (Octets in order transmitted.)
Length
Field
1
NBIPX Connection Control flag
1
Data Stream type
2
Source connection id
2
Destination connection id
2
Send Sequence number
2
Total data length
2
Offset
2
Data length
2
Receive Sequence number
2
Bytes received
n
Data
NetBIOS Interface and Name Service Support by Lower Layer OSI Protocols
The MAP/TOP Users Group Technical Report Specification of NetBIOS Interface
and Name Service Support by Lower Layer OSI Protocols, Version 1.0, September
27, 1989, is reproduced as an appendix in The Open Group CAE Specification
"Protocols for X/Open PC Interworking: SMB, Version 2."
International Standards Organization (ISO) Protocol Suite
Communications Machinery Corporation has implemented a NetBIOS interface for
ISO protocols.
"Netbios for ISO Networks", see
PPP (Point-to-Point Protocol)
NetBIOS can be carried over PPP (Point-to-Point Protocol). The relevant
RFCs are:
RFC 2097
The PPP NetBIOS Frames Control Protocol (NBFCP)
PROPOSED STANDARD
RFC1661 STD0051
The Point-to-Point Protocol (PPP)STANDARD
RFC 2153
PPP Vendor Extensions INFORMATIONAL
Encapsulating
NetBIOS can be used to encapsulate other protocols by providing
a virtual circuit over which other protocols can be transmitted.
This is the opposite situation to those described above where other
protocols provide the transport for NetBIOS.
Transmission of IP Datagrams over NetBIOS Networks
A standard method of encapsulating the Internet Protocol (IP)
datagrams on NetBIOS networks is described in:
RFC 1088
A Standard for the Transmission of IP
Datagrams over NetBIOS Networks