1 |
On Sunday 02 April 2006 21:06, Sven Köhler <skoehler@×××.de> wrote |
2 |
about '[gentoo-user] traffic shaping': |
3 |
> Is there any application or script that is easy to configure and does |
4 |
> all the necessary things to shape my DSL traffic? |
5 |
|
6 |
Not at this time. |
7 |
|
8 |
However, it's actually fairly easy to throw something together with HTB |
9 |
that works fairly well. If you are only matching on protocol (TCP or UDP) |
10 |
and (source or destination) (IP or port) a custom iproute2 script will not |
11 |
be that hard. |
12 |
|
13 |
tc qdisc created your root HTB(s); tc class creates your child/sibling HTBs |
14 |
[classes under the same qdisc can swap bandwidth]; tc filter decides what |
15 |
classes receive packets. |
16 |
|
17 |
Hit the TLDP Advanced Routing HOWTO and just hit the parts about HTB and tc |
18 |
filter. Then, go to the HTB site and read the user documentation there. |
19 |
Then come back and read the tc filter stuff again -- expect to learn a |
20 |
little to a lot about how a packet looks be it IP, TCP, or UDP. |
21 |
|
22 |
Write some scripts and experiment, you won't get it perfect the first time |
23 |
but after a little bit of work you'll find your browsing experience much |
24 |
better. Your filtering policies won't match mine, so it's hard to give a |
25 |
single script. I find it works best to load up your connection then start |
26 |
experimenting with a network monitor in another window -- you'll be able |
27 |
to see changes quickly and (at least with HTB) you won't drop packets just |
28 |
because you were changing settings. |
29 |
|
30 |
When it comes down to it, if you are killing your upstream /something/ is |
31 |
going to suffer, tc just lets you put the pain where you want it; if you |
32 |
regularly saturate your upstream, buy fatter pipes. TC WILL NOT HELP AN |
33 |
OVERLOADED DOWNSTREAM since it has no control over what packets are sent |
34 |
to you. |
35 |
|
36 |
If your requirements are fairly simple, send it my way and I'll try to |
37 |
write out a script for you; I know I need more practice. |
38 |
|
39 |
-- |
40 |
"If there's one thing we've established over the years, |
41 |
it's that the vast majority of our users don't have the slightest |
42 |
clue what's best for them in terms of package stability." |
43 |
-- Gentoo Developer Ciaran McCreesh |