Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
* [LARTC] Question on TC filter
@ 2003-01-10 18:24 Cheng Kwok Wing, William
  2003-01-10 23:00 ` Stef Coene
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Cheng Kwok Wing, William @ 2003-01-10 18:24 UTC (permalink / raw)
  To: lartc

Hi,

I want work out a GUI interface for htb and now here
comes to the part about adding and removing classes
and filters.

Here is an example script.
TC="tc"
DEV="dev eth1"

echo "Add root qdisc, default traffic go to 1:30"
$TC qdisc add $DEV root handle 1: htb default 30

echo "Divide the traffic into different classes and
levels"
# -------- level 1 --------
$TC class add $DEV parent 1: classid 1:1 htb rate
100mbit burst 15k
# -------- level 2 --------
$TC class add $DEV parent 1:1 classid 1:10 htb rate
400kbit ceil 600kbit burst 10m
$TC class add $DEV parent 1:1 classid 1:20 htb rate
1mbit ceil 1.5mbit burst 1m

echo "SFQ for beneath these classes:"
$TC qdisc add $DEV parent 1:10 handle 10: sfq perturb
10
$TC qdisc add $DEV parent 1:20 handle 20: sfq perturb
10

echo "Add the filters which direct traffic to the
right classes:"
tc filter add $DEV parent 1: protocol ip u32 match ip
dst 192.168.0.2/32 flowid 1:10
tc filter add $DEV parent 1: protocol ip u32 match ip
dst 192.168.0.3/32 flowid 1:20

Suppose I want to remove the class 1:20. What should I
do? I need to first remove the filters with flowid
1:20, but how can I remove it independently???
If I run "tc filter del $DEV parent 1:0......", then
all filters will be removed. Any suggestion on how to
solve this problem or a better way to organise the
classes or filters??

Thanks in advance,
William

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-01-11 10:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 18:24 [LARTC] Question on TC filter Cheng Kwok Wing, William
2003-01-10 23:00 ` Stef Coene
2003-01-11  4:54 ` Cheng Kwok Wing, William
2003-01-11  4:57 ` Cheng Kwok Wing, William
2003-01-11 10:54 ` Stef Coene

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox