* [LARTC] cascaded HTB urgent question
@ 2003-04-28 8:50 Osama Abu Elsorour
2003-04-28 9:33 ` Alexey Sheshka
2003-04-28 9:36 ` Rob Cresswell
0 siblings, 2 replies; 3+ messages in thread
From: Osama Abu Elsorour @ 2003-04-28 8:50 UTC (permalink / raw)
To: lartc
Hi there,
I have a question with regards to cascading multiple HTB qdiscs. Assume
that I want to build the following hierarchy:
(qdisc htb 1:0) -> (class htb 1:1) -> (qdisc htb 2:0) -> (class htb 2:1)
-> (class htb 2:2)
I want to attache aggregate u32 filters at 1:0 for supernets, then at
2:0 (and 3:0, 4:0, etc), I attach the more specific u32 filters for say
HTTP and SMPT shaping.
so I attach the following filters:
tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst
172.16.1.0/24 classid 1:1
so that all the class c traffic is directed to 1:1
then for that c class web traffic
tc filter add dev eth0 parent 2:0 protocol ip u32 match ip sport 80
0xffff classid 2:1
then for that c class smtp traffic
tc filter add dev eth0 parent 2:0 protocol ip u32 match ip sport 25
0xffff classid 2:2
and so on and so forth
however, when I build that setup, the c class traffic gets directed to
1:1 alright, but nothing goes nay further in 2:1 and 2:2
my reasoning could be one of the following:
1) you cannot cascade HTB qdiscs, which to me is illogical, it defies
the concept and adventages of having a hierarchical setup.
2) there is something wrong with the way I attached the filters.
3) I totally misunderstood HTB!
Please advise.
Thanks a million.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] cascaded HTB urgent question
2003-04-28 8:50 [LARTC] cascaded HTB urgent question Osama Abu Elsorour
@ 2003-04-28 9:33 ` Alexey Sheshka
2003-04-28 9:36 ` Rob Cresswell
1 sibling, 0 replies; 3+ messages in thread
From: Alexey Sheshka @ 2003-04-28 9:33 UTC (permalink / raw)
To: lartc
On 28 Apr 2003 11:50:46 +0300
Osama Abu Elsorour <osama@wayout.net> wrote:
> Hi there,
> I have a question with regards to cascading multiple HTB qdiscs. Assume
> that I want to build the following hierarchy:
>
> (qdisc htb 1:0) -> (class htb 1:1) -> (qdisc htb 2:0) -> (class htb 2:1)
> -> (class htb 2:2)
>
> I want to attache aggregate u32 filters at 1:0 for supernets, then at
> 2:0 (and 3:0, 4:0, etc), I attach the more specific u32 filters for say
> HTTP and SMPT shaping.
>
> so I attach the following filters:
> tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst
> 172.16.1.0/24 classid 1:1
> so that all the class c traffic is directed to 1:1
> then for that c class web traffic
> tc filter add dev eth0 parent 2:0 protocol ip u32 match ip sport 80
> 0xffff classid 2:1
> then for that c class smtp traffic
> tc filter add dev eth0 parent 2:0 protocol ip u32 match ip sport 25
> 0xffff classid 2:2
> and so on and so forth
>
> however, when I build that setup, the c class traffic gets directed to
> 1:1 alright, but nothing goes nay further in 2:1 and 2:2
>
> my reasoning could be one of the following:
> 1) you cannot cascade HTB qdiscs, which to me is illogical, it defies
> the concept and adventages of having a hierarchical setup.
> 2) there is something wrong with the way I attached the filters.
> 3) I totally misunderstood HTB!
>
> Please advise.
>
> Thanks a million.
>
AFAIK filters can be atached ONLY to leaf classes (2.1 and 2.1)
--
Sheshka Aleksey
Senior Security Administrator
PGP key : http://pgp.dtype.org:11371/pks/lookup?op=get&search=0x0BE90515
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] cascaded HTB urgent question
2003-04-28 8:50 [LARTC] cascaded HTB urgent question Osama Abu Elsorour
2003-04-28 9:33 ` Alexey Sheshka
@ 2003-04-28 9:36 ` Rob Cresswell
1 sibling, 0 replies; 3+ messages in thread
From: Rob Cresswell @ 2003-04-28 9:36 UTC (permalink / raw)
To: lartc
You should be able to cascade these ... I did something similar awhile ago
with htb.init cause the various tc commands involved confused me :)
You can grab the script at:: http://sourceforge.net/projects/htbinit
However you can avoid htb.init if you want ...
IIRC, there's an example of using HTB in a hierachy at:
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
Perhaps the problem is that the classids of 2:* cannot be children
of class 1:1? I dunno -- that is conjecture ... read the docs
instead of listening to my late-night theories :)
good luck,
-rob
On Mon, Apr 28, 2003 at 11:50:46AM +0300, Osama Abu Elsorour wrote:
> Hi there,
> I have a question with regards to cascading multiple HTB qdiscs. Assume
> that I want to build the following hierarchy:
>
> (qdisc htb 1:0) -> (class htb 1:1) -> (qdisc htb 2:0) -> (class htb 2:1)
> -> (class htb 2:2)
>
> I want to attache aggregate u32 filters at 1:0 for supernets, then at
> 2:0 (and 3:0, 4:0, etc), I attach the more specific u32 filters for say
> HTTP and SMPT shaping.
>
> so I attach the following filters:
> tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst
> 172.16.1.0/24 classid 1:1
> so that all the class c traffic is directed to 1:1
> then for that c class web traffic
> tc filter add dev eth0 parent 2:0 protocol ip u32 match ip sport 80
> 0xffff classid 2:1
> then for that c class smtp traffic
> tc filter add dev eth0 parent 2:0 protocol ip u32 match ip sport 25
> 0xffff classid 2:2
> and so on and so forth
>
> however, when I build that setup, the c class traffic gets directed to
> 1:1 alright, but nothing goes nay further in 2:1 and 2:2
>
> my reasoning could be one of the following:
> 1) you cannot cascade HTB qdiscs, which to me is illogical, it defies
> the concept and adventages of having a hierarchical setup.
> 2) there is something wrong with the way I attached the filters.
> 3) I totally misunderstood HTB!
>
> Please advise.
>
> Thanks a million.
>
>
>
> _______________________________________________
> 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] 3+ messages in thread
end of thread, other threads:[~2003-04-28 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-28 8:50 [LARTC] cascaded HTB urgent question Osama Abu Elsorour
2003-04-28 9:33 ` Alexey Sheshka
2003-04-28 9:36 ` Rob Cresswell
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.