From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Oberritter andreas@oberritter.de Date: Fri, 27 Oct 2000 17:58:48 +0000 Subject: [LARTC] question about "rate" Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org
Hi!

I am using DSL with 786Kbit downstream and 128Kbit upstream. When
someone fetches a file from my ftp server, my upstream is completely
blocked and download speeds from the internet of internal clients behind
the router slow down from ~90KB/s to 20-30KB/s. So I decided to limit
upstream bandwidth for access to the ftp-data port. Now I have two
questions:

1.) As you can see below, I allowed 56Kbit for ftp-data transfers. This
results in about 12KB/s. When I enter 64Kbit, full speed is consumed. Am
I doing something wrong here? I thought 96Kbit should result in 12K/s
and 128Kbit were full speed.

2.) How can I allow ftp-data transfers to get files at 128KBit speed,
when there is no other traffic on the line? I want to have ftp transfers
at a sufficient low priority, so that upstream and downstream from and
to internal hosts are not affected by my ftp-servers traffic.


This is the script I wrote:
--------------------------------------->
ALLOT="1492"
AVPKT="1000"
DEV="ppp0"
MAXBURST="20"
MAXRATE="128Kbit"
PERTURB="15"

tc qdisc del dev ${DEV} root handle 10:
tc qdisc add dev ${DEV} root handle 10: cbq bandwidth ${MAXRATE} avpkt
${AVPKT}

tc class add dev ${DEV} parent 10:0 classid 10:1 cbq bandwidth
${MAXRATE} \
        rate ${MAXRATE} allot ${ALLOT} prio 8 maxburst ${MAXBURST} avpkt
${AVPKT}

tc class add dev ${DEV} parent 10:1 classid 10:200 cbq bandwidth
${MAXRATE} \
        rate 56Kbit allot ${ALLOT} prio 5 maxburst ${MAXBURST} avpkt
${AVPKT} \
        bounded

tc qdisc add dev ${DEV} parent 10:200 sfq quantum ${ALLOT}b perturb
${PERTURB}

tc filter add dev ${DEV} parent 10:0 protocol ip prio 25 \
        u32 match ip sport 20 0xFFFF flowid 10:200
<---------------------------------------

Thanks in advance,
Andreas