tc.1.txt
author viric@mandarina
Thu, 15 May 2008 19:00:38 +0200
changeset 1 840aebd2e31e
permissions -rw-r--r--
New pages

Traffic control

Classless pfifo_fast
-------------
3 bands. This means three fifos. 0 prioritized over 1, 1 over 2.
The kernel puts the packets into the fifos according to TOS.
classless

Classless Tocken Bucket Filter (tbf)
--------------
limit: max number of bytes waiting for tokens

latency: max time the bytes may wait for tokens (sets limit)

burst/buffer/maxburst: size of the bucket in bytes.

mpu: minimal token usage for a packet

rate: speedknob?

peakrate: The peakrate can be used to specify how quickly the bucket is
allowed to be depleted. If doing everything by the book, this is achieved by
releasing a packet, and then wait just long enough, and release the next. We
calculated our waits so we send just at peakrate.

mtu/minburst: A higher peakrate is possible by sending out more packets per
timertick, which effectively means that we create a second bucket!. To calculate the maximum possible peakrate, multiply the configured mtu by 100
(or more correctly, HZ, which is 100 on Intel, 1024 on Alpha).

Classless Stochastic Fairness Queueing
-------------------------------
perturb: Reconfigure hashing once this many seconds.


HTB (Hierarchic Token Bucket)
-------------------------------
All packets go to the class 1:1
tc qdisc add dev eth1 root handle 1: htb default 1

The class:
tc class add dev eth1 parent 1: classid 1:1 htb rate 20kbps ceil 20kbps 

A SFQ qdisc for that rate limited class, so all connections get fair traffic
tc qdisc add dev eth0 parent 1:1 handle 40: sfq perturb 10