  








			WANPIPE?


	Multi-protocol WANPIPE Driver for Linux(r)


		INSTALLATION   M A N U A L



		Author: Nenad Corbic  






	Copyright (c) 1995-2001 Sangoma Technologies Inc.















Introduction
------------

The WANPIPE routing/API solution is comprised of Sangoma "S" 
series intelligent adapters/cards, Linux device drivers and 
shell/GUI configuration and startup scripts.  The Sangoma "S" 
adapters along with the WANPIPE device drivers provide a 
physical and WAN data link layer (OSI model) to the Linux IP 
Routing Stack.   The Linux IP stack, using its internal 
routing table, routes packets to and from the WANPIPE drivers.  


Installing WANPIPE Driver Package
---------------------------------


Obtaining The Wanpipe Software
------------------------------

1. Sangoma FTP
--------------

URL: ftp://ftp.sangoma.com  /linux directory.




Source Package
--------------

Location: "/linux/current_wanpipe" directory  

The latest software version is under the following name:
wanpipe-beta-X.Y.Z.tgz:	Latest Development Release
wanpipe-X.Y.Z.tgz:		Latest Stable Release

where XY.Z is a product version number. This archive should 
always be installed on a CLEAN Kernel.




RPM Binary Package
------------------

Location: "/linux/RPM" directory
Binary packages for Red Hat distributions



LRP Package
-----------

Locatoin: "/linux/LRP" directory
Binary packages for Linux Routing Project distribution


2. Sangoma CD-ROM
-----------------

Mount the CD-ROM 
	Ex: mount /dev/cdrom /mnt

      Copy the Wanpipe-X.Y.Z.tgz release from the 
      CD-ROM Linux/ directory into the / directory of your system
      
	Ex: cp /mnt/Unix-type\ systems/Linux/wanpipe-X.Y.Z.tgz /
      	


WARNING:  THIS VERSION ONLY SUPPORTS S508/S514 and 508/S514/FT1 cards. 

PLEASE CONTACT SANGOMA TECHNOLOGIES INC. IF YOU WANT TO 
UPGRADE YOUR OLD S502E or S503 CARD.


Choosing the Kernel Version
---------------------------

The latest WANPIPE packages contain patches for 2.0.X, 2.2.X 
and 2.4.X kernels. Please read the README files for more 
update information.





Unpack distribution archive
----------------------------

1. Log in as super user (root) and change your current 
   directory to any temporary directory.
		Eg: /root/tmp 

	You can also use the 'su -' command to log in as root 
	from any other user account. 


2. Copy the WANPIPE distribution package, previously 
   downloaded from Sangoma ftp site, or CD-ROM, to the 
   temporary directory and un-tar it.

  	ex:  tar xvfz wanpipe-x.y.z.tgz
  
	The source distribution will create the wanpipe/ directory.
 



Package Components
------------------

The WANPIPE Driver package includes the following components:
     
Driver Installation script		(./Setup)
Driver start-up script			(/usr/sbin/wanrouter)
Driver configuration utility		(/usr/sbin/wanconfig)
Driver configuration files		(/etc/wanpipe/wanrouter.rc)

Interface configuration files		(/etc/wanpipe/interfaces/*)
Firmware modules			(/etc/wanpipe/firmware/*) 
Kernel patch files			(./patches)

Frame Relay Debug Monitor		(/usr/sbin/fpipemon)
Cisco HDLC Debug Monitor		(/usr/sbin/cpipemon)
PPP Debug Monitor			(/usr/sbin/ppipemon)	
X25 Debug Monitor			(/usr/sbin/xpipemon)
WANPIPE Keyboard Led Debugger  (/usr/sbin/wpkbdmon)
WANPIPE PPP Backup Daemon	(/usr/sbin/wpbackupd)
Adapter's Memory Viewer		(/usr/sbin/sdladump)

FT1 CSU/DSU Configuration Util.	(/usr/sbin/cfgft1)
Wanpipe Configuration Utility	(/usr/sbin/wancfg)

Sample files				(/etc/wanpipe/samples)
X25 API sample code			(/usr/lib/wanpipe/api/x25)
CHDLC API sample code		(/usr/lib/wanpipe/api/chdlc)
Frame Relay API sample code	(/usr/lib/wanpipe/api/fr)
Bit Streaming API sample code          (/usr/lib/wanpipe/api/bitstrm)


WANPIPE Package Setup
---------------------


Source Installation
-------------------

The WANPIPE source package can be installed in two ways:  
1. A first time WANPIPE installation with a clean, un-patched kernel.
2. An Upgrade to the latest WANPIPE release.

The Setup installation script, located in wanpipe temporary 
directory,  will guide you through ether installation procedure, 
whether it's a fresh install or an upgrade.  The installation 
utility will probe the kernel for previous WANPIPE installations 
and will offer appropriate installation options.

Furthermore, the Setup installation utility can also re-compile 
and install new WANPIPE device driver modules based on the 
currently running Linux kernel, thus eliminating manual kernel/module 
recompilation.

To start WANPIPE installation, run the Setup installation program.

	cd wanpipe/
       	./Setup install

This script will perform the following functions:

1. WANPIPE INSTALLATION

* Verify distribution integrity and fix file permissions
* Check for required packages, bash2, libncurses and GCC.

	Note: Wanpipe GUI utilities require BASH version 2 or greater
	      If the Setup fails the bash check, make sure bash 
	      in installed before attempting to configure WANPIPE.

2. UPDATING WANPIPE DEVICE DRIVERS: LINUX KERNEL

* Probe the Linux kernel for previous WANPIPE installation
* If the kernel is clean, appropriate patches will be used 
  updated WANPIPE drivers.
* If the kernel already has WANPIPE installed, drivers 
  will be upgraded to the latest version.

3. WANPIPE KERNEL DRIVER SETUP

* This option will attempt to compile currently 
  installed WANPIPE device drivers located in the 
  Linux source tree and update/install WANPIPE modules.

* Note: the kernel source in /usr/src/linux must have the 
  same configuration and version number of the currently 
  running image.  Otherwise, module dependencies will fail.



4. WANPIPE BOOTSTRAP CONFIGURATION

* Option to install bootstrap startup and shutdown scripts 
  that will start and stop WANPIPE drivers on system startup 
  and shutdown.
  
5. WANPIPE META CONFIGURATION

* Wanpipe utilities depend on a wanrouter.rc META file 
  that defines locations of WANPIPE lock, configuration 
  and interface files.

* You will be prompted to define these paths.  If unsure 
  leave everything as default.

6. WANPIPE UTILITES SETUP
* This option will compile all WANPIPE utilities necessary 
  to run WANPIPE devices.  

7. WANPIPE INSTALATION : COMPLETE

* This is the last message in the installation process.  
  This message will ONLY be displayed if the WANPIPE device 
  driver modules have been compiled.   In this case, the 
  next step is to configure a WANPIPE driver and start the router.

  PLEASE SKIP THE NEXT SECTION AND PROCEED TO WANPIPE CONFIGURATION.


8.    WANPIPE INSTALLATION: INCOMPLETE

* This is also the last message in the installation process.  
This message will ONLY be displayed if the WANPPIE device 
drivers HAVE NOT been compiled, thus you are required to 
proceed with the kernel/module re-compilation in order to 
finish up the WANPIPE installation.

PLEASE REFER TO THE LINUX COMPILATON INSTRUCTIONS BELOW













RPM Binary Installation
-----------------------

Before installing the RPM, make sure that you have 
downloaded the appropriate package for your distribution, 
smp support and kernel. Once you have verified that you do 
indeed have the correct RPM, install Wanpipe by: 

rpm -i -force <wanpipe_rpm_package_name>

ex: rpm -i -force wanpipe-2.2.2-rh7.1-smp-1-1.i386.rpm




LRP Binary Installation
-----------------------

Package Contents:
	wanpipe.lrp:   Wanpipe utilities and startup scripts 
	modules.lrp:   Wanpipe kernel modules

1.   Copy the lrp packages onto a DOS formatted disk.
2.   Boot the system with the LRP boot up disk
3. Insert the disk containing Wanpipe lrp packages
4. Mount the disk:  eg: mount.boot /mnt
5. Change directory to /mnt and install each package
          Eg:  lrpkg -i modules
                 lrpkg -i wanpipe 
6.   Create the Wanpipe configuration fine in /etc/wanpipe directory.



















Linux Kernel Configuration/Compilation
--------------------------------------


Note:  If the modules were recompiled by the Setup 
installation script this step is not necessary !!!

           This does not apply for the API device drivers.  



Configure Linux Kernel
----------------------

Change your current directory to /usr/src/linux: 
	make menuconfig' 	(menu- driven configuration) 
or 	make xconfig'		(if you are running X-Windows.)



Note: 
If you have never configured Linux kernel before, 
please read /usr/src/linux/README or ask someone who 
did for assistance.  In short, the Linux configuration 
script will ask you a series of questions regarding your 
system configuration.  Most questions require single-letter 
answer: 'y' to enable feature, 'n' to disable it or 'm' to 
implement feature as a module.  Entering 'h' brings up a 
help text (if available).
  

IMPORTANT:
When configuring the kernel, MAKE SURE YOU ANSWER NO to the 
following questions when they come up:

* Set version information on all symbols for modules (CONFIG_MODVERSIONS)
* Frame relay DLCI support (CONFIG_DLCI) 


When configuring kernel, MAKE SURE YOU ANSWER YES or M 
to the following questions when they come up:

Code maturity level options		
---------------------------
Prompt for development drivers	(CONFIG_EXPERIMENTAL)



Loadable Module Support
-----------------------
Enable loadable module support	(CONFIG_MODULES)
Kernel daemon support		(CONFIG_KERNELD)2.0.X kernels only
				(CONFIG_KMOD)   2.X/2.4.X kernels only


				
General Setup
-------------
Networking support		(CONFIG_NET)
PCI support			(CONFIG_PCI)



Networking Options
------------------


Packet Socket		(CONFIG_PACKET)		2.2.X / 2.4.X kernels only
Unix domain sockets	(CONFIG_UNIX)			
TCP/IP networking	(CONFIG_INET)
IP: forwarding/gatewaying	(CONFIG_IP_FORWARD)	2.0.X kernels only
IP: optimize as router not host	(CONFIG_IP_ROUTER)
802.1d Ethernet Bridging	(CONFIG_BRIDGE)	2.2.X kernels only,  
				used by WANPIPE frame relay Ethernet bridging.

WAN Router		 (CONFIG_WAN_ROUTER) 
			 	set to "M" for 2.2.X or 2.4.X kernels  
				set to "Y" for 2.0.X kernels.


Network Device Support
----------------------
Network device support	(CONFIG_NETDEVICES)



Wan Interfaces
--------------
WAN Drivers			(CONFIG_WAN_DRIVERS) 
Vendor Sangoma			(CONFIG_VENDOR_SANGOMA) 
				set to "M" for 2.2.X kernels / 
				set to "Y" for 2.0.X kernels.

In previous version of WANPIPE, a maximum number of WANPIPE 
devices needed to be defined (CONFIG_WANPIPE_CARDS).  
In this release, all Sangoma devices are probed during 
module startup.  Devices found are dynamically setup.



WANPIPE Frame Relay support	(CONFIG_WANPIPE_FR)

Say 'Y' to this option, if you are planning to 
connect WANPIPE card to a frame relay network.  
If you say 'N', the frame relay support will not 
be included in the driver (saves about 16K of kernel memory).

WANPIPE Cisco HDLC support	(CONFIG_WANPIPE_CHDLC)

Say 'Y' to this option, if you are planning to 
connect WANPIPE card to a leased line using Cisco 
HDLC protocol (WANPIPE or API).  If you say 'N', 
the Cisco HDLC support will not be included in the driver.

WANPIPE PPP support		(CONFIG_WANPIPE_PPP)

Say 'Y' to this option, if you are planning to connect 
WANPIPE card to a leased line using PPP protocol (WANPIPE).  
If you say 'N', the PPP support will not be included in 
the driver.

WANPIPE X25 support		(CONFIG_WANPIPE_X25)

Say 'Y' to this option, if you are planning to connect 
WANPIPE card to a leased line using X25 protocol (WANPIPE 
or API).  If you say 'N', the X25 support will not be 
included in the driver.
  
WANPIPE Multi-Port PPP support	(CONFIG_WANPIPE_MULTPPP)

Say 'Y' to this option, if you are planning to connect 
WANPIPE card to multiple leased line, using the kernel 
PPP protocol (WANPIPE).  Since the protocol is implemented 
in the kernel PPP protocol can run on both adapter ports.  
If you say 'N', the Multi-Port PPP support will not be 
included in the driver.

Filesystems

/proc filesystem support		(CONFIG_PROC_FS)
   

   
Re-build Linux kernel
---------------------
    
If you never compiled Linux kernel before, please read  
/usr/src/linux/README or ask someone who did for assistance.  
Note that if your machine is slow and/or has little memory, 
re-building Linux kernel may take several hours.

After successfully configuring the kernel using 'make menuconfig' 
perform the following (from /usr/src/linux directory):
 
make dep		:to rebuild source code dependencies,
make clean	:to delete all stale object files,

Note: 
Save your '/usr/src/linux/.conf' file to some other 
location and rename it to (ex: conf_old).  This file 
contains your linux configuration; thus, if you ever have 
to reconfigure a fresh kernel, copy this file back into the 
linux directory, rename it to '.config' and run 'make menuconfig'.

make bzImage 	(2.2.X / 2.4.X kernels) to build new kernel.
or make zImage  	(2.0.X kernels)  to build new kernel.
 			Note:  
'make zImage' will fail if the kernel size is too big.  
Thus, use 'make bzImage'. (for 2.2.x kernels)


IMPORTANT:

Before we proceed to build new modules, it's advisable to 
remove the old, already existing modules.

* Change directory to /lib/modules
* Rename the "kernel_name" directory to "kernel_name.old".  
  (Ex. If we are working with kernel 2.2.14, then rename 
       the 2.2.14 directory to 2.2.14.old)	
* Change directory back to /usr/src/linux.



make modules			to build kernel modules,

make modules_install	to install modules.



Updating LILO
-------------

This section only applies if the kernel was compiled using bzImage or zImage.

After successful compilation, copy the new image usr/src/linux/arch/i386/boot/zImage (or bzImage which ever was compiled)  into the /boot directory and rename it to vmlinuz_2.2.X (where X is the kernel number.)   
(ex. cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.2.14)

Note: 
Before you copy the new kernel into the /boot directory rename the old kernel image in /boot.  (ex. mv vmlinuz-2.2.10 vmlinuz-2.2.10.old)

In /etc directory, edit the lilo.conf file and update the changes. For more info run 'man lilo'.   

lilo		:execute lilo to update the changes to /etc/lilo.conf

When all this is done, reboot your machine to load the new image !!!
 

        

WANPIPE? FOR LINUX(r)			September 24, 2001		        8 of 11

