From: "Mark Williams (MWP)" <mwp@internode.on.net>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Weighted packet shaping?
Date: Thu, 23 Dec 2004 10:56:11 +0000 [thread overview]
Message-ID: <20041223105418.GA19364@linux.comp> (raw)
In-Reply-To: <20041221034303.GB27656@linux.comp>
> Mark Williams (MWP) wrote:
> >Ok.
> >
> >My Linux (which is connected to the ADLS modem) box runs HTTP, FTP, etc
> >services and also runs bittorrent, edonkey,
> >etc.
> >I have two other PCs (both windows) which connect to the internet via the
> >Linux
> >box (MASQ).
> >
> >Now, i want data like SSH, ICMP, DNS from any source to ppp0 to get top
> >priority.
> >I want the two windows PCs to get 2nd priority.
> >I want services to get 3rd, and the rest (torrents, etc) to get the lowest
> >priority.
> >
> >I have this setup atm using HTB and SFQ.
> >
> >Now this is what happens:
> >I have bittorrent going as fast as possible outbound.
> >I then use my linux box to send FTP data over the same link.
> >
> >Im finding that packet shaping is splitting the outbound bandwidth
> >(256kbit)
> >equally between the two.
> >
> >This is not what im after... want the windows box to take more bandwidth
> >off
> >bittorrent than 50% like it is atm.
> >
> >Does this explain my problem better?
>
> Yes, you can do this with htb.
>
> You'll need to back off a bit from 256kbit to allow for overheads - this
> is tweakable with patch Ed posted to the list - you could also shape
> incoming, but you would need IMQ which involves patching/doing new kernel.
>
> For now try making a parent with rate and ceil 220kbit.
> Have 4 child/leaf classes like - (assuming 1 is highest priority)
>
> class 1 rate 120 ceil 220 prio 0
> class 2 rate 50 ceil 220 prio 1
> class 3 rate 25 ceil 220 prio 2
> class 4 rate 25 ceil 220 prio 3
>
> There are other tweaks you can try, it depends how much you care about
> latency. You could also share the windows boxes bandwidth by IP.
>
> I don't do it quite like the above - so if it doesn't work, say and I'll
> think again.
Well im currently using:
#root device
$TC qdisc add dev $INTERFACE root handle 1: htb default 25
#root class
$TC class add dev $INTERFACE parent 1: classid 1:1 htb rate 256kbit
#20 - ICMP, DNS, SYN, SSH
$TC class add dev $INTERFACE parent 1:1 classid 1:20 htb rate 128kbit ceil 256kbit prio 1
$TC qdisc add dev $INTERFACE parent 1:20 handle 20: sfq perturb 10
$TC filter add dev $INTERFACE parent 1:0 prio 0 protocol ip handle 20 fw flowid 1:20
#21 - HTTP/FTP out
$TC class add dev $INTERFACE parent 1:1 classid 1:21 htb rate 128kbit ceil 256kbit prio 2
$TC qdisc add dev $INTERFACE parent 1:21 handle 21: sfq perturb 10
$TC filter add dev $INTERFACE parent 1:0 prio 0 protocol ip handle 21 fw flowid 1:21
#22 - All cool.comp traffic
$TC class add dev $INTERFACE parent 1:1 classid 1:22 htb rate 128kbit ceil 256kbit prio 3
$TC qdisc add dev $INTERFACE parent 1:22 handle 22: sfq perturb 10
$TC filter add dev $INTERFACE parent 1:0 prio 0 protocol ip handle 22 fw flowid 1:22
#23 - All ian.comp traffic
$TC class add dev $INTERFACE parent 1:1 classid 1:23 htb rate 64kbit ceil 256kbit prio 4
$TC qdisc add dev $INTERFACE parent 1:23 handle 23: sfq perturb 10
$TC filter add dev $INTERFACE parent 1:0 prio 0 protocol ip handle 23 fw flowid 1:23
#24 - HTTP/FTP in
$TC class add dev $INTERFACE parent 1:1 classid 1:24 htb rate 64kbit ceil 256kbit prio 5
$TC qdisc add dev $INTERFACE parent 1:24 handle 24: sfq perturb 10
$TC filter add dev $INTERFACE parent 1:0 prio 0 protocol ip handle 24 fw flowid 1:24
#25 - Everything else
$TC class add dev $INTERFACE parent 1:1 classid 1:25 htb rate 20kbit ceil 64kbit prio 8
$TC qdisc add dev $INTERFACE parent 1:25 handle 25: sfq perturb 10
$TC filter add dev $INTERFACE parent 1:0 prio 0 protocol ip handle 25 fw flowid 1:25
Ill do some more tests and link to a rates graph when done.
It should illustrate the problem.
Thanks again,
Mark.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2004-12-23 10:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-21 3:55 [LARTC] Weighted packet shaping? Mark Williams (MWP)
2004-12-22 4:53 ` Mark Williams (MWP)
2004-12-22 9:07 ` Ed Wildgoose
2004-12-22 13:49 ` Andy Furniss
2004-12-22 15:48 ` Mark Williams (MWP)
2004-12-22 22:54 ` Andy Furniss
2004-12-23 10:56 ` Mark Williams (MWP) [this message]
2004-12-24 14:08 ` Andy Furniss
2004-12-24 15:19 ` Mark Williams (MWP)
2004-12-24 16:36 ` Andy Furniss
2004-12-26 4:38 ` Mark Williams (MWP)
2004-12-26 13:09 ` Andy Furniss
2004-12-28 9:35 ` Mark Williams (MWP)
2004-12-29 2:46 ` Andy Furniss
2004-12-29 6:52 ` Mark Williams (MWP)
2004-12-29 13:26 ` Francisco Pereira
2004-12-30 0:05 ` Andy Furniss
2005-01-03 11:22 ` marco ghidinelli
2005-01-04 13:57 ` Andy Furniss
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=20041223105418.GA19364@linux.comp \
--to=mwp@internode.on.net \
--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.