From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Beverley Date: Sun, 03 Feb 2013 21:35:12 +0000 Subject: Re: Tc does not seem to be limiting bandwidth Message-Id: <1359927312.30430.5.camel@andrew-desktop> List-Id: References: <000101ce00b1$2856c670$79045350$@JAMMConsulting.com> In-Reply-To: <000101ce00b1$2856c670$79045350$@JAMMConsulting.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org On Fri, 2013-02-01 at 13:20 -0600, Neil Aggarwal wrote: > Hello: > > I have these commands in my firewall startup script: > > DEV=v1252 > IP=a.b.c.d > /sbin/tc qdisc del dev $DEV root > /sbin/tc qdisc add dev $DEV root handle 1: htb default 30 > /sbin/tc class add dev $DEV parent 1: classid 1:1 htb rate 10mbit > /sbin/tc class add dev $DEV parent 1: classid 1:2 htb rate 10mbit > /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst > $IP flowid 1:1 > /sbin/tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip src > $IP flowid 1:2 You're setting a rate value but not a ceil value. Rate values can be exceeded, ceil values cannot. You may also need an extra class with an overall rate limit, and then your leaf classes attached to that (I don't know if that's required, but the examples I have seen have used that). I can provide examples if needed. Andy