All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre Correa <andre.correa@pobox.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] HTB&IMQ
Date: Fri, 19 Nov 2004 18:51:01 +0000	[thread overview]
Message-ID: <419E4095.2060607@pobox.com> (raw)
In-Reply-To: <35adde17041119021619a4a4eb@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4010 bytes --]


Lulian, what exactly is "not OK"? Remember that tc works with 
bits/second. Maybe this is your problem...

Please let us know what is not working in details.

later

Andre



Iulian Stan wrote:
> 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/
> 
> 


-- 
-----------------------------------------------------------------------
Confidentiality Notice: This e-mail communication and any attachments 
may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended 
recipient, you are hereby notified that you have received this 
communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its contents is prohibited. If you have 
received this communication in error, please notify me immediately by 
replying to this message and deleting it from your computer.

Thank you.

[-- Attachment #2: andre.correa.vcf --]
[-- Type: text/x-vcard, Size: 203 bytes --]

begin:vcard
fn:Andre Correa
n:Correa;Andre
adr:;;;Sao Paulo;SP;;Brazil
email;internet:andre.correa@pobox.com
tel;fax:+1 503 907-8907
tel;cell:+55 11 9187-1906
x-mozilla-html:FALSE
version:2.1
end:vcard


  reply	other threads:[~2004-11-19 18:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-19 10:16 [LARTC] HTB&IMQ Iulian Stan
2004-11-19 18:51 ` Andre Correa [this message]
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=419E4095.2060607@pobox.com \
    --to=andre.correa@pobox.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.