Split bandwidth equally per IP

Linux Advanced Routing and Traffic Control

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

 



 

It’s me again, with the same problem.

I want to be able to split the bandwidth per IP, as I have 10 clients in my LAN and I want to be sure they get the same rate when downloading.

 

I followed all the steps from the HTB manual, but the script can be “beaten” when one uses more connection for downloading (“FlashGet” or “Download Accelerator”).

I have the same rates for all the 10 IP-s in my LAN.

 

Stef Coene told me to decrease the burst. (Indeed, 80k was a huge burst) I did that, but it seams nothing’s changed.

Jon Zeeff said that sfq generally creates a queue per connection. (And that is the reason why clients with more connections get more bandwidth)

 

So I need to change this “per connection” into “per IP”.

Everything is clear, but I do not know what to change into my script to do this.

I guess that I have to change “sfq perturb 10” into something else, but I do not know into what :)

 

 

Here is my script:

 

 

$TC qdisc add dev $LAN_IFACE root handle 1: htb default 30

$TC class add dev $LAN_IFACE parent 1: classid 1:1 htb rate 120kbit ceil 120kbit burst 2k

 

 

#--------default class---------

$TC class add dev $LAN_IFACE parent 1:1 classid 1:30 htb rate 1kbit ceil 120kbit burst 2k

$TC qdisc add dev $LAN_IFACE parent 1:30 handle 300: sfq perturb 10

 

 

 

 

#-----10 client classes-------------

 

$TC class add dev $LAN_IFACE parent 1:1 classid 1:11 htb rate 12kbit ceil 120kbit burst 2k

$FILTER_IP 192.168.0.121 flowid 1:11

$TC qdisc add dev $LAN_IFACE parent 1:11 handle 110: sfq perturb 10

 

$TC class add dev $LAN_IFACE parent 1:1 classid 1:12 htb rate 12kbit ceil 120kbit burst 2k

$FILTER_IP 192.168.0.122 flowid 1:12

$TC qdisc add dev $LAN_IFACE parent 1:12 handle 120: sfq perturb 10

 

 

etc...

 

 

Thanks again for your patience.


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