From: Adi Nugroho <Adi@iNterNUX.co.id>
To: lartc@vger.kernel.org
Subject: [LARTC] Better filtering to a class
Date: Mon, 17 Jun 2002 10:11:40 +0000 [thread overview]
Message-ID: <marc-lartc-102430870005044@msgid-missing> (raw)
Dear all,
I want to make a filter for all IRC-Dalnet traffic, so I want to put all
traffic for port 6660, 6661, 6662, 6663, 6664, 6665, 6666, 6667, 6668, 6669,
7000, 7001, 7002, and 8000 to a class. So, I create a TC script as below.
I'm sure, it is not effective, and we can write it in simpler.
I need help, how to make my script below are simpler.
The simpler, the better.
Thank you for your help.
--
Regards,
Adi Nugroho
Here is my script....
# Down Stream
tc class add dev eth0 parent 1:1 classid 1:123 htb rate 12kbit burst 64k
ceil 64kbit prio 3
tc class add dev eth0 parent 1:123 classid 1:1231 htb rate 1.2kbit burst 3.2k
ceil 64kbit
tc class add dev eth0 parent 1:123 classid 1:1232 htb rate 2.4kbit burst 6.4k
ceil 64kbit
tc class add dev eth0 parent 1:123 classid 1:1233 htb rate 8.4kbit burst 54.4k
ceil 64kbit
tc qdisc add dev eth0 parent 1:1231 handle 1231: sfq perturb 5 quantum 1514
tc qdisc add dev eth0 parent 1:1232 handle 1232: sfq perturb 5 quantum 1514
tc qdisc add dev eth0 parent 1:1233 handle 1233: sfq perturb 5 quantum 1514
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6660 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6661 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6662 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6663 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6664 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6665 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6666 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6667 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6668 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 6669 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 7000 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 7001 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 7002 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip sport 8000 0xffff flowid 1:1232
tc filter add dev eth0 protocol ip parent 1:0 prio 5 u32 match ip dst
203.112.65.54 match ip protocol 6 0xff flowid 1:1231
tc filter add dev eth0 protocol ip parent 1:0 prio 6 u32 match ip dst
203.112.65.54 flowid 1:1233
# Up Stream
tc class add dev eth2 parent 1:1 classid 1:123 htb rate 4kbit burst 16k ceil
64kbit prio 3
tc class add dev eth2 parent 1:123 classid 1:1231 htb rate 0.4kbit burst 0.8k
ceil 64kbit
tc class add dev eth2 parent 1:123 classid 1:1232 htb rate 0.8kbit burst 1.6k
ceil 64kbit
tc class add dev eth2 parent 1:123 classid 1:1233 htb rate 2.8kbit burst 13.6k
ceil 64kbit
tc qdisc add dev eth2 parent 1:1231 handle 1231: sfq perturb 5 quantum 1514
tc qdisc add dev eth2 parent 1:1232 handle 1232: sfq perturb 5 quantum 1514
tc qdisc add dev eth2 parent 1:1233 handle 1233: sfq perturb 5 quantum 1514
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6660 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6661 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6662 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6663 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6664 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6665 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6666 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6667 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6668 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 6669 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 7000 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 7001 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 7002 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 4 u32 match ip dst
203.112.65.54 match ip dport 8000 0xffff flowid 1:1232
tc filter add dev eth2 protocol ip parent 1:0 prio 5 u32 match ip src
203.112.65.54 match ip protocol 6 0xff flowid 1:1231
tc filter add dev eth2 protocol ip parent 1:0 prio 6 u32 match ip src
203.112.65.54 flowid 1:1233
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2002-06-17 10:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-17 10:11 Adi Nugroho [this message]
2002-06-17 10:31 ` [LARTC] Better filtering to a class Alex Bennee
2002-06-17 15:30 ` mdew
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-102430870005044@msgid-missing \
--to=adi@internux.co.id \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox