* Re: [LARTC] FW: Rate goes over setting
@ 1980-01-03 23:20 Stef Coene
2002-03-12 13:27 ` Allan Gee
2002-03-12 14:21 ` Martin Devera
0 siblings, 2 replies; 3+ messages in thread
From: Stef Coene @ 1980-01-03 23:20 UTC (permalink / raw)
To: lartc
On Tuesday 12 March 2002 14:27, Allan Gee wrote:
> -----Original Message-----
> From: Allan Gee
> Sent: Tuesday, March 12, 2002 3:27 PM
> To: 'lartc-request@mailman.ds9a.nl'
> Subject: Rate goes over setting
>
>
> Hi guys I have a small problem that I want to limit each network behind us
> to different rates. The box sits between our router to the internet and the
> clients. I have attached a mrtg graph to show the stats and one can see
> that every now and then the rate goes over the limit. This is the code I
> use for that client who has 64kbit from us and we give him 16kbit only with
> no borrowing. As you can see from the script I have tried to set the burst
> rate to as low as possible but it still goes over.
> What am I doing wrong?
The script looks OK.
But like Devik said, the output of tc is important. I have some scripts if
you are interested to create graphs of the output of tc. It records allmost
all available counters. You can find it on www.docum.org under GUI (example
can be found on http://home.docum.org/stef.coene/qos/gui/rrd.html). It uses
snmp to get remote information and uses rrd to store the data and to create
graphs.
This gives you the oppurtinity to get more information when there is a
problem.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.openprojects.net
_______________________________________________
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
* [LARTC] FW: Rate goes over setting
1980-01-03 23:20 [LARTC] FW: Rate goes over setting Stef Coene
@ 2002-03-12 13:27 ` Allan Gee
2002-03-12 14:21 ` Martin Devera
1 sibling, 0 replies; 3+ messages in thread
From: Allan Gee @ 2002-03-12 13:27 UTC (permalink / raw)
To: lartc
[-- Attachment #1.1: Type: text/plain, Size: 2311 bytes --]
-----Original Message-----
From: Allan Gee
Sent: Tuesday, March 12, 2002 3:27 PM
To: 'lartc-request@mailman.ds9a.nl'
Subject: Rate goes over setting
Hi guys I have a small problem that I want to limit each network behind us
to different rates. The box sits between our router to the internet and the
clients. I have attached a mrtg graph to show the stats and one can see that
every now and then the rate goes over the limit. This is the code I use for
that client who has 64kbit from us and we give him 16kbit only with no
borrowing. As you can see from the script I have tried to set the burst rate
to as low as possible but it still goes over.
What am I doing wrong?
#!/bin/sh
cbq stop
/home/allang/resetFW
TCHTB="/sbin/tc"
BURS="burst 0.1kbit cburst 0.1kbit"
# Destination
TCCLASSDST="/sbin/tc class add dev eth1 parent"
TCQDISCDST="/sbin/tc qdisc add dev eth1 parent"
TCFILTERDST="/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32"
# Source
TCCLASSSRC="/sbin/tc class add dev eth0 parent"
TCQDISCSRC="/sbin/tc qdisc add dev eth0 parent"
TCFILTERSRC="/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32"
#
# For Transparent Proxy
#
iptables -A PREROUTING -t nat -s 192.168.178.0/24 -p tcp --dport 80 -j DNAT
--to 192.168.177.231:3128
iptables -A POSTROUTING -t nat -s 192.168.178.0/24 -d 192.168.177.231 -j
SNAT --to 192.168.177.15
# Root & Default Class
$TCHTB qdisc add dev eth1 root handle 1: htb default 11
$TCCLASSDST 1: classid 1:10 htb rate 100Mbit
$TCCLASSDST 1:10 classid 1:11 htb rate 100Mbit ceil 100Mbit
$TCQDISCDST 1:11 handle 12: sfq perturb 10
$TCHTB qdisc add dev eth0 root handle 1: htb default 11
$TCCLASSSRC 1: classid 1:10 htb rate 100Mbit
$TCCLASSSRC 1:10 classid 1:11 htb rate 100Mbit ceil 100Mbit
$TCQDISCSRC 1:11 handle 12: sfq perturb 10
# The 16kbit client
$TCCLASSDST 1: classid 1:20 htb rate 16kbit ceil 16kbit $BURS
$TCCLASSDST 1:20 classid 1:21 htb rate 16kbit ceil 16kbit $BURS
$TCQDISCDST 1:21 handle 22: sfq perturb 10
$TCFILTERDST match ip dst 129.0.0.0/24 flowid 1:21
$TCCLASSSRC 1: classid 1:20 htb rate 16kbit ceil 16kbit $BURS
$TCCLASSSRC 1:20 classid 1:21 htb rate 16kbit ceil 16kbit $BURS
$TCQDISCSRC 1:21 handle 22: sfq perturb 10
$TCFILTERSRC match ip src 129.0.0.0/24 flowid 1:21
Regards Allan Gee
Equation
021 4181777
[-- Attachment #1.2: Type: text/html, Size: 3974 bytes --]
[-- Attachment #2: computer_specialists-day[1].gif --]
[-- Type: image/gif, Size: 4644 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LARTC] FW: Rate goes over setting
1980-01-03 23:20 [LARTC] FW: Rate goes over setting Stef Coene
2002-03-12 13:27 ` Allan Gee
@ 2002-03-12 14:21 ` Martin Devera
1 sibling, 0 replies; 3+ messages in thread
From: Martin Devera @ 2002-03-12 14:21 UTC (permalink / raw)
To: lartc
Hi, I have not X terminal here so I don't see the gif,
but what ammount is the difference ?
Also attach please tc -s -d class show ethX output
in times of bad shaping.
devik
> Hi guys I have a small problem that I want to limit each network behind us
> to different rates. The box sits between our router to the internet and the
> clients. I have attached a mrtg graph to show the stats and one can see that
> every now and then the rate goes over the limit. This is the code I use for
> that client who has 64kbit from us and we give him 16kbit only with no
> borrowing. As you can see from the script I have tried to set the burst rate
> to as low as possible but it still goes over.
_______________________________________________
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:[~2002-03-12 14:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1980-01-03 23:20 [LARTC] FW: Rate goes over setting Stef Coene
2002-03-12 13:27 ` Allan Gee
2002-03-12 14:21 ` Martin Devera
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.