In my tc configuration (shown below) in one class all bandwidth is shared among connections equally, but I want to share bandwidth among all IP addresses equally.
Now:
192.168.0.2 - 38KB/s
192.168.0.2 - 38KB/s
192.168.0.2 - 37KB/s
192.168.0.3 - 39KB/s
192.168.0.4 - 40KB/s
Expected:
192.168.0.2 - 23KB/s
192.168.0.2 - 21KB/s
192.168.0.2 - 22KB/s
192.168.0.3 - 63KB/s
192.168.0.4 - 65KB/s
Is it possible without creating class for each IP address? Because I have big subnets to manage like 10.0.0.0/8.
These are my iptables rules
ipset add src_set 10.0.0.0/16
ipset add dst_set 192.168.0.0/16
-A FORWARD -m set --match-set src_set src -m set --match-set dst_set dst -j CLASSIFY --set-class 0001:0011
These are my tc rules
~# tc class show dev eth1
class htb 1:10 parent 1:2 leaf 10: prio 3 rate 1000Mbit ceil 1000Mbit burst 126375b cburst 126375b
class htb 1:2 root rate 1000Mbit ceil 1000Mbit burst 126375b cburst 126375b
class htb 1:11 parent 1:2 prio 3 rate 1000Kbit ceil 3000Kbit burst 1725b cburst 1974b
~# tc filter show
~# tc qdisk show
qdisc htb 1: root refcnt 2 r2q 10 default 10 direct_packets_stat 0
qdisc sfq 10: parent 1:10 limit 127p quantum 1514b perturb 10sec
qdisc sfq 11: parent 1:11 limit 127p quantum 1514b perturb 10sec
0 Answers