share bandwith fairly
Dear members,
I am trying to share the bandwith for all users fairly. because some users heavily uses p2p programs and a few hosts consume most of bandwith. when we limit each flow it does not work as one client has many connection at same time.
Firstly I tried to write a script that use
the ipfm(which accounts traffic usage) logs as follow
.extract ip addresses heavy bandwith users from log file
.create a new class with 128kbit for that Ip address
. add tc filter for that IP by classify the ip addres with 'match ip dst' parameter.
it works for a few IP. After 4 or 5 ip addresses added it does not work for last added ip addresses.
let me show the lines that I used.
—------- creation of qdisc and parent —------------
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1: htb default 12
tc class add dev eth0 parent 1 classid 1:1 htb rate 10mbit ceil 10mbit
—----works for each IP address found in ipfm logs that exceed the desired bandwith usage —---
tc class add dev eth0 parent 1:1 classid 1:$index htb rate 128kbit ceil 128kbit
tc filter add dev eth0 parent 1: protocol ip prio 1 u32 \match ip dst $ipaddress classid 1:$index
but it does not work good. then I tried to find better solution in maillist. there are some solutions there. but not appropriate to us as they required patching kernel like esfq,routehat,wrr.
is there any suggestion.
Thanks
Note: sorry for my poor english.
Taylan
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 1 line · On Fri, 14 Oct 2005 14:01:20 +0300 "TAYLAN KIRAN" <[email protected]> wrote:
Dear members,
Hi,
Quoted 4 lines
I am trying to share the bandwith for all users fairly. because some users
heavily uses p2p programs and a few hosts consume most of bandwith. when we limit each flow it does not work as one client has many connection at same time.
Ideal for this situation is WRR ( http://wipl-wrr.sourceforge.net/wrr.html ). If you are looking for an integrated solution, see my signature.
Quoted 1 line
Taylan
Yours sincerely,
Peter
Signature · 5 lines
http://www.shurdix.org - Linux distribution for routers and firewalls _______________________________________________ LARTC mailing list [email protected] http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Thank you for your answer. I donwloaded shurdix and tried to install it. but it is really not user friendly. it was difficult for me to install it. after isnatallation i saw that all files are read only. I change the rights but I still couldnt edit the files. also I have many scripts run on my box.
so it is not easy for me to change the system. also as I said I dont want to patch kernel and recompile it. I checked forum for shurdic there isnt any support in english.
system is as following.
2.6.9-1.667smp #1 SMP Tue Nov 2 14:59:52 EST 2004 i686 i686 i386 GNU/Linux
use only one network device.
I saw tc.sh script. As i see it is not applicabe to unpatched kernels like mine .
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc