Wanpipe: Configuration Manual
Wanpipe: Configuration Manual
CONFIGURATION MANUAL
By Nenad Corbic
LIMITED USE WARRANTY
WANPIPE Driver for Linux operating system Copyright © 1995-2003 Sangoma Technologies Inc.
WANPIPE drivers are distributed with the purchase of Sangoma S-series cards. The drivers, where distributed in source form, are
free software; you can redistribute and/or modify them under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or any later version.
Where code is provided in object form only, this code remains the property of Sangoma Technologies Inc. and may be used only
in conjunction with Sangoma products. Object code may not be unassembled or reverse engineered for any reason.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Sangoma Technologies
Contents
Text Description
[] Text within square brackets represents keyboard keys. For example [Enter] or [p].
Combinations of keys held down together are indicated using the plus sign as in the
example: [Alt+p].
<> Text within pointy brackets represents any command or argument after a
command. For example, <arg> represents an argument.
Courier
Font Text in this font indicates a directory name, a file name or a command string.
Bold Bold text is used to draw attention to a new concept, or to highlight choices in
description of a configuration.
The table below displays icons used to draw attention to items of note.
Icon Description
1. Configuration Process
In this process, generate a detailed configuration file that describes the hardware, protocol
and IP options as well as location of the adapter firmware. Create a new configuration file
for each WANPIPE device.
! Note: A WANPIPE device does not describe a physical card, but a logical
implementation of the number of physical lines connected to a Sangoma
adapter. For example, a S5141 card contains a single CPU with two physical
ports: a High-Speed port (up to 4Mbps) and a Low-Speed port (up to
512Kbps). Each port can support an independent physical connection.
Start wancfg
To simplify the WANPIPE configuration process, use a GUI configuration utility called
wancfg. It is located in the /usr/sbin directory. Start the utility with the following
command:
/usr/sbin/wancfg
! Note: wancfg has extensive help files for each WANPIPE option.
1. From the Main Menu, select Create a new Configuration File. Position the
curser on <Select> and press [Enter]. The Select a New Wan Device Name
screen appears.
With the curser on <Select>, press [Enter]. The Main WANPIPE Configuration:
New Configuration screen appears.
3. In this screen, the protocol definition indicates Undefined. With the curser on
<Select>, press [Enter]. The WAN Protocol list appears. Choose a protocol from
the list.
With the curser on <Back>, press [Enter] to return to the Main WANPIPE
Configuration: New Configuration screen.
4. The screen title changes to show the selected protocol. The protocol definition
also shows the selected protocol.
Two new setup categories indicate Undefined. Select Hardware Setup. With the
curser on <Select>, press [Enter]. The Physical Link screen appears.
5. Select Probe Hardware. With the curser on <Select>, press [Enter]. The Select
a WANPIPE Device screen appears.
6. Select a device from the list on this screen. Note the right-hand portion of each
line item shows the Port option. Usually PORT=PRI is used. Make a note of this
value.
Important: After the hardware probe section, you will notice that the next four
fields have been filled out. Thus, adapter type and PCI info should be skipped.
All other options should be left as DEFAULT unless you have special
information.
8. If CSU/DSU is detected, the CSU/DSU Setup screen appears. If this screen does
not appear, continue with next numbered step.
The new S514-4 and S514-7 T1/E1 cards that contain an onboard T1/E1
CSU/DSUs are configured in /usr/sbin/wancfg.
Check with the line provider for the speed of the fractional T1/E1 line (for
example, 64K, 128k ... 1.5M). The fractional T1 consists of 24 channels and E1
consists of 32 channels each 64K. Using the CSU/DSU, configure the line speed
by enabling or disabling channels 1 to 24/32.
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
Full E1 (2.048M) : Enable 1 to 32
9. If Network Interface protocols are detected, the Network Interface Setup line
appears as Undefined. If this line does not appear, continue with next numbered
step.
Options that appear on the network interface set-up screen depend on the type of
connection detected.
Frame Relay supports many interfaces, each bound to a DLCI. There are
questions related to the number of DLCIs and configuration information for each
DLCI.
Fill in ISP-specific data from information received from your Service Provider as
described in Appendix A of this guide. Other settings in this section remain as
default values.
10. Once all network interfaces are set, keep hitting the Back button until you reach
the Main Menu.
At the Main Menu, select Exit and save the config file.
! Note: The card does not have to be connected to start the wanrouter.
This will show a report with syntax errors found in the configuration file.
This will show a report with device driver configuration operational errors.
To start this newly configured device on boot up, edit wanrouter.rc by appending this
device by name in the WAN_DEVICES section. For example:
By default, wanpipe1 is already in place. Add each device after number 1 to reflect your
unique system configuration.
All device names must be inside quotation marks and separated by a single space. Please
refer to the Appendix A for information on how to configure each protocol.
With Sangoma S508FT1 and S514-3 FT1 cards, configure the on-board CSU/DSU
separately using the /usr/sbin /cfgft1 utility.
! Note: This section relates to only the S514-3 and S508FT1 cards. The new
S514-4 and S514-7 T1/E1 cards use /usr/sbin/wancfg for this function.
Check with your T1 provider for the speed of the fractional T1 line (64K, 128k ...
1.5M). The fractional T1 consists of 24 channels each 64K. Using the CSU/DSU,
configure 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
Start and stop the WANPIPE device using the wanrouter command. This will test
the wanpipe#.conf file and make sure that the card is present.
wanrouter start
wanrouter stop
2. CFGFT1 Requirements
! Note: The cfgft1 utility is NOT supported for 2.0.X Kernels. In case of 2.0.X
Kernels use the /usr/sbin/cpipemon debugging/configuration
utility. For more information, run the program without any arguments, and
read the help information.
3. Run CFGFT1
The CFGFT1 utility contains all help files necessary to configure the CSU/DSU.
/usr/sbin/cfgft1 wanpipe1
This is a text based configuration mode, where commands are sent to the
CSU/DSU directly. It should be used if standard configuration does not meet the
requirements.
This option works only for B8ZS encoding and ESF framing modes. It will try to
detect the speed of the line and automatically configure the CSU/DSU.
• Frame Relay
• Cisco HDLC
• PPP
• ADSL
• ATM
• X.25
Frame Relay is a simplified form of Packet Switching similar in principle to X.25 in which
synchronous frames of data are routed to different destinations depending on header
information.
Frame Relay is cost effective, partly because the network buffering requirements are
carefully optimized. Compared to X.25, with its store and forward mechanism and full error
correction, network buffering is minimal. Frame Relay is also much faster than X.25. The
frames are switched to their destination with only a few byte times delay, as opposed to
several hundred milliseconds delay on X.25.
Mode Description
WANPIPE MODE The Linux Kernel uses Frame Relay logical channels to route
packets to remote networks, using TCP/IP protocol.
API MODE Frame Relay API mode is used to send non-IP traffic over a
Frame Relay link. The API interface allows the user to build a
custom application on top of the Frame Relay link in order to
transmit custom data packets (i.e. Non IP). Voice-over IP, Data
capture and packet analysis are examples of custom applications.
BRIDGING MODE The ‘Kernel bridge’ is used to bridge multiple Frame Relay logical
channels together into a single LAN. This option is desirable if IP
addresses are scarce, or if building a single LAN architecture.
Multiple remote LANs can be bridged together into a single LAN
using the Frame Relay (WAN) links.
• Clocking Mode
In most cases clocking will be External (i.e. the ISP will supply the clock)
Frame Relay has number of signaling options: LMI, ANSI, Q933 (default is ANSI)
• NODE: switch emulation: This option should only be used in back-to-back test
situation, with two Sangoma card. Sangoma can act as a switch, however, in
most cases that is performed by the ISP.
• CSU/DSU Configuration:
Sangoma S574-4/7/8, T1/E1 CARDS and S514-3/S508FT1 cards are supplied with an
onboard CSU/DSU that needs to be configured, based on the type of line to which it is
connected.
As mentioned in the section above, the resident Sangoma WANPIPE Frame Relay
configuration is limited in that it cannot run on a Secondary port on the Sangoma adapter
(S514/S508). Support for Multi-Port Frame Relay was developed to address this limitation.
The Multi-Port Frame Relay is a standard implementation of Frame Relay protocol
implemented in the Linux Kernel. It is not resident in WANPIPE firmware.
Important: Since the Multi-Port Frame Relay is implemented in the Kernel, the
second port is freed up. As a result, multiple independent Frame Relay
connections can be established on both Sangoma adapter ports
simultaneously.
Mode Description
WANPIPE MODE The Linux Kernel uses Frame Relay logical channels to
route packets to remote networks, using TCP/IP protocol.
• Clocking Mode
In most cases clocking will be External (i.e. the ISP will supply the clock)
Frame Relay has number of signaling options: LMI, ANSI, Q933 (default is ANSI)
• CSU/DSU Configuration:
Cisco HDLC is a point-to-point protocol implemented on top of HDLC layer 2. As the name
implies CHDLC is a protocol mostly used to connect to the Cisco external routers.
Mode Description
WANPIPE MODE The Linux Kernel uses the CHDLC point-to-point link to route
packets to a remote network, using TCP/IP protocol.
API MODE CHDLC mode used to send non-IP traffic over a CHDLC point-
to-point link. The API interface allows the user to build a custom
application on top of the CHDLC link in order to transmit custom
data packets (i.e. Non IP). An example of a custom application
would be a Satellite Receive Only data collector or Data capture
and packet analysis tool.
BRIDGING MODE The ‘Kernel bridge’ is used to bridge multiple Frame Relay
logical channels together into a single LAN. This option is
desirable if IP addresses are scarce, or in building a single LAN
architecture. Thus, multiple remote LANs can be bridged
together into a single LAN using the Frame Relay (WAN) links.
• Clocking Mode
In most cases clocking will be External (i.e. the ISP will supply the clock)
• CSU/DSU Configuration
PPP Configuration
Point-To-Point Protocol (PPP) is a protocol implemented on top of the second HDLC layer.
PPP is a standard protocol used when connecting over a point-to-point link.
Mode Description
• Clocking Mode
In most cases clocking will be External (i.e. the ISP will supply the clock)
• CSU/DSU Configuration
Configure the onboard CSU/DSU based on the type of line to which the Sangoma
card is connected.
As mentioned in the section above, the resident Sangoma WANPIPE PPP configuration is
limited in that it cannot run on a Secondary port. Support for Multi-Port PPP was developed
to address this limitation. The Multi-Port Synchronous PPP is a standard implementation of
PPP protocol implemented in the Linux Kernel. It is not resident in WANPIPE firmware.
Important: Since the Multi-Port PPP is implemented in the Kernel, the second
port is freed up. As a result, multiple independent PPP connections can be
established on both Sangoma adapter ports simultaneously.
Mode Description
WANPIPE MODE The Linux Kernel uses the PPP point-to-point link to route packets
to a remote network, using TCP/IP protocol.
• Clocking Mode
In most cases clocking will be External (i.e. the ISP will supply the clock)
• CSU/DSU Configuration
ADSL Configuration
The S518 card and WANPIPE together provide universal ADSL support for all versions and
distributions of Linux. The S518 provides a robust, stable ADSL link at the highest possible
line speeds to any currently installed DSLAM.
All ADSL networks use ATM ALL5 protocol as its data link layer. ATM in turn can transport
multiple protocols such as: Classical IP, Bridged Ethernet (PPPoE), and PPPoA. WANPIPE
supports full ATM AAL5 protocol as well as support for all upper layer protocols.
Mode Description
The Linux Kernel uses the ADSL link to route packets to a remote
WANPIPE MODE network, using TCP/IP protocol.
This mode is available to both Classical IP over ATM and Ethernet over
ATM configurations. In this mode, IP info must be supplied by the user.
(IP Info is usually obtained by Telco)
• Higher protocols such as PPPoE and PPPoA are not implemented in WANPIPE
drivers. One must use third party utilities over WANPIPE interfaces to implement the
desired protocol.
• PPPoE Configuration:
Download: ftp.sangoma.com/linux/utilities/rp-pppoe-3.4.tar.gz
Untar it in a temporary directory and read the README file for installation and
configuration instructions.
• PPPoA Configuration:
One must configure the Kernel "pppd" daemon over, wanpipe /dev/ttyWP{X}
device, which is created on wanrouter startup.
ATM Configuration
ATM protocol support for S514 (T1/E1/V35) cards. Using the ATM protocol and
S514/T1/E1/V35 adapters, customers can connect to an ATM backbone network via T1 or
E1 line.
Wanpipe ATM protocol supports ALL5 framing. ATM in turn can transport multiple
protocols such as: Classical IP, Bridged Ethernet (PPPoE). WANPIPE supports full ATM
AAL5 protocol as well as support for all upper layer protocols.
Mode Description
WANPIPE MODE The Linux Kernel uses the ADSL link to route packets to a remote
network, using TCP/IP protocol.
This mode is available to both Classical IP over ATM and Ethernet over
ATM configurations. In this mode, IP info must be supplied by the user.
(IP Info is usually obtained by Telco)
PPPoE MODE This mode is only available when ATM is configured to carry Bridged
Ethernet protocol. The PPPoE layer in turn operates over an Ethernet
protocol.
Higher protocols such as PPPoE and PPPoA are not implemented in WANPIPE drivers.
Use third party utilities over WANPIPE interfaces to implement the desired protocol.
• PPPoE Configuration:
Download: ftp.sangoma.com/linux/utilities/rp-pppoe-3.4.tar.gz
Untar it in a temporary directory and read the README file for installation and
configuration instructions.
Configure the Kernel "pppd" daemon over, wanpipe /dev/ttyWP{X} device, which
is created on wanrouter startup.
X.25 Configuration
X.25 Packet Switched networks allow remote devices to communicate with each other
across high-speed digital links without the expense of individual leased lines. Packet
Switching is a technique whereby the network routes individual packets of HDLC data
between different destinations based on addressing within each packet.
The protocol known as X.25 encompasses the first three layers of the OSI 7-layered
architecture as defined by the International Organization for Standardization (ISO) as
follows:
• Layer 1: The Physical Layer is concerned with electrical or signaling. It includes several
standards such as V.35, RS232 and X.21.
• Layer 2: The Data Link Layer, which is an implementation of the ISO HDLC standard
called Link Access Procedure Balanced (LAPB) and provides an error free link
between two connected devices.
Mode Description
WANPIPE The Linux Kernel uses X.25 logical channels to route packets to remote
MODE networks, using TCP/IP protocol.
API MODE X.25 API mode is used to send non-IP traffic over an X.25 link. Using the
WAN API suite, a vast range of applications can be developed, such as:
Credit card verification, Voice-over IP, Protocol/Line Data Scope, Satellite
Communication, protocol conversion and Legacy interconnect.
• Permanent Virtual Circuits (PVC). PVC line is always connected, thus not
calls setup is required.
The ISP must provide LOWEST (SVC/PVC) and HIGHEST (SVC/PVC) numbers.
• Clocking Mode
In most cases clocking will be External (i.e. the ISP will supply the clock)
• X.25 Station
The standard WANPIPE PPP (supported in firmware) has the following limitations:
Mode Description
! Note: Both modes are using for ROUTING purposes. That means there is no
API support.
Because the Sync/Async PPP is implemented in the Kernel, the second port is freed up. As
a result, multiple independent PPP connections can be established on both Sangoma
adapter ports simultaneously.
Using the PPPD daemon, Kernel Sync-PPP layer and the WANPIPE sync TTY driver, a
PPP protocol connection can be established via the Sangoma adapter, over a T1 leased
line.
The 2.4.0 Kernel PPP layer supports MULTILINK protocol. It can be used to bundle any
number of Sangoma adapters (T1 lines) into one, under a single IP address, efficiently
obtaining multiple T1 throughputs.
! Note: The remote side must also implement MULTILINK PPP protocol.
Using the PPPD daemon, Kernel Async PPP layer and the WANPIPE async TTY driver, a
PPP protocol connection can be established via the Sangoma adapter and a modem, over
a telephone line.
The WANPIPE Async TTY driver simulates a serial TTY driver that is normally used to
interface the MODEM to the Linux Kernel.
Device /dev/ttyWP(0,1,2..)
Important: This option should only be used if the MULTILINK option desired,
to bundle T1 connections together or to simulate a serial async device driver.
Otherwise, it is recommended that standard WANPIPE PPP be used.
The WANPIPE TTY driver has very few options since main configuration options will be
defined during the PPPD daemon configuration.
The driver operation mode must be specified here, since the driver cannot obtain
the operation mode from the pppd configuration calls. If the driver operation mode
is synchronous then the pppd must be invoked with the sync option.
All subsequent drivers must be configured with the same TTY MODE and
different MINOR numbers.
wancfg Utility
The wancfg utility will configure the pppd daemon according to the TTY_MODE selected.
It will also prompt the user for MULTILINK support. Three files will be created for each
WANPIPE device:
• WANPIPE TTY drivers must be started before the pppd attempts to open a
/dev/ttyWPX device. For example:
• Once the WANPIPE device is started, the PPP connection can be established by
calling the pppd call script (created by wancfg). For example:
Depending on the TTY MODE used, the pppd configuration file must be configured for
synchronous or asynchronous operation.
The pppd daemon uses an options configuration file found in /etc/ppp directory. An options
configuration file exists for each /dev/ttyX device. For a /dev/ttyWP0 device, an async
options file or a sync options file must be created in /etc/ppp directory, as described below:
/etc/ppp/options.ttyWP0
Option Description
asyncmap 0
silent Wait until ppp request is received before starting ppp protocol
(optional).
/etc/ppp/options.ttyWP0
Option Description
asyncmap 0
silent #Wait until ppp request is received before starting ppp protocol
(optional).
defaultroute #IP address of this interface should be set as default in the routing
table.
A call pppd script can also be defined to simplify the pppd argument line. The call script
must be defined in /etc/ppp/peers directory. The example call script will be called
isp_async or isp_sync as described below:
/etc/ppp/peers/isp_wanpipe1:
! Note: In async mode, WANPIPE TTY drivers are always set to internal
clockin, and the baud rate needs to be set here. The driver obtains the baud
rate through pppd configuration calls, not wanpipe1.conf configuration file as
in the synchronous configuration.
/etc/ppp/peers/isp_wanpipe1:
! Note: The baud rate is not needed since the Sync Wanpipe TTY drivers obtain
the baud rate from the Wanpipe configuration files (wanpipe1.conf).
To start the pppd daemon using the above script, use this command:
One of the major reasons for WANPIPE TTY driver development was MULTILINK PPP.
The 2.4.X Kernels support this protocol, which can bundle multiple WANPIPE T1 cards into
a singe logical connection to achieve greater throughput.
MULTILINK PPP protocol can be used in Sync or Async mode. The following configuration
changes need to be applied to the above pppd call scripts in order to support multilink.
The /etc/options.ttyWPX files do not change. Only the call scripts do:
/etc/ppp/peers/isp_wanpipe1
/etc/ppp/peers/isp_wanpipe2
/etc/ppp/peers/isp_wanpipe1
/etc/ppp/peers/isp_wanpipe2
To start the pppd daemon and bundle the two links together follow the example:
Once the first ppp connection comes up then start the second.
• If you have ATM VPI/VCI information, disable ATM auto configuration and
specify the VPI/VCI combination. Otherwise, try to autodetect the VPI/VCI
numbers.
2. Untar the rp-pppoe-3.4.tar.gz in tmp/ directory and read the README file.
• If you have ATM VPI/VCI information, disable ATM auto configuration and
specify the VPI/VCI combination. Otherwise, try to autodetect the VPI/VCI
numbers.
Configure PPPD daemon for a synchronous PPP connection over the /dev/ttyWP device
created by the WANPIPE driver. The PPPD configuration consists of three files.
1. /etc/ppp/options.<ttyname>
2. /etc/ppp/peer/<isp_call_script_name>
3. /etc/ppp/pap-secrets or /etc/ppp/chap-secrets
/etc/ppp/options.ttyWP0
Option Description
asyncmap 0
silent #Wait until ppp request is received before starting ppp protocol
(optional).
defaultroute #IP address of this interface should be set as default in the routing
table.
A call pppd script can also be defined to simplify the pppd argument line. The call script
must be defined in /etc/ppp/peers directory. The example call script will be called
isp_sync as described below:
/etc/ppp/peers/isp_wanpipe1:
! Note: The baud rate is not needed since the Sync Wanpipe TTY drivers obtain the
baud rate from the Wanpipe configuration files (wanpipe1.conf).
To start the pppd daemon using the above script, use this command: