Shaping services and users (2nd time)
Hello,
I am making a HTB script for a few people and I wanted to ask a question.
Now I have a nice script with this hierarchy of classes.
root(128/128)
+---WWW(32/128) +---Default(32/128) +---P2P(1/64) #P2P Programs like DC and Kazza +---....
How should I implement limiting the speed of some users (by IP addresses)? I had an idea, but it looks too compicated. What do you think?
Let's say I want IP2 To be limited to have the speed max. 64kbits.
Will this idea work?
root(128/128)
+IP1(32/128)-----WWW(32/128)
| +---Default(10/128) | +---P2P(1/64) | +---... | +IP2(32/64)------WWW(32/64) | +---Default(10/64) | +---P2P(1/64) | +---...
+IP2(32/64)--....
...
Thanks,
Phill
PS: Sorry if I posted this twice (that was my mistake).
Oh, I am sorry, I knew that, it's jsut that I was playing with the numbers and I didn't check the sums.
I know how to shape traffic coming from different users, ..protocol ip dst IP...etc, And I know how to shape traffic from each service. I just don't know how to glue them together.
So what abou this? The point is that I want to be able to shape both the services and the IPs.
root(128/128)
+IP1(32/128)-----WWW(20/128)
| +---Default(10/128) | +---P2P(1/64) | +---... | +IP2(32/64)------WWW(20/64) | +---Default(10/64) | +---P2P(1/64) | +---...
+IP3(32/64)--....
...
-Phill
Quoted 3 lines
You could nest class...
It is desirable that the sum of rates of a Child Class = to the Parent Class.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 17 lines · Phill
Oh, I am sorry, I knew that, it's jsut that I was playing with the numbers and I didn't check the sums.
I know how to shape traffic coming from different users, ..protocol ip dst IP...etc, And I know how to shape traffic from each service. I just don't know how to glue them together.
So what abou this? The point is that I want to be able to shape both the services and the IPs.
root(128/128)
+IP1(32/128)-----WWW(20/128)| +---Default(10/128) | +---P2P(1/64) | +---...
Quoted 8 lines
+IP2(32/64)------WWW(20/64)
| +---Default(10/64) | +---P2P(1/64) | +---...+IP3(32/64)--....
...
You need a set of filters attached to the root qdisc so the traffic for the different IP's are placed in the IPx class. Then you need a second set of filters attached to the IPx classes and redirect all traffic to the different sub classes.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/