From: Corey Hickey <bugfood-ml@fatooh.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] wondershaper htb + multiple ports
Date: Sun, 08 Feb 2004 19:30:48 +0000 [thread overview]
Message-ID: <40268E68.90604@fatooh.org> (raw)
In-Reply-To: <1076205459.5651.3.camel@localhost.localdomain>
mark ryan wrote:
> If i use the following tc command, where do i set the speed limit for
> the outbound ftp traffic?
>
> Mark
>
> On Sun, 2004-02-08 at 02:35, Corey Hickey wrote:
>
>>mark ryan wrote:
>>
>>>Is there a way to apply wondershaper w/ htb to a port range?
>>>
>>>I have a ftp server on port 65432 and passive ports 50000-60000.
>>>
>>>Is there a way to set a range? or do they have to be individually
>>>listed?
>>>
>>>The following doesnt seem to work:
>>>
>>> # low priority source ports
>>>NOPRIOPORTSRCe432, 50000:60000
>>>
>>># low priority destination ports
>>>NOPRIOPORTDST>>>
>>>Mark
>>>
>>
>>I don't know about wondershaper specifically, but you can use iptables.
>>I think this will work:
>>
>>iptables -t mangle -A FORWARD -m tcp -p tcp -s <your.ftp.server.ip> \
>> --sport 65432 -j MARK --set-mark 0x02
>>iptables -t mangle -A FORWARD -m tcp -p tcp -s <your.ftp.server.ip> \
>> --sport 50000:60000 -j MARK --set-mark 0x02
>>
>>Then, you need to add a tc filter:
>>
>>tc filter add dev <your-outgoing-interface> parent 1: protocol ip \
>> prio 1 handle 0x02 fw flowid 1:30
>>
>>
>>Try it out...
>>
>>-Corey
>
>
[Sorry, I wasn't paying attention and sent my original reply to the
poster instead of the list]
The filter I sent ought to direct traffic into wondershaper's "bulk"
class, on line 71, which is:
tc class add $DEV parent 1:1 classid 1:30 htb rate $[8*$UPLINK/10]kbit \
burst 6k prio 2
As you can see, the rate is eight tenths the speed of $UPLINK. Since
there is no ceiling specified, however, it is allowed to "borrow"
bandwidth up to the speed of its parent, which is $UPLINK. If you want
to change the behavior of this class, read how here:
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
-Corey
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2004-02-08 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-08 1:57 [LARTC] wondershaper htb + multiple ports mark ryan
2004-02-08 19:30 ` Corey Hickey [this message]
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=40268E68.90604@fatooh.org \
--to=bugfood-ml@fatooh.org \
--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.