WANPIPE(tm) Multi-protocol WANPIPE Driver for FreeBSD Operating System Wanpipe Version: 1.1.0 U S E R'S M A N U A L Document Version 1.1 Dec 30, 1999 Author: Alex Feldman 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 and re-build FreeBSD kernel .............. 1.6) Device driver configuration variables .............. 1.7) Installing device driver modules ................... 1.8) Installing WAN tools utilities ..................... 2. Configuring WANPIPE ..................................... 2.1) Configuration script ............................... 2.2) ISA configuration .................................. 2.3) PCI Autodetect ..................................... 2.4) Multiple PCI cards ................................. 3. Configuring FT1 cards ................................... 3.1) Examples ........................................... 3.2) Configuring S508/FT-1 example ...................... 4. Starting and Stopping WAN Router ........................ 4.1) Starting and Stopping WAN Router ................... 4.2) Driver usage ....................................... 5. Using the FPIPEMON,PPIPEMON,CPIPEMON 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 Interface Problem ........................... 6.3) Router Table Problem (Cannot PING) ................. 6.4) Sdla Dump Utility ..........,....................... 6.5) Line Problems (T1) .........,....................... 6.6) Error messages ..................................... 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/wanrouter.rc)................. 13. APPENDIX F (sample of /var/log/wanrouter)................ 14. APPENDIX G (configuration of wanpipe#.conf) ............. 15. APPENDIX H (CHDLC/Frame Relay API) ...................... *************************************************************************** INTRODUCTION *************************************************************************** Wanpipe-1.1.1 release contains new sangoma drivers for both S508 card and the new S514 PCI card. Protocols currently supported are Cisco HDLC, Frame Relay and Point-to-Point. 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/FreeBSD/current_wanpipe" directory located at Sangoma's FTP site (ftp.sangoma.com). Note: wanpipe-1.1.0 package supports FreeBSD-3.x releases. It is recommended that a WANPIPE Driver package be installed on a FreeBSD 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-1.1.0 package supports FreeBSD-3.x releases. The wanpipe-1.1.0 package is located on sangoma ftp site: ftp.sangoma.com. Download the wanpipe-1.1.0 tar ball from the ftp.sangoma.com, pub/FreeBSD/current_wanpipe/ directory. 1.3 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. * Create directory /usr/local/wanrouter and change you current directory to this directory by executing 'cd /usr/local/wanrouter'. * Copy the wanpipe tar ball file previously downloaded from Sangoma web page to the /usr/local/directory directory and untar it. ex: tar xvfz wanpipe-1.1.0.tgz The files from this distribution are copied into the /usr/local/wanrouter/ directory. * If you received your distribution on a diskette, insert it into a disk drive and execute the following command: mount /dev/fd0 /floppy cp /floppy/wanpipe-1.1.0.tgz ./ tar xfvz wanpipe-1.1.0 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/local/wanrouter/Setup) o Driver Configuration script (/usr/local/wanrouter/wancfg) o Driver start-up script (/usr/local/bin/wanrouter) o Driver sample configuration files (/usr/local/samples/*) o Interface configuration files (/usr/local/wanrouter/interfaces/*) o Firmware files for WANPIPE cards (/usr/local/wanrouter/sfm/*) o Driver source files (/usr/local/wanrouter/wanpipe/*, /usr/local/wanrouter/wanrouter/*, /usr/local/wanrouter/sdladrv/*) o Driver include file (/usr/local/wanrouter/src/*) o WANPIPE configuration utility (/usr/local/wanrouter/wantools/wanconfig) o WANPIPE Diagnostic Utilities: Frame Relay Monitor (/usr/local/wanrouter/wantools/fpipemon) Cisco HDLC Monitor (/usr/local/wanrouter/wantools/cpipemon) Point-to-Point Monitor (/usr/local/wanrouter/wantools/ppipemon) Adapter's Memory Viewer (/usr/local/wanrouter/wantools/sdladump) o FT1 Configuration Utility (/usr/local/wanrouter/bin/cfgft1) o API sample programs (/usr/local/wanrouter/wantools/api) 1.4) WANPIPE Driver Setup -------------------- o The driver was developed and tested on FreeBSD-3.2 system, so if you use an earlier version and it doesn't work - don't be surprised. However, please contac us if you need to run it on an older system - we'll see what can be done. o All WANPIPE scripts must be run under bash (at least ver. 2.03) shell. (I suppose that bash shell locate in default directory /usr/local/bin directory). o Make sure that you have a complete kernel source in your /usr/src/sys directory. A kernel source can be downloaded from ftp.freebsd.org. o Change current directory to /usr/local/wanrouter and execute the following command: ./Setup This script will perform the following functions: o verify distribution integrity and fix file permissions o copy necessary driver's files for corresponding directories. 1.5) Configure FreeBSD kernel ------------------------ o Add driver source file to the kernel files list, which is /usrt/src/sys/i386/conf/files.i386. Add the following definition line into the list (it's stored alphabetically, so insert it appropriately): i386/isa/sdla_dev.c optional sdla device-driver o Add board probe entries into kernel configuration file which sits in /usr/src/sys/i386/conf. For each S508 board you want to use add the following configuration line: device sdla0 at isa? port 0x360 net irq 11 iomem 0xD2000 iosiz 0x2000 (well for unit 1 it should be device sdla1 .. of course). Change the entry resources as required. See notes at the end of this document for the list of possible I/O port, IRQ and shared memory values. For each S514 board you want to use add the following configuration line: device sdla1 o Buidl a new kernel using this configuration. Assuming your configuration file is called MYKERNEL do the following: cd /usr/src/sys/i386/conf config MYKERNEL cd ../../compile/MYKERNEL make depend make cp /kernel /kernel.b4.wanpipe <-- save a copy of current kernel make install reboot And there you have it! On startup the kernel will probe the configuration boards and will tell you whether it found it or not. If you misssed this message on the boot time you can always view them with `dmesg` command or by taking a look at /var/log/messages files. If a board is not found by the driver/kernel but it's actually plugged into machine then the most likely problem is that the I/O port address is incorrect. Make sure that the settings in your kernel configuration file correspond to the jumper settings on the board (see notes). 1.6) Device driver configuration variables. -------------------------------------- o When you changed one of the next variable, don't forget execute again all steps from 1.7. o Device driver configuration variable: NROUTERS - Located in /usr/local/wanrouter/wanpipe/Makefile. Defined maximum number of running routers. NBPFILTER - Located in /usr/local/wanrouter/wanpipe/Makefile. If this variable is set to 1, BPF supported. It's also must be set to 1 if you running router as API. Located in /usr/local/wanrouter/wanrouter/Makefile. The same reason as previous. 1.7) Installing device driver modules. -------------------------------- o Change directory to WANPIPE home directory (/usr/local/wanrouter) by running: `cd /usr/local/wanrouter` o Run `make clean` to remove all previous modules. o Run `make` to compile all device driver modules. o Run `make install` to install device driver modules to /modules directory. 1.8) Installing WAN tools utilities. ------------------------------- o Change directory to /usr/local/wanrouter/wantools by running: `cd /usr/local/wanrouter/wantools` o Run `make clean` to remove all previous object and executable files. o Run `make` to compile all WAN tools utilities. o Run `make install` to install all WAN tools utilities in corresponding directories. ******************************************************************************* 2. CONFIGURING WANPIPE ******************************************************************************* Please Read the WANPIPE_CONFIG.txt file in /usr/local/wanrouter/doc directory. 2.1) Configuration script -------------------- The current version of device driver includes universal configuration utility (wancfg). Location of this utility is in /usr/local/wanrouter directory. To run this script, run (from /usr/local/wanrouter directory): ./wancfg This utility includes enought help information to create device configuration files (/etc/wanpipe#.conf) and interface files (ex: wpa_chdlc). You will only need to edit meta configuration file (/etc/wanrouter.rc). 2.2) ISA configuration ----------------- For ISA card, the IOPort and IRQ options must be the same as in kernel configuration file!! 2.3) 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.4) 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 *************************************************************************** o Create /etc/wanpipe#.conf configuration file for specific wanpipe# card, by running: ./wancfg wanpipe# , where # = 1,2,3,... o To configure FT1 cards run : cfgft1 wanpipe# , where # = 1,2,3,.... There are enough helpfull information in this script. You must run this script only one time at the beginning. You can use Advanced FT1 configuration (see 3.1) o If configuration was successful, you can now start the router, by running: wanrouter start or wanrouter start wanpipe# , where # = 1,2,3,.... 3.1) Advanced FT1 configurator: 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 . Configuration changes are made as follows: 1. Type C to open the configuration mode. 2. Change the required settings. 3. After making these changes, type D1 to see the temporary configuration bank. 4. If these changes are correct, then type W to write the configuration to the non-volatile memory. 5. Type Q 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.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 OR C Open configuration mode -1-2-3 Remove channels 1, 2 and 3 from the active list +21+22 Add channels 21 and 22 to the active list K0 Set the encoding mode to B8ZS L3 Set the line build out to DSX-1 (399 - 533ft) M0 Set the framing to ESF P0 Set the clock mode to normal D1 Display the temporary configuration before saving W Update the user memory Q 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 -3-4-5-6-7-8-9-10-11 -12-13-14-15-16-17-18-19-20-21-22-23-24 WQ D0 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. DRIVER OPERATIONS AND USAGE *************************************************************************** 4.1) Starting and Stoping WAN Router. o Start the wanrouter: run 'wanrouter start' at the command prompt. o Stop the wanrouter: run 'wanrouter stop' at the command prompt. 4.2) Driver usage. o The configuration file is re-read every time you run `wanrouter start`. Therefore, if you would like to change some of the configuration data you need stop the wanrouter, edit configuration file and start wanrouter again. If you would like to change some of the configuration data for specific wanpipe#, you don't need to stop all routers, stop only this specific router by running `wanrouter stop wanpipe#`, edit configuration data and run this router again by `wanrouter start wanpipe#`. o To view the driver status perform `ifconfig -a` command. When there is ready to transfer the data you should see something like (for CHDLC): wpa_chdlc0: flags=51 mtu 1500 inet 200.1.1.2 --> 200.1.1.1 netmask 0xFFFFFF00 The most important here is the presence of *both* UP and RUNNING flags. The driver configurated with SLARP TIMER not zero, will not go into UP and RUNNING untill it receives a reply for the SLARP requests it sent out. When the reply is received the driver will adjust its IP address information and routing tables. *** For more information regarding 'wanrouter' script operations please refer to APPENDIX D. *** ************************************************************************** 5. USING THE FPIPEMON, CPIPEMON AND PPIPEMON MONITORS ************************************************************************** Included with the Wanpipe drivers are three UDP management monitors. fpipemon : for Frame Relay protocol. cpipemon : for CHDLC protocol. ppipemon : for Point-to-Point protocol. You must be superuser (root) to run these monitors. To install this utilities, go to directory /usr/local/wanrouter/utility and run from this directory 'make' and after this 'make install'. This will automaticly install all three monitors and sdladump utility, which will describe later. 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.2 201.1.1.1 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/wanpipe#.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-FreeBSD systems. In the same way you can monitor the FreeBSD cards from non-FreeBSD 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, cpipemon and ppipemon. ***************************************************************************** 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, cpipemon and ppipemon. **** 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 LOCK directory (see /etc/wanrouter.rc file). 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 Interface Problem ------------------------ To verify TCP/IP configuration of WAN interfaces, use `ifconfig` and `netstat` utilities. Interface status can be viewed with `ifconfig {interface_name}` command. The output should look similar to this: wpa_chdlc0: flags=51 mtu 1500 inet 200.1.1.2 --> 200.1.1.1 netmask 0xFFFFFF00 The interface name will be one that was defined in /etc/wanpipe#.conf in [interfaces] section. If this interface doesn't show both *UP* and *RUNNING*, after router start (check using `ifconfig`) a mistake was made while configuring the router. !!IMPORTANT!! For Cisco HDLC and Point-to-Point protocol, interface name that defined in /etc/wanpipe#.conf in [interfaces] section and name after running `ifconfig -a` is different. The different is `0` at the end of interface name. For example: o /etc/wanpipe1.conf: [wpa_chdlc] o after running `ifconfig -a`: wpa_chdlc0: flags=51 mtu 1500 inet 200.1.1.2 --> 200.1.1.1 netmask 0xFFFFFF00 This interface name 'wpa_chdlc0' is reference to inteface name 'wpa_chdlc' which defined before in interface section [wpa_chdlc] (without zero). Refer to WAN_CONFIG.TXT for more details. o Make sure that interface name in /etc/wanpipe#.conf files in [interfaces] section is the same as the file name in /usr/local/wanrouter/interfaces/{name}. ex. /etc/wanpipe1.conf: [interfaces] wpa_chdlc = wanpipe1, , WANPIPE /usr/local/wanrouter/interfaces/wpa_chdlc file must be exist. o Make sure all fileds are correct in /usr/local/wanrouter/interfaces/{name} file. Refer to WAN_CONF.TXT file. 6.4) Router Table Problem (Cannot PING) ---------------------------------- View routing table by typing `netstat -r` 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 Flags Window Use Netif Expire 200.1.1.1 200.1.1.2 UH 0 0 wpa_chdlc0 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 monitor 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; wanpipe# , whereas # is 1,2,... {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) Line Problems (T1) ------------------- See www.sangoma.com/linedebug.htm. READ THE MAN PAGES FOR : fpipemon, cpipemon and ppipemon!!! 6.7) Error messages -------------- 6.7.1) Message "Router is already running. Stop it first" -------------------------------------------------- There are number of cases when you can receive this message: o If you execute `wanrouter start", but router is realy running. You will need to stop rouer first and then start it again. o If driver crashed for some reason, the lock files not removed. After rebooting when you execute `wanrouter start` you will receive this message. In this case, go to directory which defined in variable ROUTER_LOCK_DIR in meta configuration file (/etc/wanrouter.rc) and remove all files in this directory. o If you reboot your machine without stopping router. In this case, can remove lock files (see above) and start router. Or, you can shutdown procedure to /etc/rc.shutdown file which will be automaticly try to stop routers each time when you reboot your machine. The shutdown procedure can be look like this: # Insert shutdown procedures here if [ -f /etc/rc.conf ]; then . /etc/rc.conf fi echo `` # for each valid dir in $local_startup, search for init scripts # matching *.sh if [ "X${local_startup}" ~= X"NO" ]; then echo `Local package shutdown:` # reverse the directory list for dir in ${local_startup}; do rdir_list="${dir} ${rdir_list} done for dir in ${rdir_list}; do [ -d ${dir} ] && for script in `/bin/ls -r ${dir}/*.sh; do [ -x ${script} ] && ${script} stop done done fi **************************************************************************** 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: al.feldman@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 FreeBSD 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/wanrouter.rc /etc/wanpipe#.conf /var/log/wanrouter /var/log/messages /usr/local/wanrouter/interfaces/* o Output of the following commands ifconfig {interface} netstat -r 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 -u -c -d Option -i: Wanpipe remote IP adderss or Wanpipe network interface name (ex: wpa_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 wpa_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 wpa_fr17 -u 9000 -c sd -d 16 :Statistics for DLCI 16 8.2) CPIPEMON -------- cpipemon -i -u -c Option -i: Wanpipe remote IP adderss must be supplied Wanpipe network interface name (ex: wpa_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 wpa_chdlc0 -u 9000 -c xm :View Modem Status ex: cpipemon -i 201.1.1.2 -u 9000 -c ti :Trace and Interpert ALL frames 8.3) PPIPEMON -------- ppipemon -i -u -c Option -i: Wanpipe remote IP address must be supplied Wanpipe network interface name (ex: wpa_ppp0) Option -u: Wanpipe UDPPORT specified in /etc/router.conf Option -c: Command is split into two parts: 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 n Parameters Negotiated on Last Connection/Attempt ru Display Router UP time u PPP Timers and Counters s PPP FSM Current State c Cause for Last Disconnection Card Configuration c g PPP General Configuration a Authentication Configuration i IP Configuration x IPX Configuration Card Statistics s g Global Statistics c Communication Error Statistics p Packet Statistics lpc LCP Statistics lo Loopback Detection / LCP Error Statistics ipc IP Control Protocol( IPCP )Statistics xpc IPX Control Protocol( IPXCP )Statistics pap Password Authentication (PAP) Statistics chp Challenge-Handshake Auth.(CHAP) 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 Flush Statistics f g Global Statistics c Communication Error Statistics p Packet Statistics lpc LCP Statistics lo Loopback Detection / LCP Error Statistics ipc IP Control Protocol( IPCP )Statistics xpc IPX Control Protocol( IPXCP )Statistics pap Password Authentication (PAP) Statistics chp Challenge-Handshake Auth.(CHAP) Statistics Driver Statistics d ds Display If_Send Driver Statistics di Display Interrrupt Driver Statistics dg Display General Driver Statistics Examples: -------- ex: ppipemon -i wpa_ppp0 -u 9000 -c xm :View Modem Status ex: ppipemon -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/local/wanrouter/samples directory. ********************************************************************************* 10. APPENDIX C ********************************************************************************* Interfaces /usr/local/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 'wanrouter {start | stop}' -------------------------------------- The start-up script will first read meta-configuration file /etc/wanrouter.rc to set up its operational environment. Then it will check to see if router lock file already exists (/var/lock/wanrouter). 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 using FreeBSD kldload utility. This will automatically load the wanrouter module (wanrouter.ko), wanpipe module (wanpipe.ko) and low-level driver module (sdladrv.ko). When all drivers are loaded, the start-up script runs wanconfig utility to configure the wanpipe drivers and create network interfaces. The configuration files used by wanconfig is created separately for each device. WANPIPE configuration directory defined by the WANPIPE_CONF_DIR variable in the /etc/wanrouter.rc file. The list of configured device is defined by WANPIPE_DEVICES variable in the /etc/wanrouter.rc file. The results of the configuration are stored in the router log file (/var/log/wanrouter). And finally, the start-up script configures network interfaces (TCP/IP level) and sets up static routes using FreeBSD' ifconfig and route utilities. When doing so, it uses configuration files found in /usr/local/wanrouter/interfaces directory. These files can be created manually or using router configuration script (wanconf 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 'wanrouter stop' command, the start-up script shuts down all network interfaces, then unloads the wanpipe drivers, thus returning system to its initial state. !!IMPORTANT!! This version of FreeBSD not support detaching network interface which was attached before. So, don't be confused, when after shutting down wanrouter, you will still see the network interface after running `ifconfig -a`. First, the status of this network interface is not UP and not RUNNING. Second, I remove destination address from route table. So, this network interface is not active. The output from `ifconfig -a` can be look like this: wpa_chdlc: flags=10 mtu 1500 I recommend to reboot your machine in next cases: o If you would like to change protocol type for router (wanpipe#). o If you would like to remove one router (wanpipe#). o If you would like to remove one or more DLCI's in Frame Relay. ************************************************************************************ 12. APPENDIX E ************************************************************************************ Default wanrouter.rc ----------------------------------------------------------------------------- #!/usr/local/bin/bash # wanrouter.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: # # WANROUTER_BOOT= Boot flag (YES/NO). # WANPIPE_CONF_DIR= Directory of wanpipe config files. # WANROUTER_LOG= Where to put start-up log file. # WANROUTER_LOCK_DIR= Directory of wanpipe device lock files. # WAN_DEVICES= Name of the wanpipe devices to be # loaded on 'router start' # (ex: "wanpipe1 wanpipe2 wanpipe3...") # # Note: Name of wanpipe devices correspond # to the configuration files in # /etc directory: # (ex. /etc/wanpipe1.conf ) # # Note: This file is 'executed' by the shell script, so # the usual shell syntax must be observed. WANROUTER_BOOT=YES WANPIPE_CONF_DIF=/etc WANROUTER_LOG=/var/log/wanrouter WANROUTER_LOCK_DIR=/var/lock WAN_DEVICES="wanpipe1" The following variables are defined in the meta-configuration (/etc/wanrouter.rc) file: WANROUTER_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 WANROUTER_BOOT=YES WANROUTER_CONF_DIR Defines location of the main router configuration files. Default is WANROUTER_CONF_DIR=/etc WANROUTER_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 WANROUTER_LOG=/var/log/wanrouter WANROUTER_LOCK_DIR 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 WANROUTER_LOCK_DIR=/var/lock WAN_DEVICES Lists WAN devices to be loaded on `wanrouter start`. Default is WAN_DEVICES="wanpipe1" *********************************************************************************** 13. APPENDIX F *********************************************************************************** Here is a sample contents of the WAN Router log file: /var/log/wanrouter Wed Dec 29 11:37:45 EST 1999: starting WAN router Loading driver wanpipe ... ok Starting up device: wanpipe1 WAN Router Configurator. v2.1.0 (c) 1995-1996 Sangoma Technologies Inc. * Parsing configuration file /etc/wanpipe1.conf ... * Reading section [devices]... * Reading section [wanpipe1]... * Reading section [interfaces]... * wpa_ppp to used by WANPIPE * Reading section [wpa_ppp]... * Configuring device wanpipe1 (Leased Line) * Setting IOPORT to 0x360 * Setting IRQ to 5 * Reading 31014 bytes from /usr/local/wanrouter/sfm/ppptmp.sfm ... * Setting MEMADDR to 0xD2000 * Setting INTERFACE to V35 * Setting CLOCKING to Internal * Setting BAUDRATE to 1544000 * Setting MTU to 1500 * Setting UDPPORT to 9000 * Setting TTL to 0x7F * Setting IP_MODE to STATIC * Configuring channel wpa_ppp (WANPIPE). Media address: * Setting MULTICAST to NO * Setting PAP to NO * Setting CHAP to NO * Setting IPX to NO * Setting NETWORK to 0xABCDEFAB *********************************************************************************** 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 WAN_PPP, for Point-to-Point 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/local/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/local/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: wpb_fr16 = wanpipe2, 16, WANPIPE, frame relay connection to the office 3 wpb_fr17 = wanpipe2, 17, WANPIPE, frame relay connection to ISP < no media address is used > wpa_chdlc0 = wanpipe3, ,WANPIPE, Chdlc link on PRI port wpb_chdlc0 = 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. Remember, that actually each device has separately configuration file! 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/local/wanrouter/sfm/frtmp.sfm PPP /usr/local/wanrouter/sfm/ppptmp.sfm CISCO HDLC /usr/local/wanrouter/sfm/cdual514.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. 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. 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 "wpa_fr1" create section [wpa_fr1] 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. [wpa_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/local/wanrouter/interfaces/wpa_chdlc) 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 !!! ***************************************************************************** 15. APPENDIX H ***************************************************************************** Current device driver supported API for Cisco HDL and Frame Relay. This done by using Berkley Packet Filter (BPF). To enable API, execute next steps: o The Berkley Packet Filter (bpf) driver needs to be enabled before running Sangoma device driver. Check that your kernel configuation file include line: pseudo-device bpfilter 4 # Berkley Packet Filter If not add this line adn re-compile your kernel. o After rebooting you will have to create the device node. This can be accomplished by a change to the /dev directory and running: `./MAKEDEV bpf0` o Stop wanrouter (if it running), by running: `wanrouter stop` o Set Operation Mode from Network Interface Setup in corresponding wanpipe configuration file (wanpipe#.conf), by running from /usr/local/wanrouter: `./wancfg` o To enable API indevice driver, set NBPFILTER variable to 1 in /usr/local/wanrouter/wanpipe/Makefile and /usr/local/wanrouter/wanrouter/Makefile. o Re-compile device driver modules (see 1.7). o Start wanrouter, by running: `wanrouter start` You can find sample send and receive programs in /usr/local/wanrouter/api/* for Cisco HDLC and Frame Relay protocols which should be used in application development. -------------------------------< THE END >-----------------------------------