From: Jim Lawson <jim+lartc@jimlawson.org>
To: lartc@vger.kernel.org
Subject: [LARTC] need help with tc filters
Date: Fri, 09 Feb 2007 02:53:00 +0000 [thread overview]
Message-ID: <45CBE20C.4080106@jimlawson.org> (raw)
Hi,
I am attempting to set up some simple outbound shaping following the
LARTC HOWTO.
The HTB qdisc seems to work as the documentation says, but my filters
don't seem to be working. All of the packets go to the default queue
regardless of what filters I set, it seems. (according to tc -s qdisc show)
I am trying to get this working on my openwrt box (whiterussian rc6),
but when testing it on my Debian etch box for comparison, I see the same
behavior.
I'm hoping someone can point out what I'm doing wrong with the filters...
FYI: "vlan1" is the outbound interface of my wrt54g.
Script follows:
IF=vlan1
insmod cls_u32
insmod sch_htb
insmod sch_prio
insmod sch_sfq
#
# qdisc/class tree
# 1: root (HTB) qdisc
# |
# 1:10 class rate 384000bit
# |
# 10: prio qdisc
# / | \
# 10:1 | 10:3
# | 10:2 |
# 101: | | sfq
# 102: | sfq
# 103: sfq
tc qdisc del dev $IF root
tc qdisc add dev $IF root handle 1: htb default 10
tc class add dev $IF parent 1: classid 1:10 htb rate 384kbit burst 3k
# This automatically creates 10:1, 10:2, 10:3
tc qdisc add dev $IF parent 1:10 handle 10: prio
# Add sfq qdisc to each of the priority classes
tc qdisc add dev $IF parent 10:1 handle 101: sfq
tc qdisc add dev $IF parent 10:2 handle 102: sfq
tc qdisc add dev $IF parent 10:3 handle 103: sfq
# "bulk" ssh on port 20022 goes to 103: (low priority)
tc filter add dev $IF parent 1:0 protocol ip prio 1 u32 \
match ip sport 20022 0xffff flowid 103:
tc filter add dev $IF parent 1:0 protocol ip prio 1 u32 \
match ip dport 20022 0xffff flowid 103:
# ICMP goes fast?
tc filter add dev $IF parent 1:0 protocol ip prio 2 u32 \
match ip protocol 1 0xff flowid 101:
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next reply other threads:[~2007-02-09 2:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-09 2:53 Jim Lawson [this message]
2007-02-09 5:15 ` [LARTC] need help with tc filters Bob Puff@NLE
2007-02-09 13:10 ` Andrew Beverley
2007-02-10 0:29 ` Jim Lawson
2007-02-10 10:00 ` Andrew Beverley
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=45CBE20C.4080106@jimlawson.org \
--to=jim+lartc@jimlawson.org \
--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.