From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rene 'Lynx' Pfeiffer linux@thing.at Date: Sun, 17 Dec 2000 01:00:45 +0000 Subject: [LARTC] TEQL question Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org
Hello, LARTC!

I have a question concerning TEQL. I have set up two Linux routers for
experimental purposes (kernel 2.4.0-test9). Every router controls 8 modems,=
 one
of the machines is configured as a PPP dial-in server (ppp 2.4b4).

The idea is to increase throughput between both machines via TEQL queuing. =
This
works quite well, but unfortunately TEQL distributes the network load not as
equal as the name TEQL might suggest. If I use ICMP floods all 8 links are
uniformly under load. The same is true for UDP floods. When using single TCP
transfers (for example SCP from the SSH package) not all 8 links are used. =
The
packets use 3 or 4 links of the 8.

The questions is why. I have done some experiments with various applications
(FTP, NFS, SMTP, Real Audio/Video, Netmeeting, ELSA Vision). So far TEQL us=
es
only all 8 links when I flood the routers with packets.

Any ideas? I would like to distribute the load over all 8 links.

Here are the configs (brief, note that some options are heavily influenced =
by
my experiments and not meant to be used in "production" environme=
nts):

PPP options dial-in router:
----------------------------

# PPPD options
SERVER_PPP=3D"192.168.20.1 192.168.20.2 192.168.20.3 192.168.20.4
            192.168.20.5 192.168.20.6 192.168.20.7 192.168.20.8"
SERVER_NET=3D"192.168.20.0/24"
CLIENT_PPP=3D"192.168.00"
CLIENT_NET=3D"192.168.0.0/24"
CLIENT=3D"192.168.10.230"

MTU=3D"1500"

SERVER_OPT=3D"lock asyncmap 0 maxfail 0 idle 300 proxyarp
            logfile /var/log/ppp noauth debug kdebug 3 noipdefault
            persist crtscts"
MULTILINK=3D"multilink"
IPCP_OPTS=3D"lcp-max-configure 30 lcp-max-failure 30 ipcp-max-terminat=
e 10
           ipcp-max-configure 20 ipcp-max-failure 20"
COMP_OPTS=3D"novj novjccomp nobsdcomp nodeflate"

SPEEDW600

After all 8 PPP daemons are initialized I set the routing:

# Activate teql0 and set routing

echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter

$TCC qdisc add dev lo root teql0
$IPC link set teql0 mtu $MTU up
$TCC qdisc del dev lo root teql0
$IPC route add $CLIENT_NET dev teql0
$IPC route add $CLIENT dev teql0

$IPC and $TCC is the path to the ip and the tc binary. The pppX devices are
automatically added to the TEQL queue via the PPP daemon scripts
/etc/ppp/if-up.local and /etc/ppp/if-down.local.

/etc/ppp/if-up.local (basically):

# Put link to teql0 heap
[ ${DEBUG} =3D "yes" ] && logger "Adding $1 to teql0=
 queue"
$TC qdisc add dev $1 root teql0

[ ${DEBUG} =3D "yes" ] && logger "Adding local addre=
ss $4 to teql0"
$IP addr  add $4 dev teql0

[ ${DEBUG} =3D "yes" ] && logger "Deleting route to =
remote address $5"
$IP route del $5

/etc/ppp/if-down.local:

# Remove link from teql0 heap
[ ${DEBUG} =3D "yes" ] && logger "Removing $1 from t=
eql0 queue"
$TC qdisc del dev $1 root teql0

PPP client machine:
--------------------

# PPPD options

SERVER_PPP=3D"192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.4
            192.168.0.5 192.168.0.6 192.168.0.7 192.168.0.8"
SERVER_NET=3D"192.168.0.0/24"
SERVER=3D"192.168.10.231"
CLIENT_PPP=3D"192.168.20"
CLIENT_NET=3D"192.168.20.0/24"

MTU=3D"1500"

#CLIENT_OPT=3D"-detach lock crtscts persist demand idle 1200
             noipdefault init /etc/ppp/chat/init.sh debug kdebug 2
             holdoff 5 noauth novj nobsdcomp nodeflate multilink
             logfile /var/log/ppp"

CLIENT_OPT=3D"nolock asyncmap 0 maxfail 0 holdoff 2 demand persist
            crtscts passive noipdefault proxyarp logfile /var/log/ppp
            noauth debug kdebug 3"
PCP_OPT=3D"lcp-max-configure 20 lcp-max-failure 20"
COMPT_OPT=3D""

SPEED=19200

# Get all active PPP links
cd /proc/sys/net/ipv4/conf/
PPPDEVS=3D`ls -1d ppp*`

# Disable RP filter
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter

# Equalize links
for LINK in $PPPDEVS
do
    echo "Adding $LINK..."
    $TCC qdisc add dev $LINK root teql0
    $IPC addr  add `/usr/local/bin/getpppinfo -l $LINK` dev teql0
    $IPC route del `/usr/local/bin/getpppinfo -r $LINK`
done

# Activate teql0 and set routing
$IPC link set teql0 mtu $MTU up
$IPC route add $SERVER_NET dev teql0
$IPC route add $SERVER dev teql0


Sorry for the script mess. I was glad to see it work and did not have much =
time
for code clean-ups.

Best regards,
Ren=E9

 GNU/Linux Manages! - Support, Administration, Consulting
  RP3191-RIPE       - Networking, Programming, Installation