Re: (PM) Portmaster + EQL hint rqstd

Anthony Green (ninja@hutch.com.au)
Wed, 27 May 1998 15:11:40 +1000 (EST)

>
> Hi,
>
> I'm trying to understand the requirements for EQL with the PM2e,
> on Linux 2.0.32/33
>
> The original documents for the EQL driver which accompany
> the 2.0.32 kernel code
>
> "Equalizer1996: $Revision: 1.9 $ $Date: 1996/10/12 11:14:37 $ Simon
> Jane
> s (simon@ncm.com)\n";
>
>
> The document is dated V1.1 February 27, 1995. Is there an updated
> version? It mentions only SLIP being supported. But we now use
> on the PM2e, quite succesfully PPP connections and make them
> persistent dial-up by running diald.
>
> Does anybody have any hints on how to modify the procedures for
> EQL to use PPP to a portmaster instead of SLIP ?

This is something that I wrote ages ago to help some friends configure EQL
with Slakware linux. You still need to read the eql doc because it tells
you where to get eql_enslave and some other useful info ..

Setup for redhat and debian is a little different .. as debian uses the
provier and chat or pap scripts differently and also the ip-up script ...
as does redhat .. but if you dont know how to set them up .. you shouldnt
be trying to setup EQL =)

Oh .. and yes it works with PPP on the PM2 and PM3 ... dont forget you cannot
span chassis using EQL .. so you have to dialin to the same chassis on the
PM2 or PM3 for both lines.

Also .. EQL gives me faster speeds than Multilink PPP on Winblowz or NT ..with
same modems and phone lines etc.

Hope this helps ...

Regards,

Anthony.

#begin EQL-HOWTO

# $Id: eql.walkthrough,v 1.32 1997/08/07 20:45:07 NiNJA Rel $
#
# EQL Load balancing walkthrough
#
# Copyright (c) 1997 Anthony Green
# Copyright (c) 1997 Hutchison Telecommunications Australia PTY LTD
#
# Permission to use, copy, modify, distribute, and sell this software and
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Anthony Green and Hutchison Telecommunications Australia PTY LTD may not be
# used in any advertising or publicity relating to the software without the
# specific, prior written permission of Anthony Green and Hutchison
# Telecommunications Australia PTY LTD
#
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
#
# SOME PORTIONS OF THIS WALKTHROUGH ARE DISTRIBUTED WITH THE VARIOUS LINUX
# DISTRIBUTIONS AND IS THEREBY BOUND TO THE VARIOUS COPYRIGHT / GNU LICENSES
# STANDING FOR THOSE DISTRIBUTIONS.
#
# IN NO EVENT SHALL ANTHONY GREEN OR HUTCHISON TELECOMMUNICATIONS AUSTRALIA
# PTY LTD BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL
# DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE,
# AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
# USE OR PERFORMANCE OF THIS SOFTWARE.
#
# READING THIS DOCUMENT BINDS THE READER TO THE ABOVE CONDITIONS.
#
# It is assumed that eql is compiled into your kernel and that eql_enslave is
# installed on your system.
#
# ALWAYS MAKE BACKUP COPIES OF ANY SYSTEM FILES YOU INTEND TO CHANGE BEFORE DOING SO!
#

########### /etc/rc.d/rc.inet1

#
# eql stuff
/sbin/ifconfig eql 10.1.1.1 netmask 255.255.255.0 mtu 576

^^^^^^^^ change this to your IP

########### end rc.inet1

DO NOT add defaultroute to eql in rc.inet1 .. that comes in /etc/ppp/ip-up
leave defaultroute to whatever it is currently...

Following is the ppp-eq1 script. You must have 2 of these .. ppp-eq1 and ppp-eq2

Obvoisly, the only thing that changes in both scripts is the name AND the
/dev/eq1 path for each modem.

ie. /dev/eq1 in ppp-eq1 and /dev/eq2 in ppp-eq2 .. or your equivalent! =)

########### /usr/sbin/ppp-eq1

#!/bin/sh
#
# Script to initiate a ppp connection. This is the first part of the
# pair of scripts. This is not a secure pair of scripts as the codes
# are visible with the 'ps' command. However, it is simple.
#
# These are the parameters. Change as needed.
TELEPHONE=94360177 # The telephone number for the connection
ACCOUNT=loginname # The account name for logon (as in 'George Burns')
PASSWORD=password # The password for this account (and 'Gracie Allen')
#INIT=S7=45S0=0L0M0V1X4&c1E1Q0 #modem init string
LOCAL_IP=insert ip add # Local IP address if known. Dynamic = 0.0.0.0
REMOTE_IP=0.0.0.0 # Remote IP address if desired. Normally 0.0.0.0
NETMASK=255.255.255.0 # The proper netmask if needed
#
# Export them so that they will be available at 'ppp-on-dialer' time.
export TELEPHONE ACCOUNT PASSWORD
#
# This is the location of the script which dials the phone and logs
# in. Please use the absolute file name as the $PATH variable is not
# used on the connect option. (To do so on a 'root' account would be
# a security hole so don't ask.)
#
DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
#
# Initiate the connection
#
# I put most of the common options on this command. Please, don't
# forget the 'lock' option or some programs such as mgetty will not
# work. The asyncmap and escape will permit the PPP link to work with
# a telnet or rlogin connection. You are welcome to make any changes
# as desired. Don't use the 'defaultroute' option if you currently
# have a default route to an ethernet gateway.
#
exec /usr/sbin/pppd debug modem -vj crtscts /dev/eq1 38400 \
$LOCAL_IP:$REMOTE_IP netmask $NETMASK connect $DIALER_SCRIPT

########### end ppp-eq1

******************
CHANGES TO ABOVE :
******************

TELEPHONE=94360177 <-- insert telephone number
ACCOUNT=loginname <-- insert login name
PASSWORD=password <-- insert password
LOCAL_IP=insert ip add <-- insert Local IP address

exec /usr/sbin/pppd debug modem -vj crtscts /dev/eq1 38400

^^^^^^^^ change to modem u r using
you must change this in both
ppp-eq1 and ppp-eq2

******* IMPORTANT .. -vj is essential in the above!! Eql DOES NOT work without it.

########### /etc/ppp/ppp-on-dialer
#!/bin/sh
#
# This is part 2 of the ppp-on script. It will perform the connection
# protocol for the desired connection.
#
exec /usr/sbin/chat -v \
TIMEOUT 3 \
ABORT '\nBUSY\r' \
ABORT '\nNO ANSWER\r' \
ABORT '\nRINGING\r\n\r\nRINGING\r' \
'' \rAT \
'OK-+++\c-OK' ATS7=45S0=0L0M0V1X4\&c1E1Q0 \
TIMEOUT 30 \
OK ATDT$TELEPHONE \
CONNECT '' \
ame:--ame: $ACCOUNT \
assword: $PASSWORD

########### end ppp-on-dialer

########### /etc/ppp/ip-up

#!/bin/sh
INTERFACE=$1
DEVICE=$2
SPEED=$3
LOCAL_IP=$4
REMOTE_IP=$5
# ip-up interface-name tty-device speed local-IP-address remote-IP-address
#
# This script is called by the PPP daemon once the IP link is up.
# Its only function is to create the file /etc/ppp/linkinfo.
# Just for fun, we put some information into it.
date >> /etc/ppp/linkinfo
echo "PPP" $1 "is up on" $2 at $3 "baud. Local IP" $4 "- remote IP" $5 >> /etc/ppp/linkinfo
echo "" >> /etc/ppp/linkinfo

if [ $LOCAL_IP = "10.1.1.0" ]
then
/usr/sbin/eql_enslave eql $INTERFACE $SPEED
/sbin/route add default dev eql
fi

############### end ip-up

******************
CHANGES TO ABOVE :
******************

if [ $LOCAL_IP = "10.1.1.0" ] <-- change this to your IP
/usr/sbin/eql_enslave eql $INTERFACE $SPEED <-- make sure this path to
eql_enslave is correct.

***************
WHEN ALL DONE :
***************
# What routing table should look like when eql is up :

GiGzBoX:/etc/ppp# route
Kernel routing table
Destination Gateway Genmask Flags MSS Window Use Iface
BlAh.gigz.net.a * 255.255.255.255 UH 1500 0 0 eth0
hutsgate9.hutch * 255.255.255.255 UH 576 0 0 ppp1
hutsgate9.hutch * 255.255.255.255 UH 576 0 0 ppp0
loopback * 255.0.0.0 U 3584 0 0 lo
default * * U 576 0 12 eql

# end routing table

### How to keep the link up ...

I suggest running a simple script from cron every 1 or 2 mins .. preferably
every 1 mins so that routing can recover quickly ..

*/1 * * * * /script-path/eql-up1 1> /dev/null 2> /dev/null

and then ... for the second link ..

*/1 * * * * /script-path/eql-up2 1> /dev/null 2> /dev/null

######### eql-up1 and eql-up2 sample scripts

######### eql-up1 SCRIPT .. call this from crontab ..

#! /bin/sh
LOCK=/var/run/ppp0.pid
if [ -f $LOCK ]
then
exit 0
else
to_kill=`cat $LOCK`
kill -9 $to_kill
/usr/sbin/ppp-eq1
fi

######### eql-up2 SCRIPT .. call this from crontab ..

#! /bin/sh
LOCK=/var/run/ppp1.pid
if [ -f $LOCK ]
then
exit 0
else
to_kill=`cat $LOCK`
kill -9 $to_kill
/usr/sbin/ppp-eq2
fi

##### end same eql-up1 and eql-up2 sample scripts

NOTE: whether your setup runs the ppp processes as ppp0 and ppp1 is system
dependant .. so check first what they run AS!! .. (using /sbin/route or equivalent)
The lockfile is dependant on this!

Final notes :

1. I have found it better to set mtu to 576 on BOTH links to give optimum transfer
speeds for the two lines.

2. Compiling eql into your kernel and the installation of eql_enslave not included!

3. ALWAYS MAKE BACKUP COPIES OF ANY SYSTEM FILES YOU INTEND TO CHANGE BEFORE DOING SO!

FINALLY!!!!
WHEN ALL DONE !!!

# What ifconfig should look like when eql is up ...

GiGzBoX:~# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0
UP BROADCAST LOOPBACK RUNNING MTU:3584 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0
TX packets:0 errors:0 dropped:0 overruns:0

eql Link encap:Serial Line IP
inet addr:10.1.1.0 Bcast:10.1.1.255 Mask:255.255.255.0
UP RUNNING MASTER MTU:576 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0
TX packets:1422 errors:0 dropped:0 overruns:0

eth0 Link encap:10Mbps Ethernet HWaddr 00:00:E8:D1:17:A1
inet addr:10.1.1.1 Bcast:10.1.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0
TX packets:0 errors:0 dropped:0 overruns:0
Interrupt:11 Base address:0x300

ppp0 Link encap:Point-Point Protocol
inet addr:10.1.1.0 P-t-P:10.1.1.250 Mask:255.255.255.0
UP POINTOPOINT RUNNING SLAVE MTU:576 Metric:1
RX packets:1140 errors:0 dropped:0 overruns:0
TX packets:1247 errors:0 dropped:0 overruns:0

ppp1 Link encap:Point-Point Protocol
inet addr:10.1.1.0 P-t-P:10.1.1.250 Mask:255.255.255.0
UP POINTOPOINT RUNNING SLAVE MTU:576 Metric:1
RX packets:244 errors:0 dropped:0 overruns:0
TX packets:187 errors:0 dropped:0 overruns:0

with this .. the RUNNING SLAVE is the important bit in the ppp*'s ...

Additional info ..... /var/adm/syslog and /var/adm/messages .. what goes thru them

Aug 7 19:18:04 GiGzBoX chat[145]: send (ATS7=45S0=0L0M0V1X4&c1E1Q0^M)
Aug 7 19:18:04 GiGzBoX chat[145]: timeout set to 30 seconds
Aug 7 19:18:04 GiGzBoX chat[145]: expect (OK)
Aug 7 19:18:04 GiGzBoX chat[145]: ^M
Aug 7 19:18:04 GiGzBoX chat[145]: ATS7=45S0=0L0M0V1X4&c1E1Q0^M^M
Aug 7 19:18:04 GiGzBoX chat[145]: OK -- got it
Aug 7 19:18:04 GiGzBoX chat[145]: send (ATDT94360177^M)
Aug 7 19:18:05 GiGzBoX chat[145]: expect (CONNECT)
Aug 7 19:18:05 GiGzBoX chat[145]: ^M
Aug 7 19:18:23 GiGzBoX chat[145]: ATDT94360177^M^M
Aug 7 19:18:23 GiGzBoX chat[145]: CONNECT -- got it
Aug 7 19:18:23 GiGzBoX chat[145]: send (^M)
Aug 7 19:18:23 GiGzBoX chat[145]: expect (ame:)
Aug 7 19:18:23 GiGzBoX chat[145]: 38400^M
Aug 7 19:18:25 GiGzBoX chat[145]: ^M
Aug 7 19:18:25 GiGzBoX chat[145]: ^M
Aug 7 19:18:25 GiGzBoX chat[145]: Username: -- got it
Aug 7 19:18:25 GiGzBoX chat[145]: send (USERNAME^M)
Aug 7 19:18:25 GiGzBoX chat[145]: expect (assword:)
Aug 7 19:18:25 GiGzBoX chat[145]: USERNAME^M
Aug 7 19:18:25 GiGzBoX chat[145]: Password: -- got it
Aug 7 19:18:25 GiGzBoX chat[145]: send (PASSWORD^M)
Aug 7 19:18:26 GiGzBoX pppd[142]: Serial connection established.
Aug 7 19:18:27 GiGzBoX pppd[142]: Using interface ppp0
Aug 7 19:18:27 GiGzBoX pppd[142]: Connect: ppp0 <--> /dev/eq1
Aug 7 19:18:29 GiGzBoX pppd[142]: local IP address 10.1.1.0
Aug 7 19:18:29 GiGzBoX pppd[142]: remote IP address 10.1.1.250
Aug 7 20:06:06 GiGzBoX pppd[510]: pppd 2.2.0 started by root, uid 0
Aug 7 20:06:07 GiGzBoX chat[511]: timeout set to 3 seconds
Aug 7 20:06:07 GiGzBoX chat[511]: abort on (\nBUSY\r)
Aug 7 20:06:07 GiGzBoX chat[511]: abort on (\nNO ANSWER\r)
Aug 7 20:06:07 GiGzBoX chat[511]: abort on (\nRINGING\r\n\r\nRINGING\r)
Aug 7 20:06:07 GiGzBoX chat[511]: send (rAT^M)
Aug 7 20:06:07 GiGzBoX chat[511]: expect (OK)
Aug 7 20:06:08 GiGzBoX chat[511]: rAT^M^M
Aug 7 20:06:08 GiGzBoX chat[511]: OK -- got it
Aug 7 20:06:08 GiGzBoX chat[511]: send (ATS7=45S0=0L0M0V1X4&c1E1Q0^M)
Aug 7 20:06:08 GiGzBoX chat[511]: timeout set to 30 seconds
Aug 7 20:06:08 GiGzBoX chat[511]: expect (OK)
Aug 7 20:06:08 GiGzBoX chat[511]: ^M
Aug 7 20:06:09 GiGzBoX chat[511]: ATS7=45S0=0L0M0V1X4&c1E1Q0^M^M
Aug 7 20:06:09 GiGzBoX chat[511]: OK -- got it
Aug 7 20:06:09 GiGzBoX chat[511]: send (ATDT94360177^M)
Aug 7 20:06:09 GiGzBoX chat[511]: expect (CONNECT)
Aug 7 20:06:09 GiGzBoX chat[511]: ^M
Aug 7 20:06:32 GiGzBoX chat[511]: ATDT94360177^M^M
Aug 7 20:06:32 GiGzBoX chat[511]: CONNECT -- got it
Aug 7 20:06:32 GiGzBoX chat[511]: send (^M)
Aug 7 20:06:32 GiGzBoX chat[511]: expect (ame:)
Aug 7 20:06:32 GiGzBoX chat[511]: 38400^M
Aug 7 20:06:34 GiGzBoX chat[511]: ^M
Aug 7 20:06:34 GiGzBoX chat[511]: ^M
Aug 7 20:06:34 GiGzBoX chat[511]: Username: -- got it
Aug 7 20:06:34 GiGzBoX chat[511]: send (USERNAME^M)
Aug 7 20:06:34 GiGzBoX chat[511]: expect (assword:)
Aug 7 20:06:34 GiGzBoX chat[511]: USERNAME^M
Aug 7 20:06:34 GiGzBoX chat[511]: Password: -- got it
Aug 7 20:06:34 GiGzBoX chat[511]: send (PASSWORD^M)
Aug 7 20:06:35 GiGzBoX pppd[510]: Serial connection established.
Aug 7 20:06:36 GiGzBoX kernel: registered device ppp1
Aug 7 20:06:36 GiGzBoX pppd[510]: Using interface ppp1
Aug 7 20:06:36 GiGzBoX pppd[510]: Connect: ppp1 <--> /dev/eq2
Aug 7 20:06:38 GiGzBoX pppd[510]: local IP address 10.1.1.0
Aug 7 20:06:38 GiGzBoX pppd[510]: remote IP address 10.1.1.250

thats all folks =)

NiNJA.
7/8/97

#end EQL-HOWTO

Regards,

-- 
anthonyg@hutch.com.au
Anthony Green
B. Information Technology and Communication	http://www.hutchison.com.au
Hutchison Internet				Level 1, 40 Pacific Highway
Technical Sales Consultant			St Leonards NSW 2065
Hutchison Telecommunications (Australia) Ltd	Phone: +61-2-99644888
Telecommunications from Hutchison Whampoa Ltd	Fax:   +61-2-99644848
-
To unsubscribe, email 'majordomo@livingston.com' with
'unsubscribe portmaster-users' in the body of the message.
Searchable list archive: <URL:http://www.livingston.com/Tech/archive/>