Linux PPPD

PPP using Wanpipe LIP Layer

1. Description

If you are using a single link PPP, you can use our Wanpipe PPP stack.

2. Configuration

Run wanpipe configuration utility:

/usr/sbin/wancfg

Hardware Setup (AFT):

Select Hardware: Specify AFT card from hardware probe.

    After hardware probe,  wancfg screen should show  you:
    (in case of A104 card)
    ----------------------------
    Card Type-------> A104    
    Physical Medium-> T1    
    ----------------------------

Sepecify Line Type:  T1 or E1
                                 Default is T1 

Default configuration is complete: Select <BACK>

Protocol Setup:

Select Protocol: PPP

Configuration is complete: Select <BACK>

Interface Setup:

Skip First option and leave it default.

Select: Operation Mode
            WANPIPE

Select: IP Address Setup
            Local IP addr: Set this local IP Address
            Point-to-Point IP Address: Set this to the ip address of the remote side

Select: Default Gateway
            Leave it to no if you do not want the PPP interface to be your default route.
            Set this to yes, and enter your Gateway IP Address if you want packets to go to the PPP interface by default.

Configuration is complete: Select <BACK> to Save and Exit

After a wanrouter start, your PPP interface will come up as w*g1ppp. (for example w1g1ppp)

Top

 

PPP using Linux PPP Daemon

1. Description

The Sync/Multilink PPP is a standard implementation of the PPP protocol implemented in the Linux Kernel. Using the Sangoma adapter as a TTY serial card and the Linux PPP Layer a standard PPP connection can be established.

Using the PPPD daemon, kernel Sync-PPP layer and the Wanpipe sync TTY driver: a PPP protocol connection can be established via Sangoma adapter.

2. Dependencies:

Compiled Kernel  PPP sync layers preferably as modules.
PPPD Daemon version 2.4.0 or greater
Wanpipe drivers with WAN Protocol Support already installed.

3. Setup/Configuration

Configure Sangoma Card for TTY mode
    /usr/sbin/wancfg

Select Card Type:  
    A10x, A30x or S51x           
          
Choose Protocol:
    TTY

Configure interface:
    Select TTY MINOR number
    TTY MINOR represents a TTY port.
    Options: 0,1,2 - 8  
    Default: 0

    It binds a WANPIPE device driver to the /dev/ttyWPX device, where X=(0,1,2,..).
        
For example MINOR number 0 binds a Wanpipe TTY driver to /dev/ttyWP0. Thus, when pppd daemon opens the /dev/ttyWP0 it will reach the device driver whose Minor number is 0.

Note: TTY_MINOR must differ for each Wanpipe device.

Save and Exit

4. Start wanpipe:
-> wanrouter start wanpipe1

Check /var/log/messages.
    You should see this event:
    ...
    w1g1: TTY Driver Init: Major 240, Minor Range 0-7
    w1g1: TTY Sync Dev Minor 0 : /dev/ttyWP0
    ...
    
    Now the driver is ready for pppd connection.

5. PPPD Setup 

Create a device node:
To interface a PPPD daemon to the WANPIPE TTY driver a /dev/ttyWPX X={0,1,3...) device must be created.
    
    ex: mknod -m 666 /dev/ttyWP0 c 240 0
          mknod -m 666 /dev/ttyWP1 c 240 1        
          mknod -m 666 /dev/ttyWP2 c 240 2
            ...
            
        Note: 240 is the Major Number; 0,1,2... are the Minor Numbers

Configure PPP Daemon options: 
    Create a text file in /etc/ppp/options
    Copy and Paste the following:

    -------CUT HERE ----------------------
    persist
    defaultroute
    asyncmap 0
    sync
    lcp-echo-interval 1
    lcp-echo-failure 5

    nobsdcomp
    nodeflate
    nopcomp
    novj
    novjccomp
    noaccomp -am

    #On some CISCO routers we must
    #be in silent mode
    #silent

    #DEBUG Only should be commented out in production
    #nodetach
    #debug
    #kdebug 2

    -------CUT HERE ----------------------


Bind Wanpipe device to PPP Daemon
Create a text file /etc/ppp/peers/isp_wanpipeX (X=1 to 16)

    -------CUT HERE----------------------
    ttyWP0          #Bind to WANPIPE device wanpipe1

    #201.1.1.1:201.1.1.2

    #user bonded-isp-username

    -------CUT HERE----------------------

  

6. PPPD Operation
All wanpipe devices should be started before pppd is started.
   wanrouter start

Once the Wanpipe device is started, PPP connection can be established by calling the pppd call script (created by wancfg):
    pppd call isp_wanpipe1


7. Automating PPPD Startup during Wanrouter Start

Add a wanrouter external script "start" in /etc/wanpipe/scripts directory
The "start" script will get executed after each "wanrouter start" command.

    vi /etc/wanpipe/scripts/start
    ----- CUT HERE ------
    #!/bin/sh

    pppd call isp_wanpipe1

    #Insert any other pppd devices

    -------CUT HERE------
    save and exit

Return to Documentation Home I Return to Sangoma Support