Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

At the heart of the WANPIPE driver 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>

 

Sangoma Card Commands

All Sangoma Card control commands start with the 'wanrouter'

 

Usage: wanrouter: {options} <wanpipe#> <interface>

 The following commands are executable commands that you type in your Linux command line

Command

What does it do?

wanrouter start

Starts all ports on your Sangoma card. These ports are listed in /etc/wanpipe/wanrouter.rc under WAN_DEVICES
Note: for analog cards, there will be only one port listed. 

wanrouter stop

Stops all ports on your Sangoma card. These ports are listed in /etc/wanpipe/wanrouter.rc under WAN_DEVICES
Note: for analog cards, there will be only one port listed. 

wanrouter restart

restarts all ports on your Sangoma card. These ports are listed in /etc/wanpipe/wanrouter.rc under WAN_DEVICES
Note: for analog cards, there will be only one port listed. 

wanrouter start <wanpipe#>

Starts a single port on your card.
Note: if you have a digital card, this will start the entire cards and all ports 

wanrouter stop <wanpipe#>

Stops a single port on your card.
Note: if you have a digital card, this will start the entire cards and all ports 

wanrouter restart <wanpipe#>

Restarts a single port on your card.
Note: if you have a digital card, this will start the entire cards and all ports 

wanrouter start <wanpipe# if_name>

Starts a single interface on the port of your card

wanrouter stop <wanpipe# if_name>

Stops a single interface on the port of your card

wanrouter restart <wanpipe# if_name>

Restarts a single interface on the port of your card

wanrouter list

lists all active ports on your card.
Note: for 1 analog card only 1 port will be present 

wanrouter modules

Displays the Sangoma Driver (a.k.a Wanpipe) kernel modules

wanrouter status

Displays all active ports for all Sangoma cards in your system. 

wanrouter summary

Summary of configuration files for your card, which are all located in /etc/wanpipe directory

wanrouter hwprobe

Displays all detected Sangoma Cards in your server. 

wanrouter conflogs

Displays Sangoma driver configuration file syntax errors

wanrouter messages

Displays Sangoma driver kernel event messages

wanrouter version

Displays Sangoma driver version number. Useful to identify the age of your driver in comparison to the latest release

 

Kernel Driver Errors

All Card and driver errors/events will be displayed in:

-> /var/log/messages

To watch the errors/events live on your Linux command line type:

-> tail -f /var/log/messages

 

Line Errors and Driver Statistics

After a successful Driver startup,any extra debugging, such as line tracing or CSU/DSU debugging, will be performed using:

/usr/sbin/wanpipemon -g

For automated Line Error debugging run:

/usr/sbin/wanrouter debug <if_name>
    where <if_name> is wanpipe interface name.

 

Driver 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

 

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

 

Driver 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

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

  1. Start up all network interfaces

ifconfig wan0 <local ip> pointopoint <remote ip> netmask 255.255.255.255

  1. Confirmation

tail -f /var/log/messages

  1. Check the events and driver statistics.

cat /proc/net/wanrouter/status

  1. Check driver state

 

wanrouter status

Driver External Scripts

 

The wanrouter utility will also EXECUTE any external

script that is located in /etc/wanpipe/scripts directory.
Furthermore wanrouter utility will execute number of
scripts depending on what is being started or stopped.

Global Start/Stop Script
------------------------
    
    Global Start  : wanrouter start
    Global Stop   : wanrouter stop
    Global Restart: wanrouter restart

    Script Location:   /etc/wanpipe/scripts
    
    Start Script Name: start
    
        Script "start" will execute after a sucessfull
        "wanrouter start" command. The wanrouter start 
        command    will start one or more configured 
        wanpipe devices.

    Stop Script Name : stop

        Script "stop" will execute after a sucessfull
        "wanrouter stop" command. The wanrouter stop 
        command    will stop one or more configured 
        wanpipe devices.

Device Start/Stop Script
------------------------

    Device start  : wanrouter start wanpipe1
    Device stop   : wanrouter stop wanpipe1
    Device restart: wanrouter restart wanpipe1
    
    Script Location:   /etc/wanpipe/scripts
    
    Start Script Name: wanpipe#-start  Where #={1,2,3,4...}
    
        Script "wanpipe1-start" will execute after:
            -> Device Start
            -> Global Start (if wanpipe1 is part of the start list)
        
    Stop Script Name : wanpipe#-stop   Where #={1,2,3,4...}

        Script "wanpipe1-stop" will execute after:
            -> Device Stop
            -> Global Stop (if wanpipe1 is part of the start list)

Interface Start/Stop Script
---------------------------

    Interface start  : wanrouter start wanpipe1 w1g1
    Interface stop   : wanrouter stop wanpipe1  w1g1
    Interface restart: wanrouter restart wanpipe1 w1g1
    
    Script Location:   /etc/wanpipe/scripts
    
    Start Script Name: wanpipe1-w1g1-start
    
        Script "wanpipe1-start-w1g1" will execute after:
            -> Interface Start
            -> Device Start
            -> Global Start (if wanpipe1 is part of the start list)
        
    Start Script Name: wanpipe1-w1g1-stop
    
        Script "wanpipe1-stop-w1g1" will execute after:
           -> Interface Stop
           -> Device Stop
           -> Global Stop (if wanpipe1 is part of the start list)

  • No labels