Chapter 5: Configuring and using NetBIOS
Table of contents
Chapter 5
Configuring and using NetBIOS
The NetBIOS interface allows applications (such as LAN Manager) to send messages over
different transports.
The NetBIOS that is provided with SCO products is mainly for use with
TCP/IP, so configuration queries are designed to reflect this.
Internal tables keep track of NetBIOS sessions. You can configure the
maximum and default number of sessions available.
Configure NetBIOS with
the Network Configuration Manager as described in
``Configuring protocols'' in Configuring Network Connections.
When you do, you configure:
-
The local host name, IP address, and broadcast address
used by NetBIOS.
-
The NetBIOS scope identifier, described later in this chapter.
-
A number of per-user variables, such as the number
of default sessions, maximum names, and maximum commands.
-
The maximum IP datagram size handled by NetBIOS.
Configuration considerations over TCP/IP
NetBIOS has special considerations when running with TCP/IP as
described in the following sections.
For example, the format of the /etc/hosts file can vary from one
vendor's TCP/IP to another. If you modify
this file, be sure to follow the correct format of that
machine. The way broadcast messages are handled can also vary
from one vendor's TCP/IP to another. Investigate any differences
among the various versions of TCP/IP on your network and the
methods for resolving
those differences. Finally, be sure that
the NetBIOS scope identifier has the same value on all the
computers running NetBIOS and TCP/IP on the same network.
Verifying broadcasts
Broadcasts allow TCP/IP to send certain types of messages, such
as alerts, to a wide audience on a LAN.
NetBIOS uses broadcasts for tasks such as name registration.
The following steps will help ensure that broadcasting is working
correctly, with the assumption that TCP/IP and NetBIOS are running on
both the local and remote machines. It should be possible to run the
local form of the nbstatus command on the local client
machine, and also on the remote machine if the nbstatus
command is available on that machine. The nbstatus command
with no arguments should return NetBIOS status information if NetBIOS is
running on the local machine.
-
Verify that the network and subnet portions of the IP
address are the same on all computers. Broadcasts do not repeat
across networks or subnets, so the network and subnet addresses must
be identical. The configuration of IP addresses varies
according to the specific implementation of TCP/IP. In SCO TCP/IP,
the local IP address is configured on the ifconfig
command line in the /etc/tcp file. You must reboot the
machine so that the changes made to /etc/tcp file take
effect. To configure the IP address in another
implementation of TCP/IP, refer to the documentation for that
implementation.
-
Verify that all computers on the network agree on either all ``0''s or
all ``1''s for the broadcast address. Using all ``1''s is recommended.
In SCO TCP/IP, the broadcast
address is specified on the ifconfig command line in the
/etc/tcp file by using 255 for each byte of the host portion
of the IP address. For example:
ifconfig net0 10.0.118.1 broadcast 10.0.118.255 netmask 255.255.255.0
The network portion of the address in the preceding example is 10.0.118,
and the host portion is set to all ``1''s by appending 255 to the network
portion. If you change the /etc/tcp file, you must reboot
before the changes take effect.
-
Verify that all computers agree on the broadcast address relative to
the subnet mask. Some implementations of TCP/IP ignore the subnet
portion of class C IP addresses. If this
is a problem, replace the subnet number with the broadcast number when
defining the broadcast address. Using the same example as in step 2,
where the subnet portion is 118, the broadcast address would be
configured as follows:
ifconfig e3A0 10.0.118.1 broadcast 10.0.255.255 netmask 255.255.255.0
If you change the broadcast address, reboot the machine to have the
changes take effect.
-
Verify that NetBIOS is working by using the form of the
nbstatus command that requests status
from a remote
computer. For example, to verify
that NetBIOS is working on the machine on your network named
fred, enter the command
nbstatus FRED
Note that the computer name is specified in all uppercase letters. If
NetBIOS is functioning between the two machines, a list of information
about the remote computer will be displayed. If an error is returned,
this indicates that NetBIOS is not working, either because
there is still a TCP/IP broadcast incompatibility, or because different
NetBIOS scope identifiers are being used.
Note that it is sometimes possible for the remote form
of the nbstatus command to return an error under normal
circumstances. Some implementations of NetBIOS do not accept the remote
adapter status NCB(Network Control Block);
also, if the remote machine
is a LAN Manager for UNIX Systems client, and there currently are no
sessions between the client and a server, then NetBIOS status is not
returned.
Setting the scope identifier
The NetBIOS scope identifier is a string of characters used when
network applications
communicate using NetBIOS over TCP/IP. The NetBIOS scope identifier must
be the same for all computers on a NetBIOS network using TCP/IP as
the transport. If you have different scope identifiers on your
computers, NetBIOS assumes they are part of a different logical network,
and cannot connect to them.
You set the scope identifier when using the Network Configuration
Manager to configure NetBIOS.
Before setting it, check its value
on the other machines in the network. If you
have MS-DOS or OS/2 workstations on the network,
the NetBIOS scope identifier should be set to NULL on all
machines on the network. Many implementations of NetBIOS for TCP/IP
allow you to use only
the NULL scope identifier.
If you have any other LAN Manager-compatible machines on the
network, check their documentation for restrictions.
The scope identifier's setting depends on the implementation of TCP/IP.
SCO TCP/IP sets the scope identifier with the NB_SCOPE
parameter in the file /etc/default/nbconf. A typical example of
the scope identifier's syntax would be:
NB_SCOPE=""
Viewing NetBIOS status
The nbstatus
command provides NetBIOS status. For example, it can rreport the
status from LAN Manager client or from
a remote LAN Manager server. LAN Manager client must be started and have at least
one connection to a server before NetBIOS status can be obtained.
The output from nbstatus resembles the following display:
Adapter status for adaptor 0, name *:
ID: 08 00 14 51 62 09 (655364) Jumpers 0 Selftest 0 Version 1.0
Time up 5:51
Packets sent: 2176 CRC errors: 0
Packets received: 99060 Alignment errors: 0
Retransmitted packets: 0 Collisions: 0
Resources exhausted: 0 Aborted transmissions: 0
Ncbs: Free : 45 of 48; maximum configurable: 48
Sessions: In use: 2 of 48; maximum configurable: 48
Adapter packet size: 2048
Local name table (2 names):
Name Soc Num Status
KIWI x00 3 0x4
Session status for adaptor 0, name *:
name num 255, # sessions 3, rcv dg=1, rcv any=0
LSN State Local Name Soc Remote Name Soc rcvs sends
1 ESTAB KIWI x00 CHERRY x20 0 0
2 ESTAB kiwi x73 cherry x73 1 0
The information in the first part of the display shows NetBIOS activity
and gives information useful for troubleshooting at the NetBIOS level.
If there is noise on the line, for example, NetBIOS may have several
aborted transmissions or retransmitted packets. Additional
information appears if the client is active.
The next item, the local name table, shows the names that have
been added to NetBIOS. The fields are as follows:
- Name
-
Name in use
- Soc
-
Numeric value of the 16th character of the name. By convention,
uppercase names are used in the SMB filesharing protocol,
and lowercase names are used by other LAN Manager utilities. The
significance of the Soc field is defined by the NetBIOS application.
The SMB protocol uses this field to indicate a particular
service or function. For example, the LAN Manager client uses the machine name in
uppercase with a Soc value of 0x00 (ASCII code for the null
character) to connect to the remote filesharing server.
- Num
-
Number assigned to the name by NetBIOS when
the name was added to the table.
- Status
-
Status of the name that NetBIOS has added or is adding to
the name table.
Valid numbers have the following definitions:
- 0x0
-
NetBIOS is trying to register a name in the local name table
- 0x4
-
NetBIOS has successfully registered this name in the local
name table
- 0x5
-
NetBIOS has de-registered this name from the local name
table
- 0x6
-
NetBIOS has detected a duplicate name in the local name
table
- 0x7
-
NetBIOS has detected a duplicate name with de-register
pending
- 0x84
-
name is a group name
The last item in the nbstatus output is the session status
table. The header of this section shows the number of session table
entries used, including NetBIOS LISTENs, and the number of
RECEIVE DATAGRAMS and RECEIVE ANY NCBs that
are posted to the NetBIOS. The session status table shows the
following information:
- LSN
-
NetBIOS local session number (LSN) for the session
- State
-
state of the session. Possible states are:
- LISTEN
-
Waiting for a connection
- CALL
-
Attempting to connect
- ESTAB
-
An established connection
- CLOSING
-
Connection is in the process of closing
- CLOSED
-
Connection is closed
- ABORT
-
Connection has been aborted
- Local Name
-
Local name associated with the session
- Soc
-
Numeric value of the 16th character of the name
- Remote Name
-
Server name associated with the session
- Soc
-
Numeric value of the 16th character of the server name
- rcvs
-
Number of RECEIVE NCBs outstanding on the session
- sends
-
Number of SEND NCBs outstanding on the session
The nbstatus display indicates how many NCBs
NetBIOS is using. The following line, for
example, shows that three NCBs are in use:
Ncbs: Free : 45 of 48; maximum configurable: 48
To verify this number, look at the session status table. There are
one RECEIVE DATAGRAM (rcv dg=1) NCB in use, one
RECEIVE NCB pending in the rcvs column, and one
NCB taken by the nbstatus command itself.
To obtain adapter status from remote machines, you can use the
nbstatus MACHINE command.
MACHINE is
the name of the remote machine in all uppercase letters.
For more information on using nbstatus, see
``Viewing NetBIOS status''
and
nbstatus(LMC).