[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trafic Control Setup



Hi!

Sorry for the empty mail, I accidentally hit return. Now, I'm trying to
set up traffic control on my firewall
which is also serving as a FTP-Server. It is connected to my ISP through
an DSL-Link, 768k down- and 128k upstream.

What I wanted to do is:

Mark packets orginating from the FTP-Server using iptables and the owner
module with some value, all others with some
other value.
Split my (upstream) link in two links, one with 104k bandwidth, the
other with 28 and route all traffic orginating from the FTP
through the smaller one and my own traffic through the other.

Both should be able to borrow bandwidth from each other, but only, if
its not needed for its main purpose.
I've tried the following setup:

(FTP-Traffic is marked with 0x01, everything else with 0x02)

/sbin/tc qdisc add dev ppp0 root handle 10: cbq bandwidth 128kbit avpkt
1000
/sbin/tc class add dev ppp0 parent 10:0 classid 10:1 cbq bandwidth
128kbit rate 128kbit maxburst 20 avpkt 1000
/sbin/tc class add dev ppp0 parent 10:1 classid 10:100 cbq bandwidth
128kbit rate 104kbit maxburst 20 avpkt 1000
/sbin/tc class add dev ppp0 parent 10:1 classid 10:200 cbq bandwidth
128kbit rate 28kbit maxburst 20 avpkt 1000

/sbin/tc qdisc add dev ppp0 parent 10:100 sfq quantum 1514b perturb 15
/sbin/tc qdisc add dev ppp0 parent 10:200 sfq quantum 1514b perturb 15

/sbin/tc filter add dev ppp0 protocol ip parent 10:0 prio 5 handle 0x02
fw classid 10:100
/sbin/tc filter add dev ppp0 protocol ip parent 10:0 prio 5 handle 0x01
fw classid 10:200

The problem is, the FTP-Server is also borrowing bandwidth when its
needed
by the other class, which makes my delay for ACKing incoming data very
high and as a result pulls down my download
rates. I don't understand what the problem is, in my understanding both
should have an almost guaranteed bandwidth.

Thanks for your help,
Patrick McHardy