From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Cheng Kwok Wing, William" Date: Fri, 10 Jan 2003 18:24:31 +0000 Subject: [LARTC] Question on TC filter Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org 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/