* [LARTC] Can anyone fix this?
@ 2004-05-19 4:27 Chris Jensen
2004-05-19 11:50 ` Andy Furniss
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Chris Jensen @ 2004-05-19 4:27 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 803 bytes --]
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?
--
Chris Jensen
chris@drspirograph.com
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)
[-- Attachment #2: qos.sh.gz --]
[-- Type: application/x-gzip, Size: 2197 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LARTC] Can anyone fix this?
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
@ 2004-05-19 11:50 ` Andy Furniss
2004-05-19 12:26 ` Chris Jensen
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Andy Furniss @ 2004-05-19 11:50 UTC (permalink / raw)
To: lartc
Chris Jensen wrote:
> 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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LARTC] Can anyone fix this?
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
2004-05-19 11:50 ` Andy Furniss
@ 2004-05-19 12:26 ` Chris Jensen
2004-05-19 14:17 ` Andreas Klauer
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Chris Jensen @ 2004-05-19 12:26 UTC (permalink / raw)
To: lartc
> 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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LARTC] Can anyone fix this?
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
2004-05-19 11:50 ` Andy Furniss
2004-05-19 12:26 ` Chris Jensen
@ 2004-05-19 14:17 ` Andreas Klauer
2004-05-23 12:08 ` Dmitry Golubev
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Andreas Klauer @ 2004-05-19 14:17 UTC (permalink / raw)
To: lartc
Am Wednesday 19 May 2004 14:26 schrieb Chris Jensen:
> 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. :-)
> 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?
> 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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LARTC] Can anyone fix this?
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
` (2 preceding siblings ...)
2004-05-19 14:17 ` Andreas Klauer
@ 2004-05-23 12:08 ` Dmitry Golubev
2004-05-23 16:37 ` Patrick McHardy
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Dmitry Golubev @ 2004-05-23 12:08 UTC (permalink / raw)
To: lartc
Hello,
> 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
On Wednesday 19 May 2004 17:17, Andreas Klauer <Andreas.Klauer@metamorpher.de>
wrote:
> Am Wednesday 19 May 2004 14:26 schrieb Chris Jensen:
> > 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. :-)
>
> > 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?
>
> > 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 / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LARTC] Can anyone fix this?
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
` (3 preceding siblings ...)
2004-05-23 12:08 ` Dmitry Golubev
@ 2004-05-23 16:37 ` Patrick McHardy
2004-05-24 10:53 ` Dmitry Golubev
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Patrick McHardy @ 2004-05-23 16:37 UTC (permalink / raw)
To: lartc
Dmitry Golubev wrote:
> 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
>
> Dmitry
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LARTC] Can anyone fix this?
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
` (4 preceding siblings ...)
2004-05-23 16:37 ` Patrick McHardy
@ 2004-05-24 10:53 ` Dmitry Golubev
2004-05-24 16:23 ` Chris Jensen
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Dmitry Golubev @ 2004-05-24 10:53 UTC (permalink / raw)
To: lartc
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
On Sunday 23 May 2004 19:37, Patrick McHardy <kaber@trash.net> wrote:
> Dmitry Golubev wrote:
> > 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
>
> > Dmitry
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LARTC] Can anyone fix this?
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
` (5 preceding siblings ...)
2004-05-24 10:53 ` Dmitry Golubev
@ 2004-05-24 16:23 ` Chris Jensen
2004-05-24 17:35 ` Stef Coene
2004-05-24 17:53 ` Andreas Klauer
8 siblings, 0 replies; 10+ messages in thread
From: Chris Jensen @ 2004-05-24 16:23 UTC (permalink / raw)
To: lartc
On Sunday 23 May 2004 22:08, Dmitry Golubev wrote:
> Hello,
>
> > 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:
> > > 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)
> > 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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LARTC] Can anyone fix this?
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
` (6 preceding siblings ...)
2004-05-24 16:23 ` Chris Jensen
@ 2004-05-24 17:35 ` Stef Coene
2004-05-24 17:53 ` Andreas Klauer
8 siblings, 0 replies; 10+ messages in thread
From: Stef Coene @ 2004-05-24 17:35 UTC (permalink / raw)
To: lartc
On Sunday 23 May 2004 18:37, Patrick McHardy wrote:
> Dmitry Golubev wrote:
> > 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
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [LARTC] Can anyone fix this?
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
` (7 preceding siblings ...)
2004-05-24 17:35 ` Stef Coene
@ 2004-05-24 17:53 ` Andreas Klauer
8 siblings, 0 replies; 10+ messages in thread
From: Andreas Klauer @ 2004-05-24 17:53 UTC (permalink / raw)
To: lartc
Am Monday 24 May 2004 18:23 schrieb Chris Jensen:
> > Andreas Klauer:
> > > 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/
> 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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-05-24 17:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-19 4:27 [LARTC] Can anyone fix this? Chris Jensen
2004-05-19 11:50 ` Andy Furniss
2004-05-19 12:26 ` Chris Jensen
2004-05-19 14:17 ` Andreas Klauer
2004-05-23 12:08 ` Dmitry Golubev
2004-05-23 16:37 ` Patrick McHardy
2004-05-24 10:53 ` Dmitry Golubev
2004-05-24 16:23 ` Chris Jensen
2004-05-24 17:35 ` Stef Coene
2004-05-24 17:53 ` Andreas Klauer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.