All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mahmoud Taghizadeh <taghi@procache.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] htb not hard limiting correctly
Date: Mon, 22 Sep 2003 09:56:01 +0000	[thread overview]
Message-ID: <marc-lartc-106422451814377@msgid-missing> (raw)
In-Reply-To: <marc-lartc-106414342521006@msgid-missing>

On Sun, 21 Sep 2003, Abraham van der Merwe wrote:
I am not sure, but I think if you classify your packet in PREROUTING chain 
it will works fine

> Hi!
> 
> This morning one of our major links died and suddenly I was streaming 1mbit
> of traffic through 256kbit (one of our backup links), but it just doesn't
> work. The client is still doing in the region of 350kbit/s (the link
> capacity is 512kbit). Here is my config:
> 
> ------------< snip <------< snip <------< snip <------------
> tc qdisc add dev eth1 root handle 1: htb default 4 r2q 5
> tc class add dev eth1 parent 1: classid 1:1 htb rate 512kbit
> tc class add dev eth1 parent 1:1 classid 1:2 htb rate 320kbit ceil 512kbit prio 1
> tc qdisc add dev eth1 handle 2: parent 1:2 sfq perturb 10 limit 84
> tc class add dev eth1 parent 1:1 classid 1:3 htb rate 64kbit ceil 256kbit prio 3
> tc qdisc add dev eth1 handle 3: parent 1:3 sfq perturb 10 limit 42
> tc class add dev eth1 parent 1:1 classid 1:4 htb rate 128kbit ceil 512kbit prio 2
> tc qdisc add dev eth1 handle 4: parent 1:4 sfq perturb 10 limit 84
> tc qdisc add dev eth0 root handle 1: htb default 4 r2q 5
> tc class add dev eth0 parent 1: classid 1:1 htb rate 512kbit
> tc class add dev eth0 parent 1:1 classid 1:2 htb rate 320kbit ceil 512kbit prio 1
> tc qdisc add dev eth0 handle 2: parent 1:2 sfq perturb 10 limit 84
> tc class add dev eth0 parent 1:1 classid 1:3 htb rate 64kbit ceil 256kbit prio 3
> tc qdisc add dev eth0 handle 3: parent 1:3 sfq perturb 10 limit 42
> tc class add dev eth0 parent 1:1 classid 1:4 htb rate 128kbit ceil 512kbit prio 2
> tc qdisc add dev eth0 handle 4: parent 1:4 sfq perturb 10 limit 84
> ------------< snip <------< snip <------< snip <------------
> 
> I'm tagging packets with the netfilter CLASSIFY patch. I've got a
> user-defined chain in the mangle table and I redirect all traffic from the
> POSTROUTING chain into that and add rules like this:
> 
> iptables -t mangle -N qos
> iptables -t mangle -A POSTROUTING -j qos
> 
> and then these rules for the ftc rules above:
> 
> ------------< snip <------< snip <------< snip <------------
> iptables -t mangle -A qos -o eth1 -d 66.8.28.92/30 -j CLASSIFY --set-class 1:2
> iptables -t mangle -A qos -o eth1 -d 66.8.28.160/27 -j CLASSIFY --set-class 1:2
> iptables -t mangle -A qos -o eth1 -d 168.210.55.0/24 -j CLASSIFY --set-class 1:2
> iptables -t mangle -A qos -o eth1 -d 168.210.54.80/29 -j CLASSIFY --set-class 1:2
> iptables -t mangle -A qos -o eth1 -d 168.210.56.0/24 -j CLASSIFY --set-class 1:3
> iptables -t mangle -A qos -o eth1 -d 66.8.28.32/27 -j CLASSIFY --set-class 1:3
> iptables -t mangle -A qos -o eth0 -s 66.8.28.92/30 -j CLASSIFY --set-class 1:2
> iptables -t mangle -A qos -o eth0 -s 66.8.28.160/27 -j CLASSIFY --set-class 1:2
> iptables -t mangle -A qos -o eth0 -s 168.210.55.0/24 -j CLASSIFY --set-class 1:2
> iptables -t mangle -A qos -o eth0 -s 168.210.54.80/29 -j CLASSIFY --set-class 1:2
> iptables -t mangle -A qos -o eth0 -s 168.210.56.0/24 -j CLASSIFY --set-class 1:3
> iptables -t mangle -A qos -o eth0 -s 66.8.28.32/27 -j CLASSIFY --set-class 1:3
> ------------< snip <------< snip <------< snip <------------
> 
> The class which is not shaping correctly is 1:3 - it has a rate of 64kbit
> and a ceil of 256kbit so it should be limited to 256kbit even if there is
> 512kbit of traffic available.
> 
> Any ideas what I did wrong or is this a bug?
> 
> 

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  reply	other threads:[~2003-09-22  9:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-21 11:22 [LARTC] htb not hard limiting correctly Abraham van der Merwe
2003-09-22  9:56 ` Mahmoud Taghizadeh [this message]
2003-09-22 16:58 ` Abraham van der Merwe

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-106422451814377@msgid-missing \
    --to=taghi@procache.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.