Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

limiting downloads with tc. it works but....

0 views
Skip to first unread message

Christian Zink

unread,
Mar 3, 2005, 8:42:31 AM3/3/05
to
hi all,

i am using the "normal" wshaper with following settings:

DOWNLINK=760
UPLINK=110
DEV=ppp0

my local network is at eth0 and limiting its upload means limiting the
download of the ppp0.

i managed to shape down ftp-traffic with these lines of code:

------------------------------------------------------

tc qdisc add dev eth0 root handle 11: cbq bandwidth 100Mbit avpkt 1000
mpu 64
tc class add dev eth0 parent 11:0 classid 11:2 cbq rate 500kbit allot
1600 prio 2 avpkt 1000 bounded

tc filter add dev eth0 parent 11:0 protocol ip prio 14 u32 match ip
dport 20 0xffff flowid 11:2
tc filter add dev eth0 parent 11:0 protocol ip prio 14 u32 match ip
sport 20 0xffff flowid 11:2
tc filter add dev eth0 parent 11:0 protocol ip prio 14 u32 match ip
dport 21 0xffff flowid 11:2
tc filter add dev eth0 parent 11:0 protocol ip prio 14 u32 match ip
sport 21 0xffff flowid 11:2

------------------------------------------------------

no comes the BUT. this lines of code limit the ftp traffic to 500kbit.
thats a hard limit. what i really want to do is this: ftp should never
ever steal one byte from the bandwith that is needed by other kinds of
traffic. ie http, ssh etc. but in the case of a "free line" it should
take everything it can. i made several tests with different settings.
the setup has always been the same: a big download with ftp and then i
start a download via http. (by the way i am using active ftp so the
rules above work). what happened: ftp and http download each get about
50% of the bandwith. when i stop the ftp download, the http
downloadrate increases. what should have happened ? : the http
download should go to its maximum (the maximum the server is serving)
so maybe to my whole download bandwith and the rest (if any) should be
left for ftp.

does anyone have an idea ?

chris

0 new messages