[LARTC] Service Loading

Linux Advanced Routing and Traffic Control

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

 



Hi,

My apologies if I've just missed the point here (I have scanned the
archives).

I have a server with an FTP service on one IP, a HTTP service on the
other. I wish to make all the upstream bandwidth available for FTP
unless an HTTP request arrives - at which point I want to throttle FTP
back and give the majority of the bandwidth to the HTTP session.

In order to test this I have the following script (I'm sure I've just
missed the point somewhere along the line):-

tc qdisc del dev ppp0 root
tc qdisc add dev ppp0 root handle 10: cbq bandwidth 10Mbit avpkt 1000

tc class add dev ppp0 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate
\
128kbit allot 1514 prio 1 maxburst 20 avpkt 1000

tc class add dev ppp0 parent 10:1 classid 10:2 cbq bandwidth 10Mbit rate
\
10kbit allot 1514 prio 8 maxburst 20 avpkt 1000

tc filter add dev ppp0 parent 10:0 protocol ip pref 60 u32 \
match ip dst 0.0.0.0/0  flowid 10:1

tc filter add dev ppp0 parent 10:0 protocol ip pref 50 u32 \
match ip src my.ftp.server flowid 10:2

As I understand it 10:2 is a child of 10:1. As I have set the priority
of 10:2 to 8 and the priority of 10:1 to 1 then a request meeting 10:1
will have a much higher priority and the bandwidth will all be assigned
to the 10:1 session and not loan any bandwidth to 10:1.

In reality this doesnt work! If I make 10:2 bounded then it throttles
back to 10kbs. If I remove bounded it borrows bandwidth from its parent
- even at the cost of a 10:1 session.

Comments as to :-

a) why this doesn't work
b) whether this is the best way of handling this problem

....will be greatly appreciated!

With thanks,

Steve.




[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux