Wanpipe WAN Operation
- WAN Router Commands
- WANPIPE Environment Check
- WANPIPE Startup
- Error Debugging
- Kernel Driver Errors
- Line Errors and Driver Statistics
- Wanpipe Power User Operation
- Wanpipe Manual Startup
- Wanpipe External Scripts
At the heart of WANPIPE operation is the 'wanrouter' operation script. It is used to start/stop/restart and display WANPIPE current status and environment. usage: /usr/sbin/wanrouter <command>
WAN Router Commands
Usage: wanrouter: {options} <wanpipe#> <interface> wanrouter start : Starts all devices specified in /etc/wanpipe/wanrouter.rc WAN_DEVICES wanrouter stop : Stops all devices specified in/etc/wanpipe/wanrouter.rc WAN_DEVICES
wanrouter restart : Restart all devices specified in/etc/wanpipe/wanrouter.rc WAN_DEVICES wanrouter start wanpipe# : Start a single device wanrouter stop wanpipe# : Stops a single device wanrouter restart wanpipe# : Restart a single device wanrouter start wanpipe# if_name: Start a single interface on device wanrouter stop wanpipe# if_name: Stops a single interface on device wanrouter restart wanpipe# if_name : Restart a single interface on device wanrouter list : List all active devices
wanrouter modules: Show wanpipe kernel modules
wanrouter status: Display status for all active devices wanrouter summary: ummary of config files in /etc/wanpipe wanrouter hwprobe: Display wanpipe hardware probe info. wanrouter debug: Check current wanpipe environment.
Wanpipe startup debugging. After a startup error run this command to get a possible solution i.e. wanrouter start; wanrouter debug;
wanrouter debug if_name : Display common debugging statistics.
In case of line problems save to file, wait 2-5min and send to Sangoma Tech Support i.e. wanrouter debug wp1fr16 > debug_file
wanrouter conflogs: Display wanpipe configuration syntax errors
i.e. /var/log/wanrouter
wanrouter messages: Display wanpipe kernel event messages
i.e. /var/log/messages
wanrouter version: wanpipe version information.
WANPIPE Environment Check
The wanrouter debug option will check current wanpipe environment, make sure that kernel modules do load, and that /var/log/messages and /var/log/wanrouter logs do not show any errors. It will also try to give possible solutions. /usr/sbin/wanrouter debug Make sure that the new WANPIPE kernel modules have been installed correcty and that they can be loaded into the kernel, and the hardware is detected. /usr/sbin/wanrouter hwprobe Check that a configuration file exists in /etc/wanpipe directory /usr/sbin/wanrouter summary Make sure that no WANPIPE devices are currently running on the system /usr/sbin/wanrouter list
WANPIPE Startup
Please note that all kernel driver output messages are located in /var/log/messages file. Run 'tail -f /var/log/messages' in a separate console window, to monitor WANPIPE start/stop and operation messages. To start/stop/restart WANPIPE devices listed in /etc/wanpipe/wanrouter.rc file: (default is wanpipe1) /usr/sbin/wanrouter start /usr/sbin/wanrouter stop /usr/sbin/wanrouter restart To start/stop/restart single wanpipe device: (eg: wanpipe2)
This command is useful when running multiple devices and would like to operate on a singe device. /usr/sbin/wanrouter start wanpipe2 /usr/sbin/wanrouter stop wanpipe2 /usr/sbin/wanrouter restart wanpipe2
To start/stop/restart a single network interface from a /etc/wanpipe/wanpipe1.conf configuration file: This command is useful when adding an extra frame relay DLCI. Also to reconfigure a single DLCI. /usr/sbin/wanrouter start wanpipe2 wp2_fr18 /usr/sbin/wanrouter stop wanpipe2 wp2_fr18 /usr/sbin/wanrouter restart wanpipe2 wp2_fr18 To view current status and configuration of active devices: /usr/sbin/wanrouter status
Error Debugging
After a failed wanrouter start command run: wanrouter debug The debug option will identify an error and offer solutions. Configuration Syntax Errors: All configuration file syntax errors, generated during WANPIPE starup, will be displayed in: /var/log/wanrouter (eg: cat /var/log/wanrouter)
Kernel Driver Errors All device driver errors and events will be displayed in:
/var/log/messages (eg: tail -f /var/log/messages)
Line Errors and Driver Statistics After a successful WANPIPE startup any extra debugging, such as line tracing or CSU/DSU debugging will be done using: /usr/sbin/wanpipemon -g For automated Line Error debugging run /usr/sbin/wanrouter debug <if_name> where <if_name> is wanpipe interface name.
Wanpipe Power User Operation
Wanpipe package contents
1. Wanpipe Kernel Drivers The drivers are listed in order of dependency. sdladrv.o : Hardware Layer wanrouter.o : Wanpipe Protocol Interface Layer wanpipe_syncpp.o : Wanpipe PPP/CHDLC Protocol wanpipe.o : Wanpipe multi-protocol layer (Frame-Relay,PPP,CHDLC,...) af_wanpipe.o : Wanpipe API socket layer 2. User space programs 2.1 Configuration (/usr/sbin) wancfg: Wanpipe configuration tool
cfgft1: Wanpipe FT1 config tool for S508FT1 and S5143 cards (For all other cards use wancfg)
2.2 Operation (/usr/sbin) wanconfig Wanpipe operation tool that parses the config file and executed config ioctl() calls to the kernel driver. wanconfig -a /etc/wanpipe/wan_adsl.list card wanpipe1 up wanrouter Wanpipe operation script used to start/stop/restart Wanpipe drivers. The wanrouter script uses the above wanconfig to start wanpipe as well as standard "ifconfig" to bring all necessary interfaces up.
2.3 Debugging/Monitoring wanpipemon Wanpipe debugging application used to debug the hardware, drivers and sync line. Graphical Mode: wanpipemon -g Raw trace: wanpipemon -i <if name> -c tr Interpreted trace: wanpipemon -i <if name> -c ti Alarms : wanpipemon -i <if name> -c Ta Hardware echo canceller monitoring: wanpipemon -i <if name> -c ehw
Wanpipe Manual Startup If a power user desn't want to use the wanrouter master script. Here is the break down of the wanpipe startup sequence:
wanrouter start
1. Load Kernel Modules insmod sdladrv.o insmod wanrouter.o insmod wanpipe_syncppp.o insmod wanpipe.o insmod af_wanpipe.o or modprobe af_wanpipe 2. Configure and Start Drivers If using ADSL /usr/sbin/wanconfig -a /etc/wanpipe/wan_adsl.list card wanpipe1 up else /usr/sbin/wanconfig card wanpipe1 up 3. Start up all network interfaces ifconfig wan0 <local ip> pointopoint <remote ip> netmask 255.255.255.255 4. Confirmation tail -f /var/log/messages 5. Check the events and driver statistics. cat /proc/net/wanrouter/status 6. Check driver state |