HOW TO GET QNX 4 NETWORKING TO FUNCTION


INDEPENDENT COMPUTERS BOOTING DIRECTLY FROM THEIR OWN HARD DISK

A common scenario is a number of computers on a network, which are independent of one another. This has the advantage that they can operate if the network is not functioning, or if one of the other computers is down (provided of course that the application does not require services supplied by that computer).

LICENSES

On each of the computers, the licenses for all the computers must be installed. So if there are six computers in the network, at least six licenses must be installed on each one. To install the licenses, run the command license and feed the computer each license disk. Diskettes with licenses have a small white sticker on the reverse side. For the QNX Operating System, the disk is Install Disk 1. Upgrade diskettes have no licenses, so you must use the disk of the original version with the license on it. Never discard any diskettes with a white sticker on the back. The installed licenses take effect when the computer is rebooted, or the command license -r is run.

NODE NUMBERS

Each microkernel must have a unique logical node number, starting at 1 and counting up. Node numbers can be skipped, but the highest number in use cannot exceed the total number of installed licenses. The microkernel is assigned its node number with a parameter to Proc in the build file. When the computer is booted, the secondary bootstrap loader loads an operating system image into memory, which is executed. This image contains the microkernel, the shared libraries, the filesystem manager and a driver for the hard disk controller. This image is created with the buildqnx utility, which reads a build file and creates a boot image. The default build file is typically /boot/build/hard.n, where n is the node number, but this varies with operating system version.

Near the top of the build file, is something like:
sys/Proc32
$ Proc32 -l 6

There are quite a number of parameters that can be used with Proc32. Type use /boot/sys/Proc32 for a description. These are also described in the Utilities - N to Z manual as well. Unlike most utilities, the values must be separated from the options with a space. Most of the parameters set values for the various resources needed and can be used to tune the system for optimum memory usage. The important one is -l n, which sets the logical node number for this computer, which in the example above is node 6.

Edit or create an appropriate build file. Move up a directory level to /boot and enter the command to create a boot image, based on the build file:
buildqnx build/hard.6 images/hard.6

Before installing the new image, save the current one as the alternate, so if there is a problem booting with the new one, the alternate can be used.
cp /.boot /.altboot

Now install the new image:
cp /boot/images/hard.6 /.boot

NETWORK CONFIGURATION

While Proc has been assigned its logical node number, it is still necessary to somehow map this logical number to a physical network address. Arcnet uses an integer node number which can conveniently be set to match the logical node number. Ethernet uses MAC Addresses which are 12 hex digits long. It is also possible to have more than one network, with some computers having multiple network cards installed which are connected to different networks (the computer must be the same logical node number in each one). A configuration file is used to describe which network each network card is connected to and identify its physical address. The configuration file is /etc/config/netmap. The format is logical node number, network number, network card address. Comments are indicated with the character #, the fields are separated with some spaces or tabs.
Example:


# Ethernet Network 1
1   1   0080C839954D      # Server
2   1   0080C8383B6D      # Workstation (Jim)
3   1   0080C8174E6D      # Workstation (Cindy)

# Ethernet Network 2
1   2   00C09300EF92      # Server
2   2   00C093022372      # Workstation (Jim)
4   2   00C093019389      # Data Monitor

# Arcnet Network
1   3   t1                # Server
5   3   t5                # Robot 1
6   3   t6                # Robot 1

In the above example, there are three networks. Network 1 is an Ethernet network running through the front office. Network 2 is an Ethernet network which extends out to the shop floor. Network 3 is an Arcnet network, which is used to interface to the robots on the shop floor. The server is Node 1 and is available on all three networks. There are three network cards installed in it. Jim's computer has a second network card installed in it so he can directly access the Data Monitor. All computers have the same netmap.

Bridging allows computers that are not connected on the same network, to communicate, if another computer is connected to both. The networks both need to be IEEE 802, so it is not possible to bridge with Arcnet. So Cindy can access the Data Monitor indirectly via the server, but neither Jim nor Cindy can access the Robots in the above example. Add the -b parameter to Net on the computers which are required to do the bridging (the Server in the example).

Maintaining identical netmaps on all the computers whenever changes are made can be a system administrators nightmare. Use Automap to do it automatically.

NETWORK CARDS

The physical node number, I/O port and Interrupt of most Arcnet cards is set with a DIP switch on the card. The Corman Arcnet card sold only by QNX Software Systems is more conveniently set with a configuration program which is accessed by typing ESC twice when the computer boots and Node n is displayed on the screen.

The physical MAC Addresses of Ethernet cards are set at the factory and are often listed on a label on the card. The I/O port and Interrupt must be manually set with most ISA bus cards and must not conflict with other cards in the computer. Some are set with jumpers and others are set with a DOS configuration program. Many of these cards cannot be correctly detected by the nettrap utility, so the values must be given to the drivers as parameters. PCI cards and some Plug 'n Play cards have their configuration set automatically.

NETWORK CABLING

Arcnet uses coax cables (RG62) connected with BNC connectors to a central hub, in what is commonly referred to as star topology.

Ethernet can be used with different cable systems. The two most popular are unshielded twisted pair (UTP) and Thin Wire (Coax). UTP uses RJ45 connectors, which are larger versions of those used with telephones. Each is connected to a central hub. A computer can be disconnected from the hub without affecting the rest of the network. Thin Wire uses RG58 coax and BNC connectors to attach the computers in a single daisy chain. At each card is a T connector, which connects two cables, one to each of the two computers farther up or down the chain. A 50 ohm terminator is required at each end of the cable. A bad connection or missing terminator may prevent the entire network from operating.

NETWORK SOFTWARE

In each computer, the Network Administrator, Net must be running. Also a driver specific to the type of network card must also be used. These are typically started in the system initialization file, which is executed at boot time. This file is /etc/config/sysinit.n, where n is the node number. Some typical entries would include the following items.

The name locator utility handles licensing as well as polling for nodes which are down. It is usually started early, so it is available as other services are started.

nameloc &
The network administrator:
Net -t1 &
The network card driver:
Net.ether1000 -6 -p320 -i5 -v &
Load the information from /etc/config/netmap into Net:
netmap -f

TESTING

If everything has been configured and installed as described, the computers should be able to talk to one another. Boot them all up. Type sin net and a list of the accessible computers will be displayed.

TROUBLESHOOTING

Ok, so you did everything, but it still doesn't work ?
All the the above items must be correct, or the network will not function.

If the driver printed an error message and stopped, then there is likely a conflict or configuration problem with the card. If you type sin ver, an entry for Net and an entry for each driver should be displayed. Use the -v parameter when starting the driver and verify that the I/O Port and Interrupt displayed are the ones the jumpers are set to (note that some drivers display their Interrupt as a hex value). It is possible that the autodetect is failing to identify the correct values, so you can try specifying the I/O Port and Interrupt as parameters to the driver. Check that no other hardware is interfering with those settings. In some cases, you can remove unnecessary cards to see if the problem goes away.

If the driver is refusing to accept the card and is terminating, it may be that the card is not supported by the driver. There are many cards on the market and all of them are not supported. You may even have a card based on a chipset that is supported by QNX, but the card is designed using some unusual feature that makes it incompatible.

If the driver appears to be happily running, check the physical to logical node mapping. Use the -v parameter to the driver and ensure that the MAC address of the card is identical to the address Net thinks it is. Type netmap on each computer to see Net's in memory version of /etc/config/netmap. If fewer entries than expected are displayed, there are probably too few licenses installed.

Type sin net on each machine. Check they are each the logical node (Nid) that they are supposed to be set to.

If these things are all correct, it is likely a problem with the cabling. Try another cable if available and try connecting the cables into different jacks of the hub. Many UTP hubs and cards indicate with an LED that a connection is made, but that doesn't guarantee all the wires are connected and correct. Look for a wiring error. When holding both ends of the cable beside each other, oriented the same way, the colours of the wires should be the same in each position. All eight wires should be connected. Some UTP hubs have a jack which can be used to connect two hubs together. This jack is often wired differently, or there is a switch to flip the wiring. Check it is correct.

If you are using Thin Wire Ethernet, ensure that you have terminators at each end of the cable. You cannot use a T-connector to make a cable that runs off in three directions. There are a few cards available that have jumper selectable on-board termination. Check that this is disabled. Check the cable is RG58, it will be marked right on the cable. Try different cables, T connectors and terminators. A bad connection inside any of these will prevent the network from working.

Note: These instructions are for typical situations. Individual configuration may differ.
If you have any questions, please contact us for assistance.

Copyright © 1999 Qenesis Inc.