From: Iulian Stan <iulian.stan@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] HTB&IMQ
Date: Fri, 19 Nov 2004 10:16:49 +0000 [thread overview]
Message-ID: <35adde17041119021619a4a4eb@mail.gmail.com> (raw)
i'm trying to limit upload and download but something is wrong(it is about NAT)
i will post here my "script" maybe someone could tell me what is wrong
my kernel(2.6.9) is patch with imq(linuximq.net) and my iptables(1.2.11) also
#flush
tc qdisc del dev eth0 root
tc qdisc del dev eth1 root
tc qdisc del dev imq0 root
tc qdisc del dev imq1 root
ifconfig imq0 down
ifconfig imq1 down
iptables -t mangle -F
#UPLOAD
ifconfig imq0 up
tc qdisc del dev imq0 root
tc qdisc add dev imq0 root handle 1 htb default 99
tc class add dev imq0 parent 1: classid 1:10 htb rate 1536kbit
# 8k max 15k
tc class add dev imq0 parent 1:10 classid 1:1020 htb rate 64Kbit ceil 120Kbit
tc qdisc add dev imq0 parent 1:1020 handle 1020 sfq
tc filter add dev imq0 parent 1:0 protocol ip prio 200 handle 1020 fw
classid 1:1020
#8k max 1536k SSH
tc class add dev imq0 parent 1:10 classid 1:1000 htb rate 120Kbit ceil 1536Kbit
tc qdisc add dev imq0 parent 1:1000 handle 1000 sfq
tc filter add dev imq0 parent 1:0 protocol ip prio 200 handle 1000 fw
classid 1:1000
#DOWNLOAD
ifconfig imq1 up
tc qdisc del dev imq1 root
tc qdisc add dev imq1 root handle 1 htb default 98
tc class add dev imq1 parent 1: classid 1:20 htb rate 1536kbit
# 8k max 192k
tc class add dev imq1 parent 1:20 classid 1:2000 htb rate 64Kbit ceil 1536Kbit
tc qdisc add dev imq1 parent 1:2000 handle 2000 sfq
tc filter add dev imq1 parent 1:0 protocol ip prio 200 handle 2000 fw
classid 1:2000
# 8k max 128k
tc class add dev imq1 parent 1:20 classid 1:2010 htb rate 64Kbit ceil 1024Kbit
tc qdisc add dev imq1 parent 1:2010 handle 2010 sfq
tc filter add dev imq1 parent 1:0 protocol ip prio 200 handle 2010 fw
classid 1:2010
# 8k max 80k
tc class add dev imq1 parent 1:20 classid 1:2020 htb rate 64Kbit ceil 640Kbit
tc qdisc add dev imq1 parent 1:2020 handle 2020 sfq
tc filter add dev imq1 parent 1:0 protocol ip prio 200 handle 2020 fw
classid 1:2020
# IP 192.168.50.0/24
#DOWNLOAD
#192K mark 2000
#iptables -t mangle -A POSTROUTING -d 192.168.50.40 -j MARK --set-mark 2000
#128k mark 2010
iptables -t mangle -A POSTROUTING -d 192.168.50.40 -j MARK --set-mark 2010
#64k mark 2020
iptables -t mangle -A POSTROUTING -d 192.168.50.36 -j MARK --set-mark 2020
#UPLOAD
#15k mark 1020
iptables -t mangle -A PREROUTING -s 192.168.50.40 -j MARK --set-mark 1020
iptables -t mangle -A PREROUTING -s 192.168.50.36 -j MARK --set-mark 1020
#imq
iptables -t mangle -A PREROUTING -i eth0 -j IMQ --todev 0
iptables -t mangle -A PREROUTING -i eth1 -j IMQ --todev 0
iptables -t mangle -A POSTROUTING -o eth0 -j IMQ --todev 1
iptables -t mangle -A POSTROUTING -o eth1 -j IMQ --todev 1
my ifconfig imq1,imq0 show tx and rx traffic , but upload and download
shaping is not ok.
please help me
10x
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next reply other threads:[~2004-11-19 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-19 10:16 Iulian Stan [this message]
2004-11-19 18:51 ` [LARTC] HTB&IMQ Andre Correa
2004-11-19 19:20 ` 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=35adde17041119021619a4a4eb@mail.gmail.com \
--to=iulian.stan@gmail.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.