* [LARTC] htb & filter on classes
@ 2002-04-29 23:11 office
2002-04-30 17:14 ` Stef Coene
2002-04-30 22:34 ` Martin Devera
0 siblings, 2 replies; 3+ messages in thread
From: office @ 2002-04-29 23:11 UTC (permalink / raw)
To: lartc
I am trying to do some simple filtering with htb and the following class
hierarchy:
1:
|
1:10
/ \
1:100 1:200
/ \
1:1000 ...
Internal traffic should go to 1:200 and external traffic to 1:100 with
further distinction based on dst ip made there.
The problem is that I just don't get the second distinction (filter on class
1:100) right. I have not found any working example where filters were not
attached to qdiscs but on classes instead. Is it possible to do so? If yes:
am I using the right syntax (parent 1:100)?
The packets just get dropped in class 1:100 although the filter should
definitely match and enqueue them into 1:1000.
Is there anything like a default filter on class basis which always
matches or do I have to use something like "match ip dst 0.0.0.0/0"?
Here are the commands I'm using:
##########
tc qdisc add dev eth1 root handle 1: htb default 100
tc class add dev eth1 parent 1: classid 1:10 htb rate 10mbit ceil 10mbit
burst 20k
# external traffic
tc class add dev eth1 parent 1:10 classid 1:100 htb rate 1mbit ceil 1mbit
burst 10k
# internal traffic
tc class add dev eth1 parent 1:10 classid 1:200 htb rate 9mbit ceil 9mbit
burst 10k
tc class add dev eth1 parent 1:100 classid 1:1000 htb rate 0.5mbit ceil
0.5mbit burst 2k prio 10
# filters
tc filter add dev eth1 pref 1 protocol ip parent 1: u32 match ip src
195.58.166.176/28 flowid 1:200
tc filter add dev eth1 pref 1 protocol ip parent 1:100 u32 match ip dst
195.58.0.0/16 flowid 1:1000
##########
Many thanks in advance,
Andreas Lehrbaum
_______________________________________________
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] htb & filter on classes
2002-04-29 23:11 [LARTC] htb & filter on classes office
@ 2002-04-30 17:14 ` Stef Coene
2002-04-30 22:34 ` Martin Devera
1 sibling, 0 replies; 3+ messages in thread
From: Stef Coene @ 2002-04-30 17:14 UTC (permalink / raw)
To: lartc
0On Tuesday 30 April 2002 01:11, office@kabelweb.at wrote:
> I am trying to do some simple filtering with htb and the following class
> hierarchy:
>
> 1:
>
> 1:10
> / \
> 1:100 1:200
> / \
> 1:1000 ...
>
> Internal traffic should go to 1:200 and external traffic to 1:100 with
> further distinction based on dst ip made there.
> The problem is that I just don't get the second distinction (filter on
> class 1:100) right. I have not found any working example where filters were
> not attached to qdiscs but on classes instead. Is it possible to do so? If
> yes: am I using the right syntax (parent 1:100)?
The syntax is OK. But I don't think htb can do this (yet). Devik ?
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.openprojects.net
_______________________________________________
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] htb & filter on classes
2002-04-29 23:11 [LARTC] htb & filter on classes office
2002-04-30 17:14 ` Stef Coene
@ 2002-04-30 22:34 ` Martin Devera
1 sibling, 0 replies; 3+ messages in thread
From: Martin Devera @ 2002-04-30 22:34 UTC (permalink / raw)
To: lartc
You have to use dst 0.0.0.0/0 to direct "other" flows to 1:100. The
default kw has global and definitive meaning - when it is used no
other filter is tested. Whe default is 100 is will not test filters here.
It is by-design, it could be changed but use dst 0.0.0.0/0 flowid 1:100
now.
devik
On Tue, 30 Apr 2002 office@kabelweb.at wrote:
> I am trying to do some simple filtering with htb and the following class
> hierarchy:
>
> 1:
> |
> 1:10
> / \
> 1:100 1:200
> / \
> 1:1000 ...
>
> Internal traffic should go to 1:200 and external traffic to 1:100 with
> further distinction based on dst ip made there.
> The problem is that I just don't get the second distinction (filter on class
> 1:100) right. I have not found any working example where filters were not
> attached to qdiscs but on classes instead. Is it possible to do so? If yes:
> am I using the right syntax (parent 1:100)?
>
> The packets just get dropped in class 1:100 although the filter should
> definitely match and enqueue them into 1:1000.
>
> Is there anything like a default filter on class basis which always
> matches or do I have to use something like "match ip dst 0.0.0.0/0"?
>
> Here are the commands I'm using:
>
> ##########
> tc qdisc add dev eth1 root handle 1: htb default 100
> tc class add dev eth1 parent 1: classid 1:10 htb rate 10mbit ceil 10mbit
> burst 20k
>
> # external traffic
> tc class add dev eth1 parent 1:10 classid 1:100 htb rate 1mbit ceil 1mbit
> burst 10k
>
> # internal traffic
> tc class add dev eth1 parent 1:10 classid 1:200 htb rate 9mbit ceil 9mbit
> burst 10k
>
> tc class add dev eth1 parent 1:100 classid 1:1000 htb rate 0.5mbit ceil
> 0.5mbit burst 2k prio 10
>
> # filters
> tc filter add dev eth1 pref 1 protocol ip parent 1: u32 match ip src
> 195.58.166.176/28 flowid 1:200
> tc filter add dev eth1 pref 1 protocol ip parent 1:100 u32 match ip dst
> 195.58.0.0/16 flowid 1:1000
> ##########
>
> Many thanks in advance,
>
> Andreas Lehrbaum
> _______________________________________________
> 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:[~2002-04-30 22:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-29 23:11 [LARTC] htb & filter on classes office
2002-04-30 17:14 ` Stef Coene
2002-04-30 22:34 ` Martin Devera
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.