All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] HTB&IMQ
@ 2004-11-19 10:16 Iulian Stan
  2004-11-19 18:51 ` Andre Correa
  2004-11-19 19:20 ` Stef Coene
  0 siblings, 2 replies; 3+ messages in thread
From: Iulian Stan @ 2004-11-19 10:16 UTC (permalink / raw)
  To: lartc

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] HTB&IMQ
  2004-11-19 10:16 [LARTC] HTB&IMQ Iulian Stan
@ 2004-11-19 18:51 ` Andre Correa
  2004-11-19 19:20 ` Stef Coene
  1 sibling, 0 replies; 3+ messages in thread
From: Andre Correa @ 2004-11-19 18:51 UTC (permalink / raw)
  To: lartc

[-- 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] HTB&IMQ
  2004-11-19 10:16 [LARTC] HTB&IMQ Iulian Stan
  2004-11-19 18:51 ` Andre Correa
@ 2004-11-19 19:20 ` Stef Coene
  1 sibling, 0 replies; 3+ messages in thread
From: Stef Coene @ 2004-11-19 19:20 UTC (permalink / raw)
  To: lartc

On Friday 19 November 2004 11:16, Iulian Stan wrote:
> i'm trying to limit upload and download but something is wrong(it is about
> NAT)
Can you be more specific?  What's "something" ????

Stef

-- 
stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-19 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-19 10:16 [LARTC] HTB&IMQ Iulian Stan
2004-11-19 18:51 ` Andre Correa
2004-11-19 19:20 ` Stef Coene

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.