                                  WANPIPE(tm)

             Multi-protocol WANPIPE Driver for Linux Operating System

                             Wanpipe Version: 2.1.0



                             U S E R'S   M A N U A L



                              Document Version 2.1
 
                                  Sep 30, 1999


                              Author: Nenad Corbic  

                Copyright (c) 1995-1999 Sangoma Technologies Inc.

------------------------------------------------------------------------------
                               C O N T E N T S
------------------------------------------------------------------------------

     Introduction ...............................................

     1. Installing WANPIPE Driver Package .......................

        1.1) Obtaining The Wanpipe Software .....................
        1.2) Choosing the Kernel Version.........................
        1.3) Package Components..................................
        1.4) WANPIPE Driver Setup ...............................
        1.5) Configure Linux kernel..............................
        1.6) Re-build Linux kernel...............................

     2. Configuring WANPIPE......................................

        2.1) PCI Autodetect .....................................
        2.2) Multiple PCI cards .................................
 
     3. Configuring FT1 cards....................................
        3.1) Examples............................................
        3.2) Configuring S508/FT-1 example.......................

     4. Starting and Stopping WAN Router ........................

     5. Using the FPIPEMON,PPIPEMON,CPIPEMON,XPIPEMON monitors ..
	5.1) Local wanpipe access ...............................
        5.2) Back to Back wanpipe access ........................
        5.3) Remote wanpipe access ..............................
	5.4) Wanpipe Security ...................................

     6. Trouble Shooting and Diagnostics ........................
        6.1) Router Initialization Problems......................
        6.2) Router Configuration Problems.......................
        6.3) Router Interface Problem............................
        6.4) Router Table Problem (Cannot PING)..................
        6.5) Sdla Dump Utility..........,........................
        6.6) Proc File System Statistics.........................
        6.7) Line Problems (T1) .........,.......................

     7. Technical Support .......................................

     8. APPENDIX A (fpipemon, ppipemon, cpipemon) ...............
     9. APPENDIX B (samples of /etc/wanpipe#.conf)...............
    10. APPENDIX C (interface details) ..........................
    11. APPENDIX D (startup script details)......................
    12. APPENDIX E (sample of /etc/router.rc)....................
    13. APPENDIX F (sample of /var/log/wanrouter)................
    14. APPENDIX G (configuration of wanpipe#.conf) .............



***************************************************************************
                                INTRODUCTION
***************************************************************************

Wanpipe-2.1.1 release contains new sangoma drivers for both S508 card
and the new S514 PCI card.  Protocols currently supported are 
Cisco HDLC and Frame Relay.  Please note that this version contain number 
of changes to the card configuration process and debuggers. 


Conventions used in this Manual
-------------------------------
     
     Command line syntax conventions used are as follows:

       command   portion of the command line represented as normal
                 text should be entered literally (exactly as printed)

      {argument} portion of the command line enclosed in curly braces
                 represents variable name and should be submitted by
                 the actual object name.

      [option]   portion of the command line enclosed in square brackets
                 is optional and can be omitted. 



*****************************************************************************
1.                      INSTALLING WANPIPE DRIVER PACKAGE
*****************************************************************************



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

WANPIPE Driver package is distributed as a tar archive on a 3.5" diskette or,
optionally, it can be downloaded from the "/pub/linux/current_wanpipe"  
directory located at Sangoma's FTP site (ftp.sangoma.com).  

Note: wanpipe-2.1.0 package supports both 2.0.X and 2.2.X kernels

      2.0.X kernels supported: 2.0.36
      2.2.X kernels supported: 2.2.9, 2.2.10, 2.2.11 and 2.2.12

The latest software is under the following name:

     wanpipe-X.Y.Z.tgz:where    X.Y.Z is a product version number.
                                This archive should always be installed on a
                                CLEAN Kernel (unpatched by WANPIPE Drivers).

     wanpipe_upgrade-X.Y.Z.tgz: where X.Y.Z is a product version number.
                                This archive should be installed on a system
                                that contains a prior (lower) version of
                                WANPIPE Driver.


It is recommended that a WANPIPE Driver package be installed on a Linux 
Kernel that has no prior installation of WANPIPE Drivers unless upgrading from
an earlier version.  

WARNING:  THIS VERSION ONLY SUPPORTS S508/S514 and S508/S514/FT1  cards.  
	  PLEASE CONTACT SANGOMA TECHNOLOGIES INC. IF YOU WANT TO 
          UPGRADE YOUR OLD S502E or S503 CARD.



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

The wanpipe-2.1.0 package supports both 2.0.X and 2.2.X kernels.
Furthermore, it will patch the 2.0.36 kernel and all kernels from
2.2.9 and up.  The wanpipe-2.1.0 package is located on sangoma 
ftp site: ftp.sangoma.com.

    Download the wanpipe-2.1.0 tar ball from the ftp.sangoma.com, 
    pub/linux/wanpipe/ directory.


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

   * Log in as superuser (root) and change your current directory to the 
     root directory by executing 'cd /' command.  

     Note:  that this is the top most directory in the filesystem, 
            NOT the user root home directory (which is usually /root).  
            You can also use the 'su' command to log in as root from any 
            other user account. 

   * Copy the wanpipe tar ball file previously downloaded from Sangoma web 
     page to the / directory and untar it.

        ex:  tar xvfz wanpipe-2.1.0.tgz
  
     The files from this distribution are copied into the 
     /usr/lib/wanrouter/ directory.

   * If you received your distribution on a diskette, insert it into a disk drive
     and execute the following command:

          tar xf /dev/fd0

     Note: The above command assumes that the diskette is in the primary 
           disk drive (known as drive A: in MS DOS).  If you want to use 
           secondary drive (drive B:), substitute 'fd0' for 'fd1'. 


1.3) Package Components
     ------------------

WANPIPE Driver package includes the following components:
     
       o Driver Installation script         (/usr/lib/wanrouter/Setup)
       o Driver Configuration script        (/usr/lib/wanrouter/Configure)
       o Driver start-up script             (/usr/sbin/wanrouter)
       o Driver configuration utility       (/usr/sbin/wanconfig)
       o Driver configuration files         (/etc/wanpipe#.conf and 
                                             /etc/wanrouter.rc)
       o Interface configuration files      (/usr/lib/wanrouter/interfaces/*)
       o Firmware modules for WANPIPE cards (/usr/lib/wanrouter/wanpipe/*) 
       o Kernel patch file                  (/usr/lib/wanrouter/patches)
       o WANPIPE Diagnostic Utilities: 
           Frame Relay Monitor              (/usr/sbin/fpipemon)
           Cisco HDLC Monitor               (/usr/sbin/cpipemon)
           Adapter's Memory Viewer          (/usr/sbin/sdladump)
           FT1 Configuration Utility        (/usr/sbin/cfgft1)



1.4) WANPIPE Driver Setup 
     --------------------

* Make sure that you have a complete, clean kernel source in your /usr/src/linux 
  directory. A kernel source can be downloaded from ftp.us.kernel.org.

* Change current directory to /usr/lib/wanrouter and execute the following command:

        ./Setup

This script will perform the following functions:

        o verify distribution integrity and fix file permissions
        o apply kernel patches  
        o install wanrouter start-up script (if desired)
        o create configuration files 

      
  * Install wanpipe ?  {y / n}  
                       Select yes to install the wanpipe software.
  
  * Install patches ?  {y / n}
                       Select YES to install wanpipe software into the kernel.
		       Note: wanpipe-2.1.0.tgz package is compatible
			     for all 2.0.X, 2.2.X kernels. 
			     (patches are based on 2.2.10 and 2.0.36 kernels) 
                       Select the directory of the linux source, the kernel
                       version will be detected and a proper kernel will be
                       patched.  (Press enter for default: /usr/src/linux)
 
  * Install startup ?  {y / n}
                       If you want the wanrouter to start on boot up select yes.
                       Note: If you are running a RedHat distribution, a 
                             lock file destination in /etc/wanrouter.rc file 
                             must be changed to ROUTER_LOCK=/var/lock/subsys/lock. 


                      
1.5) Configure Linux kernel
     ----------------------

  * Change your current directory to /usr/src/linux: 

        run 'make config' (or make menuconfig' for menu- driven configuration 
                           or 'make xconfig', if you are running X-Windows.)

    Note: If you 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
          question 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).

  * When configuring kernel, MAKE SURE YOU ANSWER NO (i.e. 'n' ) to the
    following questions:

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

  * When configuring kernel, MAKE SURE YOU ANSWER YES (i.e. 'y' ) to the
    following questions:

                                        (CONFIG_EXPERIMENTAL)
        Enable loadable module support  (CONFIG_MODULES)
        Kernel daemon support           (CONFIG_KERNELD)
        Networking support              (CONFIG_NET)
				        (CONFIG_UNIX)
        TCP/IP networking               (CONFIG_INET)
        IP: forwarding/gatewaying       (CONFIG_IP_FORWARD)     2.0.x
        IP: forwarding/getewaying       (CONFIG_PACKET)         2.2.x
        IP: optimize as router not host (CONFIG_IP_ROUTER)
        Sangoma WANPIPE Router          (CONFIG_WAN_ROUTER)  set to "m" in 2.2.X kernels
							     set to "y" in 2.0.X kernel	
        Network device support          (CONFIG_NETDEVICES)
        WAN Drivers                     (CONFIG_WAN_DRIVERS) 
        Vendor Sangoma                  (CONFIG_VENDOR_SANGOMA) set to "m" in 2.2.X kernels
								set to "y" in 2.0.X kernel
        ...
        /proc filesystem support        (CONFIG_PROC_FS)

  * After answering 'y'(for 2.0.X kerels) or 'm' (for 2.2.X kernels) to 
    CONFIG_VENDOR_SANGOMA.  The following configuration options will then 
    be presented:

   NOTE: Wanpipe-2.1.0.tgz release only supports CHDLC and Frame Relay
         protocols !!

   Maximum number of cards
     CONFIG_WANPIPE_CARDS
     Enter number of WANPIPE adapters installed in your machine.  The
     driver can support up to 8 cards.  You may enter more than you
     actually have if you plan to add more cards in the future without
     re-compiling the driver, but remember that in this case you'll waste
     some kernel memory (about 1K per card).

   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.

     
1.6) Re-build Linux kernel
     ---------------------

Note: 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 config' perform the
    following:
 
        run 'make dep'       to rebuild source code dependencies,

        run 'make clean'     to delete all stale object files,

        run 'make bzImage' (2.2.X kernels)  

         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'. 
                                    (usually for 2.2.x kernels)

        run 'make modules'         to build kernel modules,

        run 'make modules_install' to install modules.

  * After successful compilation, copy the new image 
    /usr/src/linux/arch/i386/boot/zImage (or bzImage which ever was compiled)
    into /boot/vmlinuz (ex vmlinuz_2.0.36)
         (ex. cp /usr/src/linux/arch/i386/boot/zImage /boot/vmlinuz-2.0.36)

    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'.   

  * run 'lilo'

When all this is done, reboot your machine and load a new image !!!
                                                      ---



*******************************************************************************
2.                         CONFIGURING WANPIPE    
*******************************************************************************


  Please Read the WANPIPE_CONFIG.txt file in /usr/lib/wanrouter/doc 
  directory.


2.1) PCI Autodetect 
       --------------     
	If you select 0 for your PCISLOT the driver will try 
	to autodetect your PCI card.  This option can only be 
	used with a singe PCI card 


2.2) Multiple PCI cards
       ------------------
	
        For multiple PCI card, the correct slot number must be entered.  
	In order to find out a particular slot number in your PC, each 
        card has to be loaded separately first with the autodetect
        feature.  

        ex: 1. Insert one PCI card into you PC
            2. In wanpipe#.conf set the S514CPU to A or B
                          and set the PCISLOT to  0 (autodetect)
	    3. Start the wanrouter (run 'router start')
	    4. Once the router starts sucessfuly, view the 
               /var/log/messages file.  The driver will print out
               the actual slot number of your PCI card.
	    5. Write down this number !!

	    6. Take out your PCI card (Yes you have to reboot !!)

	    7. Insert the second PCI card into a DIFFERENT PCI slot !
	    8. In wanpipe#.conf set the S514CPU to A or B 
			  and set the PCISLOT to  0 (autodetect)
	    9. Start the wanrouter (run 'router start')
	   10. Once the wanrouter starts sucessfuly, view the 
               /var/log/messages file.  The driver will print out
               the actual slot number of your PCI card.
	   11. Write down this number !!
           
           12. Insert your first PCI card in to the first PCI slot.
               (Yes you have to reboot).

	   13. Now in /etc/wanpipe#.conf 
	
	       wanpipe1:  
			set the S514CPU to the same value as in Step 2, 
               		set the PCISLOT number to the number you wrote down
               		in Step 5.

	       wanpipe2: 
		        set the S514CPU to the same value as in Step 8,
		 	set the PCISLOT number to the number you wrote down
                        in Step 11.

	   14. Restart your router, and both cards should come up.

	   15. For more cards, repeat the process ! 

                		
For More Information refer to appendix G



***************************************************************************
3.                           CONFIGURING FT1 CARDS
***************************************************************************


Check with the T1 provider at what speed your fractional T1 line is set to. 
(ex 64K, 128k ... 1.5M). The fractional T1 is broken down into 24 channels
each 64K. Using the CSU/DSU one configures the line speed by enabling
or disabling channels 1 to 24.  

For example: 64K line       -> enable channel 1  
                               disable 2 to 24
             128K line      -> enable channel 1 and 2  
                               disable 3 to 24
             Full T1 (1.5M) -> enable 1 to 24


The configuration utility 'cfgft1' can be found in /usr/sbin directory.  The
cfgft1 utility first loads the card and then allows the user to  pass 
configuration commands to the adapter.  The following are the options 
needed for loading the card:

     cfgft1 [ -p HexPortNumber ] [ -m HexMemAddr ]

     -p HexPortNumber
        
        The HexPortNumber represents the  IO  port  of  the
        card.   Please  ensure  that  the IO port specified
        matches the jumper settings on the board.  If  this
        option  is  not used then the utility tries to ini-
        tialize the card at  0x360  (factory  default  set-
        ting).

     -m HexMemAddr
  
        The  HexMemAddr  represents  the Memory Address the
        utility uses to configure the  card  at.   If  this
        option  is  not  used  then  the  utility  tries to
        initialize the 0xD0000 memory  area.   Valid  memory
        addresses    are:    0xA0000,0xA2000...0xAE000 
                             0xC0000,0xC2000...0xCE000
                             0xD0000,0xD2000...0xDE000  
                             0xE0000,  0xE2000...

The Sangoma S508/FT-1 DSU has three memory banks:
     1. The factory default.
     2. The user configured bank.
     3. The scratch pad (working memory).

To check the current settings (bank settings), type D0 <ENTER>.  

Configuration changes are made as follows:

     1. Type C <ENTER> to  open  the  configuration mode.
     2. Change the required settings.
     3. After making these changes, type D1 <ENTER> to see the temporary  
        configuration bank.
     4. If these changes are correct, then type W<ENTER> to write the 
        configuration to the non-volatile memory.
     5. Type Q <ENTER> to exit the configuration mode.

     COMMANDS

     +nAdd channel n (where  n is 1-24) to the active list
     -n      Delete channel n (where n is 1-24) from the active list
     M0      Set  framing  mode  to  ESF (ExtendedsuperFrame)
     M1      Set framing mode to D4
     K0      Set encoding mode to B8ZS
     K1      Set encoding mode to AMI
     L0      Set line build out to CSU (0db) or DSX-1 (0-133ft)
     L1      Set line build out to DSX-1 (133 - 266ft)
     L2      Set line build out to DSX-1 (266 - 399ft)
     L3      Set line build out to DSX-1 (399 - 533ft)
     L4      Set line build out to DSX-1 (533 - 655ft)
     L5      Set line build out to CSU (-7.5 db)
     L6      Set line build out to CSU (-15 db)
     L7      Set line build out to CSU (-22.5 db)
     P0      Set clock mode to normal (SLAVE)
     P1      Set clock mode to master (LDM mode only)
     W       Write configuration to non-volatile memory
     F       Get factory default configuration
     Q       Exit configuration mode and move temporary
             (scratch pad) configuration to  default  configuration
     D0      Display actual configuration
     D1      Display configuration in temporary memory
     E0      Unit does not echo commands sent to it
     E1      Unit echos back commands sent to it
     T0      User test modes enabled
     T1      User test modes disabled

     NB:  Whenever  you  have finished your changes, you
          MUST do a WQ in order for them  to  "take".   After
          that do a D0 to check that the changes have, indeed
          been written to permanent memory.


3.1) Examples
     --------

         The following are few examples to illustrate the different
         usage of the cfgft1 command:

         cfgft1 :   This  tries  to  initialize the card at IO port
                    0x360 and memory D0000.

         cfgft1 -p0x350 : This tries to initialize the card at IO port
                          0x350 and memory 0xD0000.

         cfgft1 -m0xE0000 : This tries to initialize the card at IO port
                            0x360 and memory 0xE0000.

         cfgft1 -p0x350 -m0xE0000 : This tries to initialize the card at  
                                    IO  port 0x350 and memory 0xE0000.

3.2) Configuring S508/FT-1 example.
     -----------------------------  

           Required configuration:  
                       Channels  1-3  disabled, 
                       Channels 22 and 23 enabled 
                       Line build set to  DSX-1 (399 - 533ft) ESF 
                            framing mode Clock mode to normal 
     
               Type: C-1-2-3+21+22K0L3M0P0D1WQ<ENTER>

                              OR

               C<ENTER>       Open configuration mode
               -1-2-3<ENTER>  Remove channels 1, 2 and 3 from the active list
               +21+22 <ENTER> Add channels 21 and 22 to the active list
               K0<ENTER>      Set the encoding mode to B8ZS
               L3<ENTER>      Set the line build out to DSX-1 (399 - 533ft)
               M0<ENTER>      Set the framing to ESF
               P0<ENTER>      Set the clock mode to normal
               D1<ENTER>      Display the temporary configuration before saving
               W<ENTER>       Update the user memory
               Q<ENTER>       Close the configuration mode

               If you are adding or removing many D0 channels, break up the 
               command into 2 or more commands, as the command line buffer has
               limited length.  For instance, to drop the line speed to 128kbps
               you need to remove  channels 3 to 24.
              
               Do:

               C<ENTER>
               -3-4-5-6-7-8-9-10-11<ENTER>
               -12-13-14-15-16-17-18-19-20-21-22-23-24<ENTER>
               WQ<ENTER>
               D0<ENTER>

               and the  correct  configuration  should  be  shown.  

        ALSO PLEASE REBOOT THE MACHINE AND RUN CFGFT1 UTILITY 
        AGAIN WITH D0 COMMAND TO VERIFY THE  CONFIGURATION.


***************************************************************************
4.                    STARTING AND STOPPING WAN ROUTER
***************************************************************************

Start the wanrouter: 

      run 'wanrouter start' at the command prompt. 

Stop the wanrouter:  

      run 'wanrouter stop'  at the command prompt.

*** For more information regarding 'wanrouter' script operations 
    please refer to APPENDIX D. ***



**************************************************************************
5.             USING THE FPIPEMON and CPIPEMON MONITORS
**************************************************************************

Included with the Wanpipe drivers are three UDP management monitors.

fpipemon : for Frame Relay protocol.
cpipemon : for CHDLC protocol.

You must be superuser (root) to run these monitors. 

Command line Usage:  invoke command on prompt (ex 'fpipemon')

Note: The UDP management port to be utilized can be configured 
      with the UDPPORT option in the wanpipe#.conf configuration file.

The monitor talks to the driver through a special UDP packet like an intelligent ping. 
All that is required for the monitor to work is that the UDP packets must get
into the driver, and that the machine with the monitor must be reachable.
You can therefore run the monitor to get user statistics from any machine
that is  network connected to the Sangoma host.

For example, on the network below, assume that the link FR is supported by two 
Sangoma cards.
                                                 LAN
          --- fr2    FR      fr1 ---  eth0      ?????  eth1  ---
         | A |------------------| B |-----------?????-------| C |
          ---    wanpipe link    ---            ?????        ---
   IP: 201.1.1.1        201.1.1.2    192.168.1.5        192.168.1.4
   UDP PORT: 9000          9001         

   Network Interfaces:  Machine A = fr2
 			Machine B = fr1 and eth0
			Machine C = eth1

* There are two ways of acessing a WANPIPE card: 
	1. Access to the local wanpipe card 		(From B to B)
        2. Access to the back to back wanpipe card 	(From B to A)
 	3. Access to the remote wanpipe card 		(From C to B)


5.1) Wanpipe access on a Local Machine
     ---------------------------------

  Location of the wanpipe card: Machine B
  User is logged in to: 	Machine B
  Use the monitor to :          Check the modem status of card on Machine B
  Local Network interface:      fr1  (Local IP 201.1.1.2)

     	The command would be

        ex1: fpipemon -i fr1 -u 9001 -c xm   
     OR:
        ex2: fpipemon -i 201.1.1.1 -u 9001 -c xm


  It is recomended that the network interface name is used for the LOCAL
  and back to back board access.

  Note that the IP address used is the address of Machine A, not the local
  machine B.  The reason for this, is packet with a local IP address will not reach
  the driver.  Thus remote address must be used, to get the packet to the driver
  its the UDP Port that determines if the request is for the local board or the
  board on the other end.

  The UDP Port MUST be defined in /etc/rotuer.conf

5.2) Back to Back access
     -------------------

  In the example above Machine A and Machine B are connected back to back
  using sangoma wanpipe cards. 

  Location of the wanpipe card: Machine A
  User is logged in to: 	Machine B
  Use the monitor to :          Check the card modem status on Machine A
  Local Network interface:      fr1  (Local IP 201.1.1.1)
 
  	ex1: fpipemon -i fr1 -u 9000 -c xm 
	ex2: fpipemon -i 201.1.1.1 -u 9000 -c xm

  Note, that the only difference is the UDP Port !!


5.3) Remote wanpipe access
     ---------------------

  In order to remotely access a wanpipe cards, there must exist a route
  between the local computer and the remote computer which contains the
  card.  The two computers can be separated by a LAN or internet.
 
  Location of the wanpipe card: Machine B
  User is logged in to: 	Machine C
  Use the monitor to :          Check the modem status of card on Machine B
  Local Network interface:      eth1  (Local IP 192.168.1.4)

	ex2: fpipemon -i 201.1.1.1 -u 9001 -c xm



The UDP based monitoring system make the monitors 
extremely versatile.  For example, you may monitor Sangoma cards installed
in non-Linux systems.  In the same way you can monitor the Linux cards from
non-linux systems (provided you have the monitors for that platform). And you can 
do it from anywhere in the world.


5.4)  SECURITY
      --------

Security considerations for the monitors is handled as follows:

1.  You can simply turn them off by setting the UDP PORT to 0 in wanpipe#.conf.
2.  Certain operations are only allowed from "above". For instance, you can only 
run the traces from above the stack. Any commands that can change the state 
of the link (such as testing the DSU/CSU) are only allowed from above the stack.

You can set the TTL for the replies to the UDP packets in wanpipe#.conf. So for 
instance, if you set the TTL to 2, only users immediately connected to the
Host will be able to receive results.

Refer to APPENDIX A for usage and options for fpipemon and cpipemon.


*****************************************************************************
6.                      TROUBLE SHOOTING AND DIAGNOSTICS
*****************************************************************************


If you encounter errors during installation and/or start-up, try to determine
which command, utility or process causes the error.  Carefully record and
examine all warnings and error messages.  Read appropriate section of this
manual again and make sure you have not missed anything important. 

MAN PAGES ARE ALSO AVAILABLE ON TOPICS LIKE: 
       wanrouter, wanpipe#.conf, sdladump, cfgft1, 
       fpipemon, and cpipemon.

**** Consult the FAQ on Sangoma Web Page www.sangoma.com ****


6.1 Router Initialization Problems
    ------------------------------

* When WAN Router start-up is complete, all WAN devices defined in the [devices]
  section of /etc/wanpipe#.conf file should appear in the /proc/net/router 
  directory.  

* Similarly, all network interfaces defined in the [interfaces] section 
  should appear in the /proc/net/dev directory (provided that corresponding 
  WAN device was successfully configured).  


If some of the devices and/or interfaces are missing, then verify 
configuration file and check '/var/log/wanrouter' and '/var/log/messages' files
for error messages and/or warnings.
Refer to the APPENDIX F for a sample of /var/log/wanrouter and 
/var/log/messages files. 


WANPIPE Driver logs extensive diagnostics during its initialization into
the system log file.  To monitor logged system messages use the following
command:

        tail -f /var/log/messages

You can watch for any errors and/or warnings during WANPIPE loading and 
initialization.



6.2 Router Configuration Problems
    -----------------------------

To verify WAN device configuration, use Config and Status pseudo-files found
in /proc/net/wanrouter directory.  Doing 'cat' on these files reveals current
device state and configuration.  The sample output is shown below:

        cat /proc/net/wanrouter/Config

 Device name | port |IRQ|DMA|mem.addr|mem.size|option1|option2|option3|option4
 wanpipe2    |0x364 |  5|  0|0xEC000 |0x2000  |   5030|   7200|  65536|   6200
 wanpipe1    |0x300 | 12|  0|0xEE000 |0x2000  |   5080|  16000| 131072|   5800

        cat /proc/net/wanrouter/Status

 Device name |station|interface|clocking|baud rate| MTU |ndev|link state
 wanpipe2    | DCE   | RS-232  |external|    56000| 1600|  2 |connected
 wanpipe1    | DTE   | RS-232  |external|    56000|  256|  2 |connecting


To obtain device statistics, do 'cat' on WAN device entry in /proc/net/wanrouter
directory as follows:

        cat /proc/net/wanrouter/{device}

      total frames received:    0
     receiver overrun errors:   0       Number of receiver overrun errors
                  CRC errors:   0       Number of receiver CRC errors
        frame length errors:    0       Number of frames discarded due to
                                        frame being too long


         frame format errors:   0       Number of times receiver was halted due
                                        to full buffers
     aborted frames received:   0       Number of abort frames received
     receive frames dropped:    0       Number of frames dropped
        other receive errors:   0       Number of frames discarded due to errors

   total frames transmitted:    0
  aborted frames transmitted:   0       Number of abort frames transmitted
     transmit frames dropped:   0       Number of frames dropped
         transmit collisions:   0       Number of frames failed to transmit
                                        due to device busy 
       other transmit errors:   0       Number of frames failed to transmit
                                        due to buffer/other constraints.


6.3) Router Interface Problem
     -------------------------

To verify TCP/IP configuration of WAN interfaces, use Linux' ifconfig and
route utilities.  Interface status and statistics can be viewed with

'ifconfig {interface}' command.  The output should look similar to this:

        wan0    Link encap:UNSPEC       HWaddr (whatever)
                inet addr:<your_ip_addr> P-t-p:<other_ip_addr> Mask:<netmask>
                UP POINTOPOINT RUNNING  MTU:1500  Metric:1
                Rx packets:0 errors:0 dropped:0 overruns:0
                Tx packets:0 errors:0 dropped:0 overruns:0
                Interrupt:9 Base address:0x360 Memory ee000-effff


The interface name will be the one that was defined in /etc/wanpipe#.conf 
[interfaces] section.  If this interface doesn't show up, after wanrouter start
(check using ifconfig) a mistake was made while configuring the wanrouter.

  . Make sure that interface name in /etc/router.con [interfaces] section
    is the same as the file name in /usr/lib/wanrouter/interfaces/{name}

      ex. /etc/wanpipe#.conf

          [interfaces]
             ppp0 = wanpipe1, ,WANPIPE
          
          /usr/lib/wanrouter/interfaces/ppp0

  . Make sure all fields are correct in /usr/lib/wanrouter/interfaces/{name} file. 
    Refer to section 2.2. 



6.4) Router Table Problem (Cannot PING)
     ---------------------------------- 

View routing table by typing 'route' at the command prompt and make sure that
routes to all remote networks and hosts exist.  The output should look similar
to this:

        Destination     Gateway Genmask         Flags   Window  Use     Iface
        <other_ip_addr> *       255.255.255.0   UH      0       0       wan0

If all the above looks ok, you should be able to ping remote host.  If pings
are not getting through, try to determine which part of the connection fails.
There can be at least four possibilities:

        o pings are not being transmitted by the local machine
        o pings are not being received by the remote machine
        o pings are not being replied to by the remote machine
        o replies are not being received by the local machine

Quite often you can tell which part of the connection is not functioning by
simply looking at the interface statistics output by the ifconfig utility at
both local and remote machines.



6.5)  Sdla Dump Utility
      -----------------

A debugging utility, sdladump, is also included with the distribution which 
allows viewing adapter local memory in hexadecimal dump format during run-time.
Its command line syntax is:


        sdladump {device} [{offset} [{length}]]

where:  {device}        name of the WANPIPE adapter, as it appears in the
                        /proc/net/wanrouter/directory, e.g. wanpipe1

        {offset}        adapter local memory address.  Default is 0

        {length}        size of the adapter memory area to be dumped.  Default
                        is 256 bytes (0x100)

Note that adapter must be configured before you can use sdladump utility.



6.6) Proc File System Statistics
     ---------------------------

Another useful debugging utility is the proc file system. You can use the 
following command :

     cat /proc/net/dev

to get the information about your interface.  Following is a sample display for
the command above:

Inter-|   Receive                  |  Transmit
 face |packets errs drop fifo frame|packets errs drop fifo colls carrier
    lo:      0    0    0    0    0        0    0    0    0     0    0
  eth0:  40579    0    0    0    0     1534    0    0    0     1    0
  ppp0:1968973    0    0    0    0  1969002 2221    0    0  4266    0

In this case ppp0 is the interface built using WANPIPE.  This information
gives you how the driver for your device is behaving.  Following is the 
explanation of the heading used:

       packets : States the number of TX/RX packets
       errs:     States the number of TX/RX retries, NOT ERRORS.  In this
                 case, the packet was not sent and will be retried.
       drop:     States the number of TX/RX dropped packets.  This                 
                 occurs when the link (interface) is down and application 
                 is trying to transmit.  
       fifo:     Not used by WANPIPE
       colls:    States the number of TX/RX collisions.  This means
                 that the device was busy and the packet will be
                 retried.
       carrier: Not used by WANPIPE


6.7)  Line Problems  (T1) 
      -------------------

See www.sangoma.com/linedebug.htm.

READ THE MAN PAGES FOR : fpipemon and cpipemon !!!



****************************************************************************
7.                             TECHNICAL SUPPORT
****************************************************************************

If you are unable to diagnose and/or fix a problem yourself, you can ask
Sangoma Technologies Inc. for technical support via fax or e-mail:

        FAX:    (905)474-9223
        E-mail: ncorbic@sangoma.com or dm@sangoma.com

When sending your request, please provide us with the following information:


        o Detailed description of the problem
        o System type (CPU, speed, RAM size)
        o Linux kernel version number
        o WANPIPE driver version number
        o Adapter type
        o Communications link type and parameters (e.g. line speed)
        o Interface type (RS-232/V.35), DSU/CSU type (if any), etc.
        o Contents of the following files:
                /etc/router.rc
                /etc/wanpipe#.conf
                /var/log/wanrouter
                /var/log/messages
                /usr/lib/wanrouter/interfaces/*
       o Output of the following commands
                cat /proc/interrupts
                cat /proc/ioports
                cat /proc/net/dev
                cat /proc/net/wanrouter/Config
                cat /proc/net/wanrouter/Status
                cat /proc/net/wanrouter/{device}
                ifconfig {interface}
                route

All requests for technical support are normally replied to within 24 hours
(excluding weekends and holidays).


*****************************************************************************
8.                               APPENDIX A
*****************************************************************************


8.1) FPIPEMON Debugger
     -----------------  

fpipemon -i <ip-addr or interface> -u <port> -c <command> -d <dlci num>

	Option -i: 
		Wanpipe remote IP adderss or
		Wanpipe network interface name (ex: fr16)
	Option -u: 
		Wanpipe UDPPORT specified in /etc/wanpipe#.conf
	Option -d: 
		DLCI Number: (optional) defaults to 0 
	Option -c: 
		Fpipemon Command
			First letter is a command and the rest are options:
			ex: xm = View Modem Status

	Supported Commands: x=status : s=statistics : t=trace 
	                    c=config : T=FT1 stats  : f=flush

	Command:  Options:   Description 
	-------------------------------- 

	Card Status
	   x         m       Modem Status
	             l       Link Status
	             ru      Display Router UP time
	Card Configuration
	   c         l       List Active DLCIs
	Card Statistics
	   s         g       Global Statistics
	             c       Communication Error Statistics
	             e       Error Statistics
	             d       Read Statistics for a specific DLCI
	Trace Data 
	   t         i       Trace and Interpert ALL frames
	             ip      Trace and Interpert PROTOCOL frames only
	             id      Trace and Interpert DATA frames only
	             r       Trace ALL frames, in RAW format
	             rp      Trace PROTOCOL frames only, in RAW format
	             rd      Trace DATA frames only, in RAW format
	FT1 Configuration
	   T         v       View Status 
	             s       Self Test
	             l       Line Loop Test
	             d       Digital Loop Test
	             r       Remote Test
	             o       Operational Mode
	Driver Statistics
	   d         s       Display If_Send Driver Statistics
	             i       Display Interrupt Driver Statistics
	             g       Display General Driver Statistics
	Flush Statistics
	   f         g       Flush Global Statistics
	             c       Flush Communication Error Statistics
	             e       Flush Error Statistics
	             i       Flush DLCI Statistics
	             d       Flush Driver Statistics
	Examples:
	--------

	ex: fpipemon -i fr16 -u 9000 -c xm       :View Modem Status 
	ex: fpipemon -i 201.1.1.2 -u 9000 -c ti  :Trace and Interpert ALL frames
	ex: fpipemon -i fr17 -u 9000 -c sd -d 16 :Statistics for DLCI 16 


8.2) CPIPEMON
     --------

cpipemon -i <ip-address or interface name> -u <port> -c <command>

	Option -i: 
		Wanpipe remote IP adderss must be supplied
		<or> Wanpipe network interface name (ex: chdlc0)
	Option -u: 
		Wanpipe UDPPORT specified in /etc/wanpipe#.conf
	Option -c: 
		Debug Command 
			First letter represents a command while the rest 
                        are options:
			ex: xm = View Modem Status

	Supported Commands: x=status : s=statistics : t=trace 
	                    c=config : T=FT1 stats  : f=flush

	Command:  Options:   Description 
	-------------------------------- 

	Card Status
	   x         m       Modem Status
	             l       Link Status
	             cv      Read Code Version
	             ru      Display Router UP time
	Card Configuration
	   c         rc      Read CHDLC Configuration
	Card Statistics
	   s         g       Global Statistics
	             c       Communication Error Statistics
	             o       Operational Statistics
	             s       SLARP and CDP Statistics
	Trace Data 
	   t         i       Trace and Interpert ALL frames
	             ip      Trace and Interpert PROTOCOL frames only
	             id      Trace and Interpert DATA frames only
	             r       Trace ALL frames, in RAW format
	             rp      Trace PROTOCOL frames only, in RAW format
	             rd      Trace DATA frames only, in RAW format
	FT1 Configuration
	   T         v       View Status 
	             s       Self Test
	             l       Line Loop Test
	             d       Digital Loop Test
	             r       Remote Test
	             o       Operational Mode
	             p       FT1 CSU/DSU operational statistics
	             f       Flush FT1 CSU/DSU operational statistcs
	Flush Statistics
	   f         g       Flush Global Statistics
	             c       Flush Communication Error Statistics
	             o       Flush Operational Statistics
	             s       Flush SLARP and CDP Statistics
	Examples:
	--------

	ex: cpipemon -i chdlc0 -u 9000 -c xm     :View Modem Status 
	ex: cpipemon -i 201.1.1.2 -u 9000 -c ti  :Trace and Interpert ALL frames


 


***************************************************************************
9.                                APPENDIX B
***************************************************************************


For samples of WANPIPE configuration files check,
/usr/lib/wanrouter/samples directory.



*********************************************************************************
10.                                APPENDIX C
*********************************************************************************


Interfaces  /usr/lib/wanrouter/interfaces/{name}

10.1) Dynamic IP Addressing on FRAME RELAY
      ---------------------------------

      The WANPIPE driver for Frame-relay supports INVERSE ARPS.  Inverse arp packets 
      report to the remote end its point-to-point address.  Please refer to RFC 1293
      for explanation on Inverse ARP.   If you do not know the point-to-point ip 
      address, then leave the POINTOPOINT field blank.  In this case IF THE REMOTE
      END IS SENDING inverse arps then the frame relay driver will reply to the ARPs
      and add the route.   The local IP and the remote IP reported by Inverse 
      Arp packets must be on the same sub net for the WANPIPE driver to respond 
      to them and add routes. 

10.2) Dynamic IP Addressing on CHDLC
      ---------------------------

      For Cisco HDLC, SLARP packets are used to discover both local and point-to-point
      addresses.  If your interface is configured to send SLARP requests, then set 
      the IPADDR to 0 and leave the POINTOPOINT field blank. If you don't want to
      send SLARP requests, then you MUST set your local IP address (IPADDR field) and
      POINTOPOINT field.  Please note that whenever SLARP requests are used, the host 
      portion of both the local and point-to-point addresses must be either 1 or 2 
      (ie: 192.168.39.1 or 204.1.2.2).
     




******************************************************************************
11.                              APPENDIX D 
******************************************************************************


11.1) Startup Script 'router {start | stop}'
      --------------------------------------

The start-up script will first read meta-configuration file /etc/router.rc to
set up its operational environment.  Then it will check to see if router lock
file already exists (/var/lock/router).  If it does, then the start-up script 
will assume that the router is already running and terminate with the following
message: "Router is already running. Stop it first!".

Next, the start-up script will load the wanpipe driver listed in the WAN_DRIVERS
variable in the /etc/router.rc file using Linux' modprobe utility.  This will
automatically load the router module (router.o) and other necessary kernel 
modules (sdladrv.o).  Note that modprobe relies on module dependencies being 
up-to-date.  If router module or some other modules don't load, you may try to 
re-build module dependencies with 'depmod -a' command.

When all drivers are loaded, the start-up script runs wanconfig utility
to configure the wanpipe drivers and create network interfaces.  The 
configuration file used by wanconfig is defined by the ROUTER_CONF variable in 
the /etc/router.rc file which is /etc/wanpipe#.conf.  The results of the 
configuration are stored in the router log file (/var/log/router).

And finally, the start-up script configures network interfaces (TCP/IP level)
and sets up static routes using Linux' ifconfig and route utilities.  When
doing so, it uses configuration files found in /usr/lib/wanrouter/interfaces
directory.  These files can be created manually or using router configuration
script (Configure script) as described in previous section.  Depending on your
needs you can have the router add and remove routes for you. 

When router is shut down with 'router stop' command, the start-up script
shuts down all network interfaces, then unloads the wanpipe drivers, thus 
returning system to its initial state.


************************************************************************************
12.                                APPENDIX E
************************************************************************************

Default router.rc 
-----------------------------------------------------------------------------
#!/bin/sh
# router.rc     WAN router meta-configuration file.
#
#               This file defines variables used by the router shell scripts
#               and should be located in /etc directory.  These are:
#
#               ROUTER_BOOT=            Boot flag (YES/NO).
#               ROUTER_CONF=            Router configuration file.
#               ROUTER_LOG=             Where to put start-up log file.
#               ROUTER_LOCK=            File used as a lock.
#               WAN_DRIVERS=            List of WAN drivers.
#
#               Note:   This file is 'executed' by the shell script, so
#                       the usual shell syntax must be observed.
ROUTER_BOOT=YES
ROUTER_CONF=/etc/wanpipe#.conf
ROUTER_LOG=/var/log/router
ROUTER_LOCK=/var/lock/router
WAN_DRIVERS="wanpipe"
------------------------------------------------------------------------------

The following variables are defined in the meta-configuration (/etc/router.rc) 
file:

    ROUTER_BOOT
        Defines whether to start router (YES) or not (NO).  It is useful if
        you want to prevent router from starting without unlinking start-up
        script or altering main configuration file.
        Default is ROUTER_BOOT=YES

    ROUTER_CONF
        Defines name and location of the main router configuration file.
        Default is ROUTER_CONF=/etc/wanpipe#.conf

    ROUTER_LOG
        Defines name and location of the router start-up log file.  Log file
        is created by the router start-up script and can be used to
        troubleshoot router configuration.
        Default is ROUTER_LOG=/var/log/router

    ROUTER_LOCK
        Defines name and location of the router lock file.  Lock file is
        created by the start-up script when the router is started and removed
        when it is stopped.
        Default is ROUTER_LOCK=/var/lock/router

    WAN_DRIVERS
        Lists WAN driver to be loaded by the start-up script.  Note, that the
        list must be enclosed in double-quotes and driver names must be
        separated by a space character.
        Default is WAN_DRIVERS="wanpipe"


***********************************************************************************
13.                                  APPENDIX F
***********************************************************************************

Here is a sample contents of the WAN Router log file:  /var/log/router

        Tue Jan  7 15:17:31 EST 1997: starting WAN router
        Loading driver wanpipe ... ok
        WAN Router Configurator. v1.0.0 (c) 1995-1996 Sangoma Technologies Inc.
         * Parsing configuration file /etc/wanpipe#.conf ...
         * Reading section [devices]...
         * Reading section [wanpipe1]...
         * Reading section [interfaces]...
         * section [pvc1] not found!
         * Reading section [svc1]...
         * Configuring device wanpipe1 (Datapac X.25 link)
         * Setting IOPORT to 0x300
         * Setting IRQ to 12
         * Reading 26636 bytes from /home/firmware/x25_508.sfm ...
         * Setting INTERFACE to RS232
         * Setting CLOCKING to External
         * Setting BAUDRATE to 56000
         * Setting MTU to 256
         * Setting STATION to DTE
         * Setting LOWESTPVC to 1
         * Setting HIGHESTPVC to 5
         * Setting LOWESTSVC to 6
         * Setting HIGHESTSVC to 10
         * Setting HDLCWINDOW to 7
         * Setting PACKETWINDOW to 2
         * Setting CCITTCOMPAT to 1988
         * Configuring channel pvc1 (Branch office). Media address: 1
         * Configuring channel svc1 (Branch office). Media address: @123456
         * Setting IDLETIMEOUT to 90
         * Setting HOLDTIMEOUT to 10



***********************************************************************************
14.                             APPENDIX   G
***********************************************************************************         

14.1)   Edit [devices] section 
        ~~~~~~~~~~~~~~~~~~~~~~ 
 
     WANPIPE devices are named 'wanpipeN', where N is 1 to 8.  PLEASE NOTE: IF 
     YOU ONLY HAVE ONE CARD, USE wanpipe1. 
     For each adapter installed add a line to the [devices] section as follows: 
 
        wanpipeN={config_id},{description} 
 
       {config_id}  is one of the following: 
                         WAN_FR,     for frame relay link 
                         WAN_CHDLC,  for Cisco HDLC link 
      
     {description}   optional description string 
 
     For example: 
 
         wanpipe1=WAN_FR,    frame relay link 
         wanpipe2=WAN_CHDLC, Cisco HDLC link port PRI
	 wanpipe3=WAN_CHDLC, Cisco HDLC link port SEC 
 
 
14.2) Edit [interfaces] section 
      ~~~~~~~~~~~~~~~~~~~~~~~~~    
 
     This section defines the Network interfaces created in  
     /usr/lib/wanrouter/interfaces/ directory.  
     For each interface defined add a line to the [interfaces]  
     section as follows: 
      
     {name} = {device},{media_addr},{used_by},{description} 
      
      {name}        name of the interface defined in  
                    (/usr/lib/wanrouter/interfaces/)  
      
      {device}      name of the device (from the [devices] section) 
                    this interface is associated with 
      
      {media_addr}  media address for this logical channel, if 
                    applicable. (ex DLCI number in Frame Relay)
      
      {used_by}     interface to be used by WANPIPE or API. 
 
                    For interfaces on Frame Relay, PPP, Cisco HDLC 
                    and X25 set this to WANPIPE.   
                     
                    For interfaces on BiSync Streaming and HDLC  
                    (LAPB) set this to API. 
 
      {description} description of this interface (optional) 
 
     Media address syntax is device and media specific.  The convention   
     is as follows: 
 
     --------------------------------------------------------------------- 
     Media type                      | Media address 
     --------------------------------+------------------------------------ 
     X.25 permanent virtual circuit  | PVC number in decimal notation 
                                     | 
     X.25 switched virtual circuit   | '@' character followed by the X.25 
                                     | destination address in decimal 
                                     | notation 
                                     | 
     Frame relay permanent virtual   | DLCI number in decimal notation 
        circuit                      | 
                                     | 
     --------------------------------------------------------------------- 
      
     For example: 
 
        wan2 = wanpipe2, 16, WANPIPE, frame relay connection to the office 3 
        wan3 = wanpipe2, 17, WANPIPE, frame relay connection to ISP 
         
        < no media address is used > 
	chdlc0 = wanpipe3, ,WANPIPE, Chdlc link on PRI port
        chdlc1 = wanpipe4, ,WANPIPE, Chdlc link on SEC port
 
 
 
14.3) Edit private configuration section 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
      
     For each WANPIPE device defined in the [devices] section create a  
     section with the same name, i.e. for the device wanpipe1 create a 
     section [wanpipe1], for the device wanpipe2 create a section  
     [wanpipe2] and so on. 
 
     This section includes all the card specific parameters with additional  
     protocol specific parameters if applicable.  With this section you 
     can configure all the WANPIPE cards.   
 
     However for the FT1 boards you MUST also configure them using the  
     FT1 CONFIGURATION UTILITY ( called cfgft1 in /usr/sbin/ directory ) 
  
     The following explains the keywords used in device private configuration 
     section and states whether they are mandatory or optional. It also  
     states which keywords are protocol specific.  

     Note: S514CPU and PCISlot are to be used for new S514 PCI boards and
           IOport and IRQ are to be used for old S508 boards.  They must
           not be used together in a wanpipe definition in wanpipe#.conf. 


     S514CPU 
	  The new PCI cards contain dual CPU's, where each cpu
	  can support a different protocol.  Thus its like
          having two cards in one.  (s514 Only)

     PCISlot 
	  The new S514 cards work on a PCI bus. Thus a correct
          PCI slot number must be selected.  The autodetect
          functions makes this process painless. Moreover, S514
          PCI cards use interrupt sharring, thus IRQ value is
          not needed.  (s514 Only)

     IOPort 
          Adapter's I/O port address.  Make sure there is no 
          conflict. (Mandatory for all cards and protocols) This 
          address has to be similar to the value set by the  
          jumpers on the board.  (s508 Only)
 
     IRQ 
          Adapter's interrupt request level.  Make sure there is 
          no conflict. (Mandatory for all cards and protocol)  
          These are software set. (s508 Only)
 
     MemAddr 
          Address of the adapter shared memory window.  
          If commented out the memory address is determined 
          automatically. (Optional) 
 
     Firmware 
          Name of the adapter firmware (including path). 
                        (Mandatory for all cards) 
      
        FRAME RELAY 
             /usr/lib/wanrouter/wanpipe/fr508.sfm  
      
        PPP 
             /usr/lib/wanrouter/wanpipe/ppp508.sfm 
 
        X25 
             /usr/lib/wanrouter/wanpipe/x25_508.sfm 
 
        CISCO HDLC 
             /usr/lib/wanrouter/wanpipe/cdual508.sfm 
 
        BiSYNC STREAMING 
            /usr/lib/wanrouter/wanpipe/bstrm502.sfm 
 
        HDLC (LAPB) API 
            /usr/lib/wanrouter/wanpipe/hdlc508.sfm 
 
 
     Interface 
                 Physical interface type. Available options (508 cards) are: 
                      o RS232   RS-232C interface (V.10) 
                      o V35     V.35 interface (V.11/RS-422/RS-485/X.21) 
 
                        DOES NOT APPLY TO FT1 CARDS. 
                        DOES NOT APPLY TO BiSYNC STREAMING API. 
                        DOES NOT APPLY TO HDLC (LAPB) API. 
 
      
     Clocking 
               Source of the adapter transmit and receive clock  
               signals.  Available options are: 
 
               External:  Clock is provided externally (e.g. by  
                          the modem or CSU/DSU).  Use this for FT1 boards. 

               Internal:  Clock is generated on the adapter. 
                          When there are two Sangoma Cards back 
                          to back set clocking to Internal on one 
                          of the cards. 
      
                          DOES NOT APPLY TO BiSYNC STREAMING API. 
                          DOES NOT APPLY TO HDLC (LAPB) API. 

	       Note: Jumpers must be set for internal or external 
                     clocking for RS232 commuincation on:
			 s508 board: RS232 SEC port
		         s514 board: RS232 PRI and SEC port
 
     BaudRate 
               Data transfer rate in bits per second.  These values 
               are meaningful if internal clocking is selected.  
               (like in a back-to-back testing configuration) 
 
      
           FRAME RELAY/PPP  
 
           Typical values are: 
                     9600            9.6 kbps 
                    19200           19.2 kbps 
                    38400           38.4 kbps 
                    56000           56   kbps 
                    64000           64   kbps 
                   128000          128   kbps 
                  1544000            1.544 Mbps (T-1) 
                  2048000            2     Mbps (E-1) 
           X25 
 
           Typical values are: 
                     9600            9.6 kbps 
                    19200           19.2 kbps 
                    38400           38.4 kbps 
                    56000           56   kbps 
                    64000           64   kbps 
                   128000          128   kbps 
 
           DOES NOT APPLY TO BiSYNC STREAMING API. 
           DOES NOT APPLY TO HDLC (LAPB) API. 
 
     MTU 
          Maximum transmit unit size (in bytes).  This value  
          limits the maximum size of the data packet that can be  
          sent over the WAN link, including any encapsulation  
          header that router may add.  
 
          FRAME RELAY 
             The maximum MTU size supported 
             by the adapter is 4096 bytes. 
             Default value is 1500. 
      
          X25 
             This value defines the maximum size of  
             the X.25 data packet.  Available options 
             are: 
                64, 128, 256, 512, 1024 
 
             Note that X.25 driver provides for  
             packet fragmentation, so that MTUs 
             of the network interfaces using X.25  
             link can be as large as needed 
      
          PPP 
             The MTU value specified is used for  
             Local Maximum-Receive-Unit(MRU) 
             /MTU and Minimum Remote MRU.   
             Recommended value for PPP is 1500. 
      
          CISCO HDLC 
             The MTU value specified is used for 
             Maximum length of the Cisco HDLC data 
             field.  Range is 300 - 15354.   
             Recommended value is 1500. 
      
          DOES NOT APPLY TO BiSYNC STREAMING API. 
          DOES NOT APPLY TO HDLC (LAPB) API. 
 
 
     UDPPORT 
 
          The UDP port to be used for UDP management by the  
          monitor (explained later).  The monitor utilities like 
          fpipemon, cpipemon and ppipemon should refer to the udpport defined 
          here. 
 
     Station 
 
          FRAME RELAY 
              This parameter specifies whether the  
              adapter should operate as a Customer  
              Premises Equipment (CPE) or emulate a  
              frame relay switch (Access Node).   
              Available options are: 
                   CPE     CPE mode (default) 
                   Node    Access Node (switch emulation  
                                        mode) 
      
          PPP 
              Does not Apply. 
      
          X25 
              This parameter defines whether the  
              adapter should operate as a Data 
              Terminal Equipment (DTE) or Data  
              Circuit Equipment (DCE).  Normally, 
              you should select DTE mode.  DCE mode  
              is primarily used in back-to-back  
              testing configurations. Available  
              options are: 
                   DTE     DTE mode (default) 
                   DCE     DCE mode 
      
          DOES NOT APPLY TO BiSYNC STREAMING API. 
          DOES NOT APPLY TO HDLC (LAPB) API. 
 
     TTL 
          This keyword defines the Time To Live for a UDP 
          packet used by the monitoring system.  The user can  
          control the scope of a UDP packet by associating a  
          number that decrements with each hop. 
 
      
          FRAME RELAY 
               Any value between 0 to 255. 
      
          PPP 
               Any value between 0 to 255. 
      
          X25 
               Currently not implemented. 
      
          DOES NOT APPLY TO BiSYNC STREAMING API. 
          DOES NOT APPLY TO HDLC (LAPB) API. 
      
     IPX 
          This parameter either enables or disables the use 
          of IPX data.  YES or NO (default) is allowed.  (See  
          also wanpipe.ipx) 
 
      
          FRAME RELAY 
               Supported for one channel. 
      
          PPP 
               Supported. 
      
          CISCO HDLC 
               Does not apply. Only used for IP 
 
          X25 
               Supported for one channel. 
      
          DOES NOT APPLY TO BiSYNC STREAMING API. 
          DOES NOT APPLY TO HDLC (LAPB) API. 
      
     NETWORK 
 
          This parameters specifies the IPX Network Number.  Can 
          be any unique 8 digit hexadecimal number. The default 
          is 0xDEADBEEF.  (See also wanpipe.ipx) 
 
          FRAME RELAY 
               Supported for one channel. 
       
          PPP 
               Supported. 
      
          CISCO HDLC 
               Does not apply. 
 
          X25 
               Supported for one channel. 
      
          DOES NOT APPLY TO BiSYNC STREAMING API. 
          DOES NOT APPLY TO HDLC (LAPB) API. 
 
     Signalling  
        
          *****ONLY APPLIES TO FRAME RELAY PROTOCOL***** 
          This parameter specifies frame relay link management  
          type.  Available options are: 
                  
          ANSI    ANSI T1.617 Annex D (default) 
                  Q933    ITU Q.933A 
                  LMI     LMI 
                  No      Turns off polling, thus DLCI becomes active regardless of the 
                          remote end.
 
     DLCINUMBER        
 
          *****ONLY APPLIES TO FRAME RELAY PROTOCOL***** 
          This parameter is used to define logical channels  
          activated by the adapter configured as an Access Node.   
          Number of DLCI should not exceed 100 for the S508  
          adapter.  Default value for DLCINUMBER parameter is 0.  
 
          This is typically used in a back-to-back testing  
          configuration. 
 
     T391 
          *****ONLY APPLIES TO FRAME RELAY PROTOCOL***** 
          This is the Link Integrity Verification Timer value in  
          seconds.  It should be within a range from 5 to 30 and  
          is relevant only if adapter is configured as CPE. 
 
     T392 
          *****ONLY APPLIES TO FRAME RELAY PROTOCOL***** 
          This is the Polling Verification Timer value in seconds. 
          It should be within a range from 5 to 30 and is relevant 
          only if adapter is configured as Access Node. 
 
     N391 
          *****ONLY APPLIES TO FRAME RELAY PROTOCOL***** 
          This is the Full Status Polling Cycle Counter. Its  
          value should be within a range from 1 to 255 and is  
          relevant only if adapter is configured as CPE. 
 
     N392 
          *****ONLY APPLIES TO FRAME RELAY PROTOCOL***** 
          This is the Error Threshold Counter. Its value should  
          be within a range from 1 to 10 and is relevant for both  
          CPE and Access Node configurations. 
 
     N393  
          *****ONLY APPLIES TO FRAME RELAY PROTOCOL***** 
          This is the Monitored Events Counter. Its value should  
          be within a range from 1 to 10 and is relevant for both  
          CPE and Access Node configurations. 
 
     LowestPVC 
     HighestPVC 
 
          *****ONLY APPLIES TO X25 PROTOCOL***** 
 
          These parameters are used to define permanent virtual  
          circuit range as assigned by your the X.25 service  
          provider.  Valid values are between 0 and 4095.  Default 
          values for both parameters are 0, meaning that no PVCs  
          are assigned.  Note that maximum number of both  
          permanent and virtual circuits should not exceed 255. 
 
     LowestSVC,  
     HighestSVC 
 
           *****ONLY APPLIES TO X25 PROTOCOL***** 
           These parameters are used to define switched virtual  
           circuit range as assigned by your the X.25 service  
           provider.  Valid values are between 0 and 4095.  Default 
           values for both parameters are 0, meaning that no SVCs  
           are assigned.  Note that maximum number of both  
           permanent and virtual circuits should not exceed 255. 

     X25Config
	   *****ONLY APPLIES TO X25 PROTOCOL***** 
	   This parameter is used to configure low lever protocol
           options. The value is bit maped thus, consult the
           x25 protocol manual for setup.  Keep this variable
	   commented out. Consult Sangoma before you use this
	   option !!! 
 
     HDCLWindow  
            
          *****ONLY APPLIES TO X25 PROTOCOL***** 
          This parameter defines the size of the HDLC frame  
          window, i.e. the maximum number of sequentially  
          numbered Information frames that can be sent without  
          waiting for acknowledgment.  Valid values are from 1 
          to 7.  Default is 7. 
 
     PacketWindow 
 
          *****ONLY APPLIES TO X25 PROTOCOL***** 
          This parameter defines the default size of the X.25  
          packet window, i.e. the maximum number of sequentially  
          numbered data packets that can be sent without waiting 
          for acknowledgment.  Valid values are from 1 to 7.   
          Default is 2. 
 
     CCITTCompat 
 
          *****ONLY APPLIES TO X25 PROTOCOL***** 
          This parameter defines CCITT X.25 compatibility level. 
          Available options are: 
                 1988   1988 version of the Recommendation X.25 (default) 
                 1984   1984 version of the Recommendation X.25 
                 1980   1980 version of the Recommendation X.25 
      
     AUTHENTICATOR 
 
          *****ONLY APPLIES TO PPP PROTOCOL***** 
          This parameter decides whether your local host will 
          be the authenticator or not.  Options : YES or NO. 
          If your local side is the authenticator then your  
          side will require that the authentication is passed  
          before the link can be established.  If your local side 
          is not the authenticator then your peer side will  
          determine if any authentication is required or not. 
      
     IP_MODE 
       
          *****ONLY APPLIES TO PPP PROTOCOL***** 
          This parameter decides whether you want to request  
          local and remote IP addresses or NOT.  Options: STATIC 
          or PEER.  If you are configured as STATIC then your side 
          will not request for IP addresses. If you are configured 
          as PEER then your side will request the remote end for 
          local and remote IP address. Default: STATIC 
          IT CAN ONLY BE SET FOR REQUESTING IP ADDRESSES 
 
      
     RXMODE 
       
          *****ONLY APPLIES TO BiSYNC STREAMING API***** 
          This parameter decides whether reading BiSync data from  
          a device is poll driven or interrupt driven. 
          Options:Int: For interrupt driven 
          Poll: For polling method 
          Default: Int 
 
 
 
14.4) Edit/Create Interface private configuration section 
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
     * For every interface listed in the [interfaces] section create another  
       section underneath all the private device configuration section.   
 
       ex. interface "fr1"  create section [fr1] 
           interface "svc1" create section [svc1]    
 
     Note: If these sections are not defined  
           then all the parameters in the section are assigned default value. 
 
     -----------------------------------------------------------------------       
     FRAME RELAY protocol the following parameter(s) should be added in 
                          the interfaces section (ex. [fr16] ): 
     ----------------------------------------------------------------------- 
 
         MULTICAST 
            This parameter either enables or disables discarding  
            packets with a multicast source address.  Available  
            options are: 
      
            YES   Do not discard packets with a multicast source addr. 
            NO    Discard packets with a multicast source addr. 
      
            Default is set to NO. 
 
        CIR 
            This parameter enables or disables Committed Information 
            rate on the board.  Options are 1 - 512 kbps.    
 
            NOTE THAT THIS VALUE REFERS TO ONLY TRANSFERRING  
            DATA PACKETS.   
 
            NOTE: In order to disable the CIR both CIR, BC and BE fields 
                  must be commented out.  The interface will fail if  
                  any of these are left out.  
 
        BC 
            This parameter states the Committed Burst Size. Options 
            are 1 - 512 kbits.  
           
            NOTE: FOR 2.2.X kernels only !!! 
		  If CIR is enabled, the driver will set BC to the
                  CIR value. Thus, user does not have to set BC in 
                  wanpipe#.conf 
 
        BE 
            This parameter states the Excess Burst Size. Options are 
            0 - 512 kbits. 
 
        INARP 
            This parameter enables or disables transmission of 
            Inverse Arp Request packets. 
 
        INARPINTERVAL  
            This parameter sets the time interval in seconds between 
            Inverse ARP Request. Default is 10 sec 
 
     ----------------------------------------------------------------------- 
     X25 protocol the following parameter(s) should be added in the  
                  interfaces section: 
     ----------------------------------------------------------------------- 
 
        IDLETIMEOUT 
            The time in seconds before an SVC will disconnect if 
            there is no data over the link.  The default is 90 
            seconds. 
 
        HOLDTIMEOUT 
            The time in seconds to wait before retrying a failed 
            connection.  The default is 10 seconds. 
 
 
     ---------------------------------------------------------------------- 
     PPP protocol the following parameter(s) should be added in the  
                  interfaces section: 
     ---------------------------------------------------------------------- 
 
        MULTICAST 
            This parameter either enables or disables discarding  
            packets with a multicast source address.  Available  
            options are: 
      
            YES  Do not discard packets with a multicast source addr. 
            NO   Discard packets with a multicast source addr. 
      
            Default is set to NO. 
 
        PAP 
            This parameter enables or disables the use of PAP. 
            Available options are: 
      
            YES Enable PAP    
      
            NO Disable PAP 
 
            This option is needed regardless of the station being 
            an AUTHENTICATOR. 
      
        CHAP  
            This parameter enables or disables the use of CHAP. 
            Available options are: 
      
            YES Enable CHAP 
      
            NO  Disable CHAP 
 
            This option is needed regardless of the station being 
            an AUTHENTICATOR. 
 
        USERID 
            This parameter is dependent on the AUTHENTICATOR 
            parameter.  If AUTHENTICATOR is set to NO then 
            you will simply enter in your login name that the 
            other side specified to you. 
 
            If AUTHENTICATOR is set to YES then you will have to 
            maintain a list of all the users that are valid for 
            authentication purposes. If your list contains ONLY 
            ONE MEMBER then simply enter in the login name.  If 
            the list contains more than one member then follow 
            the below format: 
            USERID = LOGIN1 / LOGIN2 / LOGIN3....so on 
      
            The "/" separators are VERY IMPORTANT if you have  
            more than one member to support. 
 
       PASSWD 
            This parameter is dependent on the AUTHENTICATOR  
            parameter.  If AUTHENTICATOR is set to NO then you 
            will simply enter in your password for the login 
            name that the other side specified to you. 
 
            If AUTHENTICATOR is set to YES then you will have to 
            maintain a list of all the passwords for all the  
            users that are valid for authentication purposes.  If 
            your list contains ONLY ONE MEMBER then simply enter 
            in the password for the corresponding login name in 
            the USERID parameter.  If the list contains more than 
            one member then follow the format below: 
 
            PASSWD = PASS1 / PASS2 / PASS3....so on 
 
            The "/" separators are VERY IMPORTANT if you have more 
            than one member to support.  The ORDER of your passwords 
            is very important.  They correspond to the order of  
            the userids. 
       
 
        SYSNAME 
            This parameter is dependent on the AUTHENTICATOR  
            parameter.  If AUTHENTICATOR is set to NO then you can 
            simply ignore this parameter. (comment it ) 
 
            If AUTHENTICATOR is set to YES then you have to enter 
            Challenge system name which can be no longer than 31 
            characters. 
 
 
     ---------------------------------------------------------------------- 
     Cisco HDLC protocol the following parameter(s) should be added in  
                         the interfaces section: 
     ---------------------------------------------------------------------- 
 
        Interface  
            Physical interface type.  
            Available options are: 
 
            RS232   RS-232C interface (V.10) 
            V35     V.35 interface (V.11/RS-422/RS-485/X.21) 
 
        Clocking 
            Source of the adapter transmit and receive clock signals.   
            Available options are: 
 
            External  Clock is provided externally (e.g. by  
                      the modem or CSU/DSU).  Use this 
                      for FT1 boards. 
 
            Internal  Clock is generated on the adapter. 
                      When there are two Sangoma Cards back 
                      to back set clocking to Internal on one 
                      of the cards. 
 
            For Port 1 the clocking mode is ALSO set by Jumper  
            setting.  JP4 on the adapter can be set the following 
            way: 
 
            JP4-1   JP4-2       Clocking Mode 
            CLOSED  OPEN        Clock source external 
            OPEN    CLOSED      Clock source internal 
 
        Baudrate  
            Data transfer rate in bits per second.  These values 
            are meaningful if internal clocking is selected.  
           (like in a back-to-back testing configuration) 
 
            For Port 0 the maximum supported rate is 2666 Kbps. 
            For Port 1 the maximum supported rate is  256 Kbps. 
 
        MTU  
            The MTU value specified is used for Maximum length of  
            the Cisco HDLC data field.   
 
            PORT 0 : Range is 300 - 15354  
                     Recommended value is 1500.   
 
            PORT 1 : Range is 300 - 2048  
                     Recommended value is 1500. 
 
        TTL 
            This keyword defines the Time To Live for a UDP 
            packet used by the monitoring system.  The user can  
            control the scope of a UDP packet by associating a  
            number that decrements with each hop. 
 
            Any value between 0 to 255. 
            Default is 0x7F. 
      
      
        IGNORE_DCD 
            This parameter decides whether DCD will be ignored or 
            not when determining active link status for Cisco HDLC. 
            Options:  
 
            YES  
            NO  
            Default: NO 
 
        IGNORE_CTS 
            This parameter decides whether CTS will be ignored or 
            not when determining active link status for Cisco HDLC. 
            Options:  
            
            YES  
            NO    
            Default: NO 
      
        IGNORE_KEEPALIVE 
            This parameter decides whether Keep alives will be  
            ignored or not when determining active link status for 
            Cisco HDLC.  
            Options:   
         
            YES  
            NO   
            Default: NO 

	HDLC_STREAMING
	    This parameter turns off Cisco HDLC protocol, and 
            uses raw frames without polling for communication.
	 
	    Options:
		YES
		NO
		Default:NO
 
        KEEPALIVE_TX_TIMER 
            This parameter states the interval between keep alive. 
            If you are set to ignore keepalives then this value is 
            meaningless. The value of this parameter is given in  
            milliseconds.  
 
            Range:   0 - 60000 ms.  
            Default: 10000 ms 
 
        KEEPALIVE_RX_TIMER 
            This parameter states the interval to expect keepalives 
            If you are set to ignore keepalives then this value is 
            meaningless. The value of this parameter is given in 
            milliseconds.   
 
            Range: 10 - 60000 ms.  
            Default: 10000 ms  
 
        KEEPALIVE_ERR_MARGIN 
            This parameter states the number of consecutive keep  
            alive timeouts before bringing down the link.  If  you  
            are set to ignore keepalives then this value is meaning 
            less.   
 
            Range: 1 - 20.   
            Default: 3  
 
        SLARP_TIMER 
	    Used for STATIC or DYNAMIC IP addressing

	   	0    : Static IP addressing is used.
                       IP addresses are obtained from the interface 
		       file: (usr/lib/wanrouter/interfaces/chdlc0)
		
		Non Zero : Dynamic IP addressing is used.
		           IP addresses are requested from 
                           the remote station.
		           Valid values are from 1 - 6000 (ms)       
		           Default: 5000
		           Note: A dummy interface file is still
                                 required !!!


-----< THE END >--------------------------------------------------------------

