share bandwith fairly

Linux Advanced Routing and Traffic Control

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

 



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
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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