1
|
1 |
Traffic control
|
|
2 |
|
|
3 |
Classless pfifo_fast
|
|
4 |
-------------
|
|
5 |
3 bands. This means three fifos. 0 prioritized over 1, 1 over 2.
|
|
6 |
The kernel puts the packets into the fifos according to TOS.
|
|
7 |
classless
|
|
8 |
|
|
9 |
Classless Tocken Bucket Filter (tbf)
|
|
10 |
--------------
|
|
11 |
limit: max number of bytes waiting for tokens
|
|
12 |
|
|
13 |
latency: max time the bytes may wait for tokens (sets limit)
|
|
14 |
|
|
15 |
burst/buffer/maxburst: size of the bucket in bytes.
|
|
16 |
|
|
17 |
mpu: minimal token usage for a packet
|
|
18 |
|
|
19 |
rate: speedknob?
|
|
20 |
|
|
21 |
peakrate: The peakrate can be used to specify how quickly the bucket is
|
|
22 |
allowed to be depleted. If doing everything by the book, this is achieved by
|
|
23 |
releasing a packet, and then wait just long enough, and release the next. We
|
|
24 |
calculated our waits so we send just at peakrate.
|
|
25 |
|
|
26 |
mtu/minburst: A higher peakrate is possible by sending out more packets per
|
|
27 |
timertick, which effectively means that we create a second bucket!. To calculate the maximum possible peakrate, multiply the configured mtu by 100
|
|
28 |
(or more correctly, HZ, which is 100 on Intel, 1024 on Alpha).
|
|
29 |
|
|
30 |
Classless Stochastic Fairness Queueing
|
|
31 |
-------------------------------
|
|
32 |
perturb: Reconfigure hashing once this many seconds.
|
|
33 |
|
|
34 |
|
|
35 |
HTB (Hierarchic Token Bucket)
|
|
36 |
-------------------------------
|
|
37 |
All packets go to the class 1:1
|
|
38 |
tc qdisc add dev eth1 root handle 1: htb default 1
|
|
39 |
|
|
40 |
The class:
|
|
41 |
tc class add dev eth1 parent 1: classid 1:1 htb rate 20kbps ceil 20kbps
|
|
42 |
|
|
43 |
A SFQ qdisc for that rate limited class, so all connections get fair traffic
|
|
44 |
tc qdisc add dev eth0 parent 1:1 handle 40: sfq perturb 10
|