All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cheng Kwok Wing, William" <wing328@yahoo.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Question on TC filter
Date: Fri, 10 Jan 2003 18:24:31 +0000	[thread overview]
Message-ID: <marc-lartc-104222313403706@msgid-missing> (raw)

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/

             reply	other threads:[~2003-01-10 18:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-10 18:24 Cheng Kwok Wing, William [this message]
2003-01-10 23:00 ` [LARTC] Question on TC filter 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-104222313403706@msgid-missing \
    --to=wing328@yahoo.com \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.