Comparing NDIS to Native Drivers
The Network Device Interface Specification (NDIS) defines a standard interface between VINES workstation software for DOS and OS/2, and LAN card device drivers, which are called MAC (Media Access Control) drivers.
NDIS provides the following advantages to the VINES LAN administrator, allowing you to:
Run multiple protocol stacks on the same workstation across a single LAN card. For example, you can run PC/TCP and VINES across a single LAN card simultaneously. Figure 2-1 shows the structure of workstation software that runs two protocol stacks on the same LAN card. Choose any LAN card on the market that supports NDIS versions between 1.01 and 2.01. Run two entirely separate protocol stacks on two different LAN cards on the same VINES workstation, as shown in Figure 2-2. Dynamically bind protocol stacks using NDIS 2.01. This allows you to access a particular protocol stack only when needed. Note: Dynamic Binding in NDIS version 2.01 is supported by VINES 5.5x and later versions. Dynamic unbinding is not supported.
This section introduces terminology that is used throughout this document.
A MAC (Media Access Control) driver is a DOS or OS/2 device driver that controls software communication with the LAN hardware. The MAC driver controls LAN card hardware and enables it to send network packets onto the physical media. MAC drivers are typically loaded through CONFIG.SYS.
The LAN card vendor supplies an NDIS-compliant MAC driver with the LAN card. For example, the MAC driver supplied with the 3COM 3C509 Ethernet card for use under DOS is called ELNK3.DOS. For OS/2, the file ELNK3.OS2 is supplied.
If you do not have a MAC driver for your LAN card, contact the appropriate vendor to obtain one.
The Protocol Manager is a part of the NDIS interface. It performs two important tasks. It:
Binds MAC drivers and communication stacks together. The Protocol Manager performs this process when the program netbind.exe is run. Arbitrates between MAC drivers and communication stacks when more than one driver or stack is present. The portion of the Protocol Manager that performs this function is called Vector.
To link one MAC driver to multiple protocols, the Protocol Manager inserts a component, called Vector, between the MAC and the protocols. Vector is part of the Protocol Manager and is bound between the MAC and each of the protocols. To the protocol, Vector looks like a MAC driver. To the MAC driver, Vector looks like a protocol.
Figure 2-3 shows a DOS workstation with two communication stacks loaded. The figure illustrates how NDIS handles an incoming packet.
Vector routes incoming packets between the protocols. When a packet is received by an NDIS MAC driver, it notifies Vector of the event. Vector passes this notification, first to one, then to the other protocol, until one protocol accepts the packet or all have rejected it. The PRIORITY statement in the Protocol Manager section of PROTOCOL.INI can dictate which protocol receives the packet first.
Under DOS, the Protocol Manager, named PROTMAN.DOS, is loaded through CONFIG.SYS. Under OS/2, the Protocol Manager, named PROTMAN.OS2, is also loaded through CONFIG.SYS.
Communications protocol is software that controls communication between networked nodes, such as VINES or TCP/IP.
This ASCII text file is the NDIS configuration file used by the Protocol Manager, the MAC driver, and the communication protocols. PROTOCOL.INI can be created or modified with a text editor. Some vendors create this file through an installation program.
The LAN card vendor often provides part of the PROTOCOL.INI file, called a fragment. The fragment specifies the LAN card settings for the vendor's card.
PROTOCOL.INI contains the instructions for binding the protocol stack or stacks to the NDIS network drivers. It also contains the parameters needed to configure the individual drivers. When CONFIG.SYS initializes at boot time, the Protocol Manager Driver (PROTMAN.DOS or PROTMAN.OS2) reads this file.
PROTOCOL.INI information is grouped into a number of logical sections using this format:
[section name]
parameter=value
The section name is the name of the PROTOCOL.INI section and is used by the protocol to refer to the MAC driver. The section contains parameters that describe the driver's configuration. Each section can have multiple parameters, but must have at least one, the DRIVERNAME. A section that describes a protocol stack, such as VINES, must also have a BINDINGS= statement.
Section names are arbitrary. You can call the section that defines your LAN card anything you like. However, Banyan recommends using the name of your LAN card as your section name. This is useful when more than one LAN card is defined in the PROTOCOL.INI file.
Note: It is very important that the BINDINGS= value matches the section name to which it refers.
None of the entries in PROTOCOL.INI are case sensitive.
The sample PROTOCOL.INI file that follows has configuration sections for these NDIS entities:
The Protocol Manager, which controls the binding process. The Protocol Manager entry in PROTOCOL.INI is optional, but may be required in the future. VINES. The Proteon P1392 adapter's MAC driver.
Example Sample PROTOCOL.INI File
[PROTOCOL MANAGER]
DRIVERNAME=PROTMAN$
DYNAMIC=YES
[VINES_XIF]
DRIVERNAME=NDTOKBAN$
BINDINGS=PROTEON
[PROTEON]
drivername=ndi39xr$
intlevel=11
iobase=0xa20
dmachannel=5
linkspeed=16
media=stp
dmaclock=8
saen=on
Each section must include a DRIVERNAME= value. This value specifies a name that uniquely identifies the NDIS section. In most cases, it is the driver name that the driver registers to the operating system during initialization. The driver defines the name that must be used, because the driver uses the DRIVERNAME entries as a key when searching PROTOCOL.INI data for its relevant keywork section.
Section names, such as [PROTEON], can be any name you want, as long as you are consistent in your references to them. For example, you could call the section name [P1392], but only if you change the BINDINGS= statement in the VINES_XIF section to "BINDINGS=P1392".
The VINES_XIF section is optional, and is only applicable to DOS workstations. If you specify BINDINGS= in PCCONFIG, you can omit this section from the PROTOCOL.INI file. However, Banyan recommends including this section in your PROTOCOL.INI file. It may be required in future revisions.
Any number of additional, optional parameters can be included in a section. These parameters allow control of the driver configuration. A set of valid configuration options are defined for any particular driver. In the case of the PROTEON section in this example, we specified dmachannel=5 to tell the driver to use DMA Channel 5. Refer to your vendor's documentation to determine which parameters are necessary for your LAN card.
On the workstation, a program named NETBIND.EXE is run to start the binding process. NETBIND.EXE instructs the Protocol Manager to bind the configured MAC drivers with the communications protocols, such as VINES.
The act of binding involves exchanging function addresses among the Protocol Manager, the MAC drivers, and the communication stacks. It also starts the flow of data between the protocol stacks and the MAC driver.
This program, distributed with VINES, waits for the VINES server to supply the client with a VINES network address. ARSWAIT runs after NETBIND, and it only runs under DOS. ARSWAIT is designed to avoid the "VINES Files Not Available" error.
ARSWAIT's sole purpose is to extend the amount of time between the execution of NETBIND and LOGIN. Since LOGIN.EXE resides on drive Z, you cannot run LOGIN until drive Z is established.
Do not use ARSWAIT on mobile computers, such as notebooks or laptops, or on any machine that is not connected to a VINES network each time it boots. If there is no drive Z available, ARSWAIT times out after 60 seconds.
This section describes the files required to configure a VINES workstation to run NDIS. Some of these files are described in detail in "NDIS Terminology" earlier in this chapter. Table 2-1 shows a summary of these files.
NDIS in Earlier VINES Revisions
VINES 4.11 (5) with patches 4.11(5)-BF-1 and 4.11(5)-FW-1 contains the NDIS software described in Table 2-2 and Table 2-3.
Installing a DOS Workstation Using NDIS
This section describes how to install NDIS on a DOS workstation with VINES 5.5x. The discussion assumes that the workstation was not installed in a VINES network before.
The following hardware and software are required for this installation:
You must have one client installed and running VINES 5.5x workstation software. If you do not have at least one client installed in your network, refer to Managing Workstations for instructions on installing the first client in a VINES network. Your workstation must have a LAN card installed. You should write down the following information about your LAN card: - I/O port address.
- Hardware interrupt used by the LAN card.
- Any memory addresses required by the LAN card.
- Any additional parameters peculiar to the card. For example, for Token-Ring cards, you must set Source Level Routing on or off, and for some Proteon cards, you must set either Primary or Secondary.
A MAC driver for your LAN card. This driver comes on a diskette supplied by the manufacturer of the LAN card. A PROTOCOL.INI fragment for your LAN card. This sometimes comes on the same diskette as the MAC driver. Other times, the contents of the fragment may be included in the LAN card documentation. VINES 5.5x or greater running on your network. DOS 3.3 or greater running on your workstation.
The first step in installing your workstation is to collect the software you need. You will need the diskette distributed with your LAN card. This diskette contains the MAC driver and the PROTOCOL.INI fragment for your LAN card.
Create a subdirectory called \banyan on the boot drive of your workstation. You will copy all of your workstation software into this directory.
To collect the VINES workstation software you need, run the VINES utility PCCOPY from the installed workstation. For this procedure, you need a formatted DOS diskette.
Follow these steps:
1. From the installed workstation, change to the directory where the Banyan workstation software resides.
2. Enter the following command at the prompt:
PCCOPY
The PCCOPY Main Menu appears.
3. Choose Copy PC Configuration Software and/or LAN Driver. The Driver Selection help screen appears.
4. Press PgDn until the appropriate NDIS driver option appears on the screen.
5. Choose this driver by placing the reverse video bar on your selection and pressing ENTER. An asterisk appears next to the selection, as shown in the following screen.
6. Press F10. The Redirector Selection menu appears.
7. Press the arrow keys and ENTER to place an asterisk next to each redirector you want. The redirectors you choose should correspond to the version of DOS that you are running.
When you have placed an asterisk next to all the redirectors you want, press F10. The Select destination drive screen appears.
Note: You can specify either drive A or drive B to create the installation floppy. This procedure assumes that you accept the default.
8. Press ENTER. The following message appears on the screen:
>> Please insert a DOS formatted diskette in drive A.
>> Press ENTER when ready to proceed
9. Insert a formatted DOS diskette in drive A. Press ENTER. PCCOPY copies VINES workstation files to your diskette. The files copied should include the following VINES workstation software for NDIS:
- NDISBAN.COM
- NDISBAN.OVL
- PROTMAN.DOS
- PROTMAN.EXE
- NETBIND.EXE
- ARSWAIT.EXE
10. Remove the diskette from drive A of your workstation.
11. Insert the diskette into drive A of the workstation you are installing.
12. Copy the software onto the boot drive of the workstation into the directory called \banyan.
13. Remove the diskette from the drive.
14. Insert the diskette that came with your LAN card into drive A of your workstation.
15. Copy the MAC driver and the PROTOCOL.INI fragment into the \banyan subdirectory on the hard drive of your workstation.
Configuring Workstation Software
Your new workstation now contains all the software you need to connect your workstation to the network using NDIS. Configuring this software consists of manipulating four files:
AUTOEXEC.BAT - A DOS text file that allows you to run certain programs automatically when the workstation boots.
CONFIG.SYS - A DOS text file used to load device drivers and configure other DOS operating system parameters.
PCCONFIG.DB - A VINES workstation configuration file manipulated through PCCONFIG.EXE.
PROTOCOL.INI - An NDIS text file that contains configuration information for the MAC driver and protocol.
The next four sections describe the procedures to configure these files.
Configuring CONFIG.SYS
You must add two lines to the CONFIG.SYS file. The following example declares the MAC driver for the 3Com 3C509 Ethernet card.
Example Declaring 3C509 MAC driver
device=c:\banyan\protman.dos /i:c:\banyan
device=c:\banyan\elnk3.dos
The first line declares the Protocol Manager. The /i switch indicates the directory where the PROTOCOL.INI configuration file is found. Without the /i switch, PROTMAN.DOS looks for PROTOCOL.INI in C:\LANMAN. The second line declares your LAN card's MAC driver.
Configuring PROTOCOL.INI
Use a text editor to create a PROTOCOL.INI file in the \banyan subdirectory in which your VINES workstation software resides. The PROTOCOL.INI file should contain at least two sections:
Protocol Manager The section that comes with your LAN card
The example that follows is a PROTOCOL.INI file that is used to install a 3Com 3C509 card at address 0x300 and hardware interrupt 3.
Example PROTOCOL.INI for a 3COM 3C509
[PROTOCOL MANAGER]
DRIVERNAME=PROMAN$
DYNAMIC=YES[VINES_NIF]
drivername=NDISBAN$
bindings=ELNK3_NIF
[ELNK3_NIF]
DRIVERNAME=ELNK3$
IOADDRESS=0x300
The PROTOCOL MANAGER section is not currently required, but is recommended by 3Com and may be required in future NDIS revisions.
Configuring PCCONFIG.DB
To configure the PCCONFIG.DB file, run PCCONFIG.EXE, the VINES workstation configuration program. Follow these steps:
1. At the command prompt, enter pcconfig. The PCCONFIG Main menu appears.
2. Choose Network Card Settings. The Network Card Settings screen appears.
3. Choose the appropriate NDIS driver and press ENTER. In this example, the NDIS Ethernet screen appears.
4. Enter the interrupt level. Set the interrupt level to the same level in three places:
In hardware, usually through a jumper setting or through a system configuration program, such as the IBM Reference Diskette software. In PCCONFIG. In PROTOCOL.INI. Some LAN cards may not have the interrupt level declared in PROTOCOL.INI. Note: Entering an incorrect value can impair workstation performance.
5. In the PROTOCOL.INI bindings= field, enter the module name that appeared in square brackets in the header of the LAN card section of PROTOCOL.INI. Do not include the brackets.
You can leave this field blank if you specified BINDINGS= in the VINES_NIF section of PROTOCOL.INI.
Example PCCONFIG Bindings= Setting
Suppose the section of the PROTOCOL.INI file pertaining to your LAN card looked like this:
[ETHERLINKII]
IOADDRESS=0x300
INTERRUPT=3
MAXTRANSMITS=40
DRIVERNAME=ELNKII$
The screen would look like the following example.
6. Press F10 to save your changes. The Network Card Settings screen appears.
7. Press ESC or F10 to return to the PCCONFIG Main menu.
8. Choose Login Environment Settings. The Login Environment Settings menu appears.
9. Choose Select Default Communications Driver. The Default Communications Driver screen appears.
Press PgDn until the NDIS Ethernet entry appears.
10. Use the arrow keys to select the entry NDIS Ethernet. Press ENTER. The Login Environment Settings screen appears.
11. Press F10 twice to save your changes and exit the program. You are prompted to boot the workstation so that the changes take effect.
Configuring AUTOEXEC.BAT
The last file to configure is AUTOEXEC.BAT. The sample AUTOEXEC.BAT file that follows loads all of the Banyan workstation software, and the NDIS software.
cd \banyan
ban /nc
ndisban
netbind
arswait
redirall
rem
rem ***Load other TSRs Here***
rem
rem z:\login
When you load other Terminate and Stay resident programs, they must be loaded after the VINES network software. It is particularly important that no TSRs be loaded before NETBIND. Doing so can cause memory allocation problems in your workstation.
The last statement is a remark. This is because the VINES login program clears the screen, making it impossible to see if errors have occurred. Once you are sure that the other software loads without error, you can delete the "rem" at the beginning of the line.
The lines in this file run as follows:
cd \banyan - Changes the current working directory to \banyan, where the VINES workstation software resides.
ban /nc - Loads BAN.EXE, but does not load a communications driver.
ndisban - Loads the VINES NDIS Ethernet driver.
netbind - Sends the request to the Protocol Manager to bind the modules declared in PROTOCOL.INI into a complete communications stack.
arswait - Waits for VINES address resolution.
redirall - Loads the VINES redirector. The redirector gives the workstation access to VINES file and print services. REDIRALL works with any version on DOS. There are many other redirectors, some of which offer support for DOS Named Pipe applications. See Managing Workstations for more information.
Once the AUTOEXEC.BAT file is created and saved in the root directory of your boot drive, you can boot the workstation. Your software should load without error. If no errors occur, the boot screen looks like the following example.
If the workstation boots without errors, remove the rem statement from the last line of the AUTOEXEC.BAT file and save the file. The line should read as follows:
z:\login
You can now reboot and log in to VINES.
Many administrators use memory managers to increase the amount of memory available for running applications. For example, after loading the VINES 5.52 (5) NDIS workstation software for a 3Com 3c503 LAN card, a workstation running DOS has about 410,000 bytes of memory remaining to run applications.
Note: PROTMAN.DOS version 1.1 cannot be loaded high. Be sure you are running at least PROTMAN.DOS version 2.0 before you attempt to load the NDIS software into high memory.
In this document, we discuss loading VINES NDIS software using three different memory managers:
QEMMTM 386MAX DOS 6.0 memory utility MemMaker
DOS Workstation Memory Architecture
Figure 2-15 shows the structure of memory in a DOS workstation.
The 640K of base or conventional memory in the workstation is accessible by:
DOS applications DOS device drivers DOS itself Terminate and Stay Resident programs
Between 640K and 764K of memory is Video RAM. This is memory used by video adapters. The memory between 764K and 1024k is usually used by LAN cards and other adapters.
The upper memory area is reserved for system ROM and adapter RAM. There is no physical memory in this region. Instead, installed adapters that possess ROM and RAM are mapped into this area, along with the DOS system ROM BIOS. For example, a VGA adapter card possesses memory which is mapped to the upper memory region.
It is important to know what is used and what is vacant in this region before you configure any memory management software. Otherwise, you may try to load a program into memory space that is used by one of your system boards. Many memory managers refer to unused memory in this region as Upper Memory Blocks (UMBs).
The first 64K of memory above 1 MB is called the High Memory Area (HMA). This memory is accessible by DOS 5.0 and 6.0 when you load the device driver HIMEM.SYS. DOS uses portions of this memory to store parts of the operating system.
All memory above 1088K is called extended memory. Extended memory is used by memory managers such as QEMM and 386MAX. Extended memory is not shown in Figure 2-15.
DOS 6.0 supports a memory management utility called MemMaker. This utility modifies your AUTOEXEC.BAT and CONFIG.SYS files to load parts of DOS, some device drivers, and certain TSRs into extended memory.
Note: Upper memory area uses extended memory by mapping upper memory addresses to extended memory.
Table 2-4 shows the changes made to the AUTOEXEC.BAT file and the CONFIG.SYS file made by MemMaker on a workstation running DOS 6.0. Your results may vary, depending on the options you choose while running MemMaker.
386MAX is a memory manager from Qualitas, Inc. Table 2-5 shows CONFIG.SYS and AUTOEXEC.BAT files before and after running 386MAX version 7.1. The system was a COMPAQ 386SX running DOS 5.0. Your results may vary, depending on the options you choose while running 386MAX.
The configuration described in Table 2-6 was tested on a COMPAQ 386SX with 8 MB of memory, and a 3Com 3C503 BNC Ethernet card. This configuration was generated by running the EXPRESS installation option of QEMM 7.0. This configuration yielded about 585K of application space after it was loaded. Your results may vary, depending on the options you choose while running QEMM.
When using a vendor's ARCNET NDIS MAC driver with VINES ARCNET NDIS software, be aware that some ARCNET drivers represent themselves as Ethernet NDIS drivers to an Ethernet NDIS-compliant protocol stack. By pretending to be an Ethernet NDIS MAC driver, the ARCNET NDIS MAC driver tries to let the Ethernet NDIS-compliant protocol stack use an ARCNET network as if it were an Ethernet network. This method, in theory, allows NDIS-compliant protocol stacks, which only support Ethernet NDIS, to use ARCNET media.
However, some protocol stacks, such as VINES, must know if the media used is Ethernet or ARCNET. VINES software adds information to network packets when sending those packets over an ARCNET network.
If an ARCNET NDIS driver, pretending to be an Ethernet NDIS driver, is used with VINES Ethernet NDIS software, the additional information is not added to the network packets. The packets sent out over the Ethernet interface are then misunderstood, and the packets dropped when they reach their destination.
For proper VINES NDIS support, ARCNET NDIS drivers must represent themselves as ARCNET drivers. VINES NDIS software detects when an inappropriate driver is used and issues a 1010 error code. Refer to "Basic Troubleshooting for DOS NDIS Support," which follows, for a description of this error.
If this error occurs, contact your LAN card vendor to obtain the appropriate ARCNET NDIS MAC driver.
Basic Troubleshooting for DOS NDIS Support
Most configuration problems are detected and reported by the VINES NDIS software for DOS workstations. The error list in Table 2-7 is included in the file NDISBAN.DOC located in your VINES directory.