Can anyone fix this?
Hi,
I appologise for the bad ettiquite of this, but I have tried looking for some HTB examples that would help me, and am having trouble understanding how the tc filters should work, but I can't figure out why this isn't working. I've written this script, based upon the ultimate traffic shaper at LARTC, to try and shape for me and my 3 housemates.
The idea being to give each user approx 1 quarter of the bandwidth, and then subdivide that into 3 priorities.
None of the traffic seems to get clasiffied though.
Can anyone help me out?
Signature · 8 lines
Chris Jensen [email protected] Public Key: http://drspirograph.com/public_key/ Wait: Did you know that there's a direct correlation between the decline of Spirograph and the rise in gang activity? Think about it. - Dr Spirograph (The Simpsons)
Quoted 10 lines · Chris Jensen
Hi,
I appologise for the bad ettiquite of this, but I have tried looking for some HTB examples that would help me, and am having trouble understanding how the tc filters should work, but I can't figure out why this isn't working. I've written this script, based upon the ultimate traffic shaper at LARTC, to try and shape for me and my 3 housemates.
The idea being to give each user approx 1 quarter of the bandwidth, and then subdivide that into 3 priorities.None of the traffic seems to get clasiffied though.
You can't use u32 to filter egress on src if you are NATing - you need to mark in POSTROUTING mangle and filter on fw.
Have a look at the kptd on www.docum.org .
Andy.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 4 lines
You can't use u32 to filter egress on src if you are NATing - you need to mark in POSTROUTING mangle and filter on fw.
Have a look at the kptd on www.docum.org .
Whoops, I was aware of this. I must've sent an old version of the script to the list, cause I had fixed that, and that's not the issue anymore.
Basically I guess what I really need is a good example of filtering and buckets with two or more tiers (all the examples seem to be only one)
eg
root (100kbps)
flatmate1(22kbps) hi prio default lo prio flatmate2-4 (22 kbps each) default (12kbps)
One of the troubles I'm having is setting up defaults. ie. Once a packet is filtered into one of the flatmates, how can I send it to the default bucket if it doesn't fall into the other two categories.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Am Wednesday 19 May 2004 14:26 schrieb Chris Jensen:
Quoted 2 lines
Whoops, I was aware of this. I must've sent an old version of the script to the list, cause I had fixed that, and that's not the issue anymore.
If you make an up-to-date version available somewhere, I'll have a look at it. Don't want to waste my time with some kind of old version. :-)
Quoted 7 lines
root (100kbps)
flatmate1(22kbps) hi prio default lo prio flatmate2-4 (22 kbps each) default (12kbps)
My Fair NAT script [1] uses a very similar structure - however, I did high/default/low prio stuff you desire not with HTB classes, but with a PRIO qdisc attached to the flatmate HTB class. Maybe it's worth a look?
Quoted 3 lines
One of the troubles I'm having is setting up defaults. ie. Once a packet is filtered into one of the flatmates, how can I send it to the default bucket if it doesn't fall into the other two categories.
Is it possible to attach filter rules to HTB classes? All my filters belong to some qdisc, so I don't know.
HTH
Andreas
[1] Fair NAT: http://www.metamorpher.de/fairnat/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello,
Quoted 2 lines
Is it possible to attach filter rules to HTB classes? All my filters belong to some qdisc, so I don't know.
Quote from LATRC: Also, with HTB, you should attach all filters to the root!
Dmitry
Quoted 27 lines · Andreas Klauer
Am Wednesday 19 May 2004 14:26 schrieb Chris Jensen:
Quoted 2 lines
Whoops, I was aware of this. I must've sent an old version of the script to the list, cause I had fixed that, and that's not the issue anymore.
If you make an up-to-date version available somewhere, I'll have a look at it. Don't want to waste my time with some kind of old version. :-)
Quoted 7 lines
root (100kbps)
flatmate1(22kbps) hi prio default lo prio flatmate2-4 (22 kbps each) default (12kbps)My Fair NAT script [1] uses a very similar structure - however, I did high/default/low prio stuff you desire not with HTB classes, but with a PRIO qdisc attached to the flatmate HTB class. Maybe it's worth a look?
Quoted 3 lines
One of the troubles I'm having is setting up defaults. ie. Once a packet is filtered into one of the flatmates, how can I send it to the default bucket if it doesn't fall into the other two categories.
Is it possible to attach filter rules to HTB classes? All my filters belong to some qdisc, so I don't know.
Quoted 7 lines
HTH
Andreas[1] Fair NAT: http://www.metamorpher.de/fairnat/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 1 line · Dmitry Golubev
Quote from LATRC: Also, with HTB, you should attach all filters to the root!
Then LARTC is wrong. HTB first tries to classify by priority, if that fails it follows the filter chain from the root until it hits a leaf-class, if that fails it tries if the default class is a leaf-class, if even that fails it uses the direct queue. BTW, HFSC does it the same way, but there is no direct queue, so unclassified packets are just dropped.
Regards
Patrick
Quoted 2 lines
Dmitry
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello,
What do you mean by direct queue? If I do not have any filter rules for a packet, I thought it would not be limited at all...
Best regards,
Dmitry Golubev
Quoted 11 lines · Patrick McHardy
Quoted 2 lines · Dmitry Golubev
Quote from LATRC: Also, with HTB, you should attach all filters to the root!
Then LARTC is wrong. HTB first tries to classify by priority, if that fails it follows the filter chain from the root until it hits a leaf-class, if that fails it tries if the default class is a leaf-class, if even that fails it uses the direct queue. BTW, HFSC does it the same way, but there is no direct queue, so unclassified packets are just dropped.
Quoted 8 lines
Regards
PatrickQuoted 1 line
Dmitry
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 7 lines · Dmitry Golubev
Hello,
Quoted 2 lines
Is it possible to attach filter rules to HTB classes? All my filters belong to some qdisc, so I don't know.
Quote from LATRC: Also, with HTB, you should attach all filters to the root!
Sorry, my bad, I'm still coming to terms with all the terminology, so probably describe that badly.
But going back to my tree:
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
root (100kbps)
flatmate1(22kbps) hi prio default lo prio flatmate2-4 (22 kbps each) default (12kbps)
Can I set it up (wherever I attach filters) so that unclasified packets will default to flatemate1, and then packets that aren't classified within flatmate fall into the default? (Each flatmate would have their own default)
Quoted 3 lines
Quoted 3 lines
My Fair NAT script [1] uses a very similar structure - however, I did high/default/low prio stuff you desire not with HTB classes, but with a PRIO qdisc attached to the flatmate HTB class. Maybe it's worth a look?
Yes, I'd like to see it if I could. Again, trying to get familiar witht things so I'm not sure weather it would be better to try and nest a PRIO or a HTB in the parent HTB.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 5 lines · Patrick McHardy
Quoted 2 lines · Dmitry Golubev
Quote from LATRC: Also, with HTB, you should attach all filters to the root!
Then LARTC is wrong.
LARC is not up-to-date. It was so in pre-htb3 versions.
Stef
Signature · 6 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Am Monday 24 May 2004 18:23 schrieb Chris Jensen:
Quoted 7 lines
Quoted 5 lines
Andreas Klauer:
Quoted 4 lines
My Fair NAT script [1] uses a very similar structure - however, I did high/default/low prio stuff you desire not with HTB classes, but with a PRIO qdisc attached to the flatmate HTB class. Maybe it's worth a look?
Yes, I'd like to see it if I could.
Well, feel free to download it - I posted the link already at the bottom of the very same mail you quoted above: http://www.metamorpher.de/fairnat/
Quoted 2 lines
Again, trying to get familiar witht things so I'm not sure weather it would be better to try and nest a PRIO or a HTB in the parent HTB.
It's quite easy to replace the class structure my script creates with something else. I don't know if it's better to use more than one HTB class per user - I didn't do it because the (guaranteed) HTB rates for leaf classes would get even lower if I had to divide them. And PRIO works well enough for me, so...
Andreas
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/