On Thu, Mar 17, 2005 at 08:14:51PM -0700, Joe Nelson wrote:
> So, it sounds like people really like the wondershaper.  Will it allow
> me to just set limits on a number of IPs and leave everything else
> alone?  I don't want to be doing a whole lot just the limits.  Thanks.

The wondershaper indeed is a very nice script, but I think that it
doesn't exactly fit your needs. It's made to optimize your internet
connection by minimizing the delay of interactive traffic and
removing long queues, which improves latency.

However, I think that it is a good starting point to see how a TC
script is set up.

For a solution to your problem see for example:
http://lartc.org/howto/lartc.ratelimit.single.html

It's based on the CBQ classfull queueing discipline. I have no
experience with the CBQ qdisc, but am using the HTB (as is the new
version of the wondershaper), which is recommended in most
documentation.

You probably need two things in your TC script: a classfull qdisc
(e.g. HTB) and filters that place traffic from specific IP's into the
different classes of that HTB qdisc. It would look something like
this (no guarantees that it works):

tc qdisc add dev $DEV root handle 1: htb default 10
tc class add dev $DEV parent 1:1  classid 1:10 htb ${CONNRATE}Kbit prio 1
tc class add dev $DEV parent 1:1  classid 1:11 htb rate ${RATE}Kbit prio 2

tc filter add dev $DEV parent 1: protocol ip prio 18 u32 match ip src $IP/$MASK 
flowid 1:11

Where $DEV is the ethernet device of your outgoing connection,
$CONNRATE your upload speed, $RATE the limit upload speed of the
computers with IP $IP and netmask bits $MASK (for one IP, set MASK 32).

Rate limiting incoming traffic is a lot more difficult, because you
can only drop it to slow it down.

Hope this helps you get started.

Jaap


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
------------------------------------------------------------------------
leaf-user mailing list: leaf-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-user
SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to