From: Allan Gee <AllanG@Equation.co.za>
To: lartc@vger.kernel.org
Subject: [LARTC] FW: Rate goes over setting
Date: Tue, 12 Mar 2002 13:27:22 +0000 [thread overview]
Message-ID: <marc-lartc-101594009813583@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101595773211047@msgid-missing>
[-- 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 --]
next prev parent reply other threads:[~2002-03-12 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1980-01-03 23:20 [LARTC] FW: Rate goes over setting Stef Coene
2002-03-12 13:27 ` Allan Gee [this message]
2002-03-12 14:21 ` Martin Devera
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-101594009813583@msgid-missing \
--to=allang@equation.co.za \
--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.