1

I am trying to setup a traffic shaping by HTB and tc. I have 70,000 users and I want to control the bandwidth of each user, so I create 70000 classes, and assign each ip address to a class by ip table.

Note that I want control each user individual, and I understand to do it. I must create an individual class for each user, but there is a problem to create classes. It doesn't let me to create more than 9999 classid. How can I solve this problem? Is there any other better way to setup this scenario?

2
  • 1
    Ask yourself whether you really have 70000 distinct configuration scenarios. I mean, you're not going to differentiate per-user bandwidth by the kilobit, right? Just define the number of distinct use cases you have (1 Mbps, 5 Mbps, 10 Mbps, 50 Mbps etc.) and then reassign classes to users when you want to change it Jan 26, 2015 at 16:10
  • i want to control maximum and minimum rate so i create 70000 classes . if create some classes and assign ip addreess to classes the bandwidth is shared between users in that class and in this case i just can control the maximum rate not minimum rate and it depend on the number of users that use of this class.
    – samie
    Jan 26, 2015 at 18:53

1 Answer 1

1

As I understood you right, you trying to create 70000 child classes like that (1:1 - 1:70000), am I right? if I am right, have you tried to add some intermediate classes (for example 1:1 - 1:9999, 2:1 -2:9999, etc.) ? You may need to create more complex tree... For example you could classify traffic by subnets at first and by ip at the leaf classes.

2
  • yes you are right . before your answer i didn't know about this kind of classes ( 2:1 - 2:9999) and didn't know that can have this type of class in my scenario. i added it and it worked, very very tank you for your help
    – samie
    Jan 26, 2015 at 23:13
  • I strongly recommend you to read this few times before doing something. Jan 28, 2015 at 8:42

Not the answer you're looking for? Browse other questions tagged .