From: Grant <emailgrant@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Packet Shaping
Date: Mon, 16 Apr 2007 09:00:04 -0700 [thread overview]
Message-ID: <49bf44f10704160900m65f3e8beh5a044d38d8761a1d@mail.gmail.com> (raw)
In-Reply-To: <20070414190735.cd7f1b58.hilse@web.de>
> > After a lot of testing, these numbers seem to give me the best
> > performance as far as bittorrent download speed.
> > How can that be? Is DOWNLINK my upload and UPLINK my download?
>
> Hm, usually not. Are you by chance shaping the internal (i.e. LAN)
> interface on a router? Then, of course, it would make sense (except
> from the fact that shaping your actual bottle neck, i.e. Internet
> connection, would make more sense).
Thanks a lot for that. I switched the interface to eth0 and reversed
the DOWNLINK and UPLINK values.
> > I tried to define the bittorrent ports as a low priority like this:
> > NOPRIOPORTSRC=6881:6999
> > NOPRIOPORTDST=6881:6999
> >
> > but I get this when restarting shorewall:
> > Illegal "match"
>
> In the wshaper source, the action happens here (and the same for *DST):
> ---snip
> for a in $NOPRIOPORTSRC
> do
> tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \
> match ip sport $a 0xffff flowid 1:30
> done
> ---snip
>
> In this configuration, it expects a shell-separatable list of ports,
> i.e. separated by whitespace. It will create a rule for each one.
>
> The dirty, easy way:
> | NOPRIOPORTSRC=$(seq 6881 6999)
> | NOPRIOPORTDST=$NOPRIOPORTSRC
>
> But I would rather extend wshaper by another (custom) line and dump your
> NOPRIOPORT*-settings.
>
> The syntax is "match ip sport PATTERN MASK". The port of an incoming
> packet is AND'ed w/ the MASK and compared to the PATTERN.
>
> e.g. "match ip sport 6880 0xffe0" would match 6880-6911, a further
> "match ip sport 6912 0xffc0" would match 6912-6975.
>
> The advantage of this is simply speed/CPU cycles. Alternatively, you
> could just use iptables to mark your packets (which probably means even
> more precious CPU cycles). The wshaper script, however, doesn't use
> iptables.
I switched to wshaper from wshaper.htb and now ssh and browsing seem a
lot more responsive. Could that be because I'm missing something in
my kernel that I need for htb? I don't get any errors when restarting
the firewall.
One other thing is if I don't limit the upload rate within my
bittorrent client, it really goes nuts and everything else suffers. I
don't see how that's possible with UPLINK and the bittorrent source
and destination ports defined.
What I'd really like to do is limit the bittorrent upload rate so
Verizon doesn't throttle my connection. Can I do that with The Wonder
Shaper without limiting the total upload rate? I don't trust the
bittorrent clients I use to limit it.
- Grant
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2007-04-16 16:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-13 18:24 [gentoo-user] Packet Shaping Grant
2007-04-13 19:04 ` Hans-Werner Hilse
2007-04-14 15:37 ` Grant
2007-04-14 17:07 ` Hans-Werner Hilse
2007-04-16 16:00 ` Grant [this message]
2007-04-16 20:31 ` Hans-Werner Hilse
2007-04-16 22:19 ` Grant
2007-04-17 10:15 ` Hans-Werner Hilse
2007-04-18 0:29 ` Grant
2007-04-18 6:37 ` Elias Probst
2007-04-18 15:17 ` Grant
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=49bf44f10704160900m65f3e8beh5a044d38d8761a1d@mail.gmail.com \
--to=emailgrant@gmail.com \
--cc=gentoo-user@lists.gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox