CAPI 2.0 IP-Routing Interface for Windows NT 4.0
(CAPRI32/NT)
Version 1.4, Oct. 1999

Copyright 1998-1999, Herbert Hanewinkel, Neuried
Chapters:
Overview   Registration   Disclaimer   Installation
Users Guide      Support     Warranty

Overview

CAPRI32/NT provides a software solution for connecting multiple computers in any small office/home local area network environment or educational network to the Internet via a single ISDN connection.
CAPRI32/NT makes use of the Internet routing capabilities of the Microsoft TCP/IP stack, there is no need to replace the Microsoft TCP/IP stack by a third party TCP/IP stack. Developed for computing environments with one IP address, CAPRI32/NT forwards packets between the ISDN Line and the IP kernel with address/port translation. In work groups with several real IP addresses CAPRI32/NT can forward all packets unchanged to the IP kernel. CAPRI32/NT supports a large set of protocols for communication with other vendors ISDN routers or servers.
The number of users supported is only limited by the bandwidth of the connection. CAPRI32/NT can provide standalone or work group users with full access to Internet applications and resources, e.g. WWW, e-mail, telnet, ftp. Hosts in the LAN can accommodate almost any client node, including PC's Mac's, and Unix machines, as long as they are running a TCP/IP stack.

CAPRI32/NT is installed as a standard LAN interface NDIS driver. CAPRI32/NT communicates with the ISDN card using the Common ISDN API 2.0-DLL specification (a standard defined by German ISDN card manufacturers and the German Telekom). Because of this, CAPRI32/NT is completely hardware independent and has successfully been tested with many active or passive ISDN cards. CAPRI32/NT can be installed and used in parallel to NT RAS.

CAPRI32/NT supports one or two B-channels. A connection can use both B-channels for load sharing or PPP multilink operation. Load sharing/Multilink can be configured as static or dynamic (bandwidth on demand) or with manual setup. Multilink, as specified in RFC 1990, is used in case of PPP, Load sharing is implemented for all other protocols.

CAPRI32/NT supports IP-Masquerading (Network IP Address Translation + Port Mapping ),  a technique which allows multiple hosts on a private LAN to share a single IP address.
Private LAN addresses must be mapped to registered IP addresses supplied by your Internet Service Provider. This is known as Network Address Translation. CAPRI32/NT supports NAT (Network IP Address Translation) as described in RFC 1631.
Port Mapping works by keeping track of source port numbers used by TCP and UDP applications, and mapping each port number to a new number prior to transmission of the packet onto the Internet. A packet received from the Internet will have a destination port number equal to the mapped source port number, and so the original port number and IP addressee can be restored after a table lookup.

CAPRI32/NT supports DNS Interception for local name lookups. DNS address queries from all LAN clients can be intercepted and answered from a local name table. Optionally DNS queries to pre configured DNS server addresses can be redirected on the fly to dynamic assigned name server addresses.

CAPRI32/NT comes with a DHCP/BOOTP Server for automatic Client configuration. To simplify the configuration of LAN Clients for Internet access CAPRI32/NT is delivered with a combined DHCP/BOOTP server for configuring IP address, Nameserver-address and gateway IP address of the clients.

Registration

CAPRI32/NT is Shareware
CAPRI32/NT, as it is provided, is a demo version. To make use of the full capabilities of CAPRI32/NT you have to register the software. The registration fee does not depend on the number of clients that will gain access to the Internet by CAPRI32/NT. Please read the file capri32.txt (German version: capri32d.txt) for registration details.

As long as you have NOT registered CAPRI32/NT you may test the software for 30 days without a registration code. In this case CAPRI32/NT will stop forwarding data 15 min after startup.

Disclaimer

The software and this documentation is
Copyright (C) 1999 by Herbert Hanewinkel, Neuried
All Rights Reserved.

It is provided as shareware with the following limitations:
This program is copyrighted and it is not in the public domain. It may not be distributed for profit or included in any CD-ROM or diskette software collection without permission. This applies in particular to commercial PD libraries. The program is not to be resold or distributed for sale with other programs which are for sale without my express written permission. You may not bundle or otherwise distribute this software with any other software without my express written permission (i.e., on the same diskettes as part of a commercial package, compressed along with other software, etc.).
There is no warranty or claim of fitness or reliability. The program is distributed AS IS, and as such the author shall NOT be held liable for any loss of data, down time, loss of revenue or any other direct or indirect damage or claims caused by this program.

Installation

Installation on Windows NT and Windows 9x

Installation and Configuration of CAPRI32/NT
  1. Unpack the CAPRI32/NT software into a directory, e.g.: C:\CAPRI32
  2. The installation of the network components require Administrator privilege.
  3. Use the Network Control Panel to install the Network adapter NDIS CAPI Adapter. The driver is supplied in sub directory  INSMAC( for Windows NT) and WIN95 (for Windows 9x).
  4. (Windows NT only) Use the Network Control Panel again to install the Service NDIS Packet Service. The driver is supplied in sub directory INSPKT.
  5. If necessary bind the TCP/IP protocol to the "NDIS CAPI Adapter" and remove all other protocol bindings from the adapter.
  6. Configure the TCP/IP parameters as specified in the following chapter.
  7. (Windows NT only) Activate the IP-Forwarding Option, if you want to give clients on your LAN access to the Internet.
    (Windows 9x only) With the provided routing.bat script you can enable or disable IP-Routing on Windows 9x. Activate IP-Routing with routing on, if you want to give clients on your LAN access to the Internet.
  8. Reboot Windows.
  9. Use ipconfig /all or winipcfg to check you network setup and IP-parameters.

Configuring the TCP/IP parameters for ISDN-Ethernet IP routing :

IP-routing connects different IP-networks. An IP-router has at least two interfaces, a LAN interface and a WAN interface, and therefore requires two IP addresses in different networks. There are two modes of operation:
  1. You use an official assigned network or sub network of IP addresses for your LAN, you don't need any special software, like CAPRI32/NT in this case, but CAPRI32/NT can be used also in the case.
  2. You have only one static or dynamically assigned IP address, you must use IP-Masquerading and use IP addresses from a private network number range (e.g. 10.0.0.0, 192.168.0.0,..) for the hosts on your LAN. In this case you have to use an ISDN software that supports NAT and Port Mapping. CAPRI32/NT was developed for this type of internet access.

  3. ISDN-LAN IP Routing with one official IP address:

    1. For the ISDN Interface you need two IP addresses of an IP-network. If your provider uses fixed IP addresses you can configure these official IP addresses  here. Otherwise use the addresses as given below:

    2. Ndis CAPI interface
      IP address: 192.168.2.1
      Net mask: 255.255.255.0
      Gateway: 192.168.2.2
      Nameserver: 192.168.2.2 with redirection in CAPRI32/NT enabled or as specified by your provider
       
    3. Client configuration:

    4. Choose a block of  IP addresses from a private IP-network for all hosts on your LAN (all LAN hosts and the router PC). On all hosts, except the router itself, set the default gateway to point to the LAN interface IP address of the router PC.

      Router-PC with CAPRI32/NT, Ethernet interface:
      IP address: 192.168.1.1
      Net mask: 255.255.255.0
      Nameserver: 192.168.2.2 with redirection in CAPRI32/NT enabled or as specified by your provider

      Host 1, Ethernet interface:
      IP address: 192.168.1.2
      Net mask: 255.255.255.0
      Gateway: 192.168.1.1
      Nameserver: 192.168.2.2 with redirection in CAPRI32/NT enabled or as specified by your provider

      Host 2, Ethernet interface:
      IP address: 192.168.1.3
      Net mask: 255.255.255.0
      Gateway: 192.168.1.1
      Nameserver: 192.168.2.2 with redirection in CAPRI32/NT enabled or as specified by your provider

      .....

Configuration of CAPRI32/NT

  1. Run CAPRI32.EXE. Be sure your CAPI-2.0 software is loaded and the NDIS CAPI  and Packet Module are installed.
  2. Open the ISDN Setup menu and configure your local ISDN number. A * in the incoming number field enables incoming calls for all MSNs, otherwise specify the desired MSN for incoming calls. Leave the field empty if you want to disable incoming calls.
  3. Open the Network Setup menu of CAPRI32.
  4. Specify the phone number of your ISP, select the protocol and desired mode of operation. In case of PPP with dynamic IP address assignment select NAT with dynamic address, in all other cases select NAT with static address and enter the ISP assigned IP address.
  5. Restart CAPRI32.EXE
  6. Open a connection to your ISP to check your set up.
  7. Check the configuration with ping from any host in your LAN to an external IP address.

Users Guide

IP-Masquerading (NAT + Port Mapping) and DNS Interception

CAPRI supports IP address translation (translation of a private IP address to the official IP address), and Port-mapping (translation of a private IP address:portnumber to a free port number of the official IP address).
  1. Port Mapping gives more than one host outgoing internet access at a time through one official IP address. Enable Port Mapping by checking the option. CAPRI32/NT maps client port numbers to port numbers in the range 61441-62464 of the official IP address. Port Mapping works fine with all "well behaved" TCP/IP applications. Some programs require an additional port for downloading data (VDOlive, RealAudioPlayer,...). For these applications you can define static mapping entries for port number ranges to the assigned local IP address.e.g.

  2. 10000-10010,192.168.1.2
    will forward incoming TCP/UDP packets with port numbers in the range 10000 to 10010 to host 192.168.1.2. On the client set the UDP port number for the application to a port in this range.  Note that in most cases you have to configure the requesting TCP/IP application to use a fixed port number.
    Port Mapping entries can be added or modified on the fly without closing and opening a new connection.
    Port Mapping only works with protocols which use ports i.e. TCP and UDP. For all other protocols (except ICMP) and incoming connections without an mapping entry an address translation is performed. You can set up up to eight IP addresses in a destination IP address list. The default host is selected by checking the IP address in the Control menu. By simply choosing another host, you can switch between hosts on the fly without closing and opening a new connection. In general  an IP address of a local host in the destination IP address list is only required if you want to be able to make this host the default host for incoming connections, e.g. if the host runs a WWW or ftp server.
    Port Mapping can not be used for ping and traceroute, because ICMP Echo Requests don't use port numbers. Due to the importance of  ICMP a special mapping technique is implemented.
    A main problem with the concept of NAT is that some applications (FTP is the most notable example) put IP addresses into application layer messages which are transferred between Client and Server. This is a protocol layering violation, that in the case of FTP can be overcome  by using PASV commands rather than PORT commands. (Use of PASV can be selected as an option in almost all FTP Clients including WS_FTP, WAR_FTP and Fetch on the Mac). Anyway CAPRI32/NT supports PORT sequence number patching in case of FTP, but I recommend using PASV mode. Other applications with protocol layering violation, mainly video conferencing programs, may break.
  3. With DNS interception all clients on the LAN can resolve Domain names from a common name table without accessing an external name server. DNS IP address record requests are trapped and the IP addresses are looked up in a local name table. If a matching entry is found a reply is generated and the request dropped. If no match was found the query is forwarded in the standard way.

Menus

To control and monitor ISDN connections the program offers the following menus:
File
ISDN Setup
dialog box for defining the local ISDN numbers.
Modification in the advanced ISDN setup are usually not required.
CIP-mask: defines the services for incoming ISDN calls.
Enable both channels: enables CAPRI32 to use both B-channels.
Nameserver-IP: determined automatically from the Windows configuration. Change these addresses only if required.
DNS redirect: enables redirection of DNS request to a dynamically assigned name server.
Timer:
Call-Setup: maximum Call Setup time.
Pause: pause between call setups and successful connections.
Callback: delay until a callback is executed.
dyn. Timeout: In Shorthold mode a connection is released a few seconds before a unit ends. This
value defines how many seconds before the end of a unit it will occur.
dyn. Multilink Loadlevel: defines the load level for dynamic Multilink operation. A second connection will be established if the load exceeds this level for the defined amount of time..

You have to restart the program for modifications to take effect.

Network Setup
dialog box for defining ISP specific parameters. You have to restart the program for modifications to take effect.
Phone number: PBX's sometimes require a special key code for dialing out. If this prefix is not displayed on incoming calls, Dial back and CLI will normally fail. To solve this problem an outgoing call prefix supported, which is not checked on incoming calls. The prefix can be specified in front of each ISDN number separated by a comma. Digits, which should not be used in an outgoing call, but have to be present for CLI can be marked by a decimal point from the common part of the number.
Examples:
089.345678 will dial 345678 and will match incoming calls from 089345678
0,30.123456 will dial 0123456 and will match incoming calls from 30123456
00,123456789 will dial 00123456789 and will match incoming calls from 123456789.
Mode: Defines the mode of operation.
In/Out: incoming and outgoing calls allowed.
Incoming: only incoming calls are enabled.
Out: only outgoing calls are allowed
Req.Callback (ring): Request callback. To avoid costs the connection set up  is dropped immediately after the connect request.
Req.Callback (connect): Request callback. The connection setup is terminated on the connect confirmation. If the peer does not reject the call, the call will be charged.
Req.PPP-Callback: The PPP callback option is transmitted during PPP handshaking to request a callback.
Callback: Rejects an incoming call and calls back.
PVC: Permanent virtual connection (because it is manufacturer specific, implemented only for ISDN cards from EICON/Diehl)
Protocol: Defines the framing protocol of the packets.
CIP-Value: defines the ISDN service for outgoing calls. The default value of 2 selects "ISDN data transmission".Timer Options:
Unit Adaptive Disconnect with Shorthold of: Adaptive disconnect requires the definition and selection of  units through unit emulation or support of unit messages during the connection.
On expiration of the short hold idle timer, CAPRI32/NT calculates the remaining time of the current unit. If no further activity occurs the connection will close down a few seconds before the end of the unit was estimated.
Disconnect, if idle for: Defines the idle time-out for this connection. The value is used for incoming calls and in if a unit depended time-out is not defined.
Idle Timer ignores Received Packets:
If a peer sends packets on a regular basis to test the line, a idle time-out would never occur. The options will force CAPRI32/NT not to reset the idle timer on incoming packets.
Idle Timer ignores Bcasts & Netbios requests: Broadcast messages and NetBIOS name lookup messages will not reset the idle timer and not open a new connection. They are only transmitted, if a connection is already established.
MultiLink/Loadsharing: Three kinds of PPP-Multilink or Loadsharing using both B-channels are available: Static (set the timer value to 0), manual (don't enter a timer value) or dynamic (exceeding the configured load level for the defined time interval opens a second connection).
Peer IP: PPP can assign an IP address to the peer. This IP address can be defined here.
TCP-header compression: PPP will match TCP-header compression with the configuration of the peer. For all other protocols be sure to use the same setting of this option as the peer.
Units options:
Emulate Units messages: Allows CAPRI32/NT to emulate unit messages based on a setup entry.
An entry consists of up to 5 pairs of
Starting-hour,length-of-unit-in-seconds
Separate entries for week days and weekend/holidays can be created.
ATTENTION: A length of 0 disables outgoing calls to the peer during the specified hours.
Ignore real Units messages: With this option real unit messages will be ignored.

NAT: Network address translation is used to translate between private and official IP addresses.
NAT with dynamic IP assignment should be used if your provider uses PPP with dynamic IP addresses
NAT with static IP has to be used for providers that use fixed official addresses.
Nat can be disabled in case of a fixed official IP address. In this case the official IP address must be configured in the TCP/IP set up of Windows.

Exit terminates the program

View
Status selects the full status page for display.

Brief status selects the short status page for display.

Configuration displays the active configuration.

Log displays a connection and optionally trace log.

Mapping displays the active mapping entries.

Trace
CAPI Messages logs all messages exchanged with the CAPI software (except data transfer)

PPP Setup allows to trace the setup of a PPP connection. PPP data packets are not logged.

Application Interface

logs information related to the upper layer interface and additionally DNS queries.
TCP/IP
logs relevant TCP/IP information of all packets. Source-IP, Destination-IP and Protocol are logged for all protocols. Further values depend on the protocol, e.g. Source and Destination Ports are logged for TCP and UDP.
Attention: Use the trace option only for debugging NOT during normal operation.
Control
Connect
manually connects to an IP destination. In case of PPP with authentication the program prompts for authentication information. The initial setting of the repeated dial request option depends on the Preferences configuration.
Disconnect disconnects all active ISDN connections or terminates a repeated dial request.

Reset Statistics resets all counters.

Auto Dial enable or disables the auto dial feature.

Preferences

defines the initial program settings. Selectable are the language of menus and the initial setting of the repeated dial option.
Play Sound:The program beeps on connect and disconnect. If the this option is checked, the program will play the .WAV files assigned to "ISDNup" on connect and "ISDNdown" on disconnect.
Execute on connect/disconnect: A program executed after connection set up can be defined, %i inserts the assigned IP address, %n %s inserts assigned primary and secondary name server addresses.
Another program can be executed after disconnect.
Save Log: With this option the log pages  are automatically saved on program exit. If a log file exists the new entries are appended.
Port Mapping
The dialog box allows you to add or modify IP addresses of servers in your local area network and static port mapping entries for LAN clients. The static port mapping table must be scanned for every IP-packets, therefore you should avoid long tables and make use of port number ranges as far as possible.

If you don't have a WWW, ftp or some other server in your LAN, leave the IP address table empty. There is NO need to enter the IP addresses of clients in your LAN in the address table.

Name Resolution
The dialog box configures DNS interception. Set the check mark to enable local name resolution through the name table. Add the IP addresses and the full Internet Domain Name of those hosts you want to resolve locally.
Help
Contents starts a HTML browser with the manual.
Register
prompts for the license key and your name, company. To activate a license key you have to restart the program. After restart check the Info menu to find out if the license information was accepted.
Info displays program version information.

Connection state

The state of an ISDN connection is displayed on its status page and in place of an icons title by the following codes:
_ = free,
D = D-channel up,
C = B-channel requested,
B = B-channel up,
A = active, ISDN connection up,
additional information for PPP:
L = LCP configuration up,
I = PAP/CHAP configuration up, IPCP configuration started,
P = PPP connection up
additional information for SLIP:
S = SLIP configuration up

On ISDN connection set up and termination the CAPI 2.0 error and status codes are displayed.

Program Startup

CAPRI32.EXE can be started with the following optional command line arguments:
(You can enter arguments for a Windows program via the Properties entry of Aliases.)

CAPRI32 [Flags] [ConfigFile]

Flags

ConfigFile specifies the name of the CAPRI32/NT configuration file. If the name is not given, it defaults to "CAPRI32.INI". The configuration file is a readable text file.

Therefore if you have more than one provider:

  1. set up a configuration for the first provider
  2. rename CAPRI32.INI to a provider related name e.g. tonline.ini
  3. create a CAPRI32 alias pointing to the renamed configuration file, e.g.

  4. C:\CAPRI32\CAPRI32 tonline.ini.
Repeat the steps to set up further configurations for other providers.

Running CAPRI32/NT as Service

To run CAPRI32/NT as a service the following files have to be in the same directory:
CAPRISRV.EXE, CAPRI32.EXE, CAPRID32.DLL, CAPRI32.INI
caprisrv -install
will install CAPRI32/NT as a service under Windows NT.

The service "CAPRI ISDN Service" can than be started and stopped via the control panel.
caprisrv -remove
will remove CAPRI32/NT as a service from the system.

Support

The latest version of CAPRI32/NT is available on www.heha.cjb.net. Please mail comments, questions, problems to heha@heha.cjb.net. I can not guarantee any level of technical support, or for any length of time. In general, I will give priority to registered users.

Warranty

There is absolutely NO WARRANTY, expressed or implied with this software. If you choose to use this software, you assume all risk.