f00ty wrote:
Hi all !
I'm building a network appliance whose goals are to enhance Voip
quality on 512/128k DSL links. But, i have a voice quality problem,
and i think i'm doing something wrong, but i can't find what. Please
excuse my terrible english, i'm french.
From what i've read, tc is the tool i need. I read the documentations,
readmes and lartc.org howto, and came to the following setup:
NA = Linux-based network appliance (in fact a standard PC)
A--[Switch]--[eth1 NA eth0]--[DSL modem]
A = 1 pc and 1 ip phone on a 192.168.0.0/24 network
on the other side, the DSL modem is a bridge-type, thus i have my
internet ip on the NA eth0 interface.
The DSL modem is actually a 15Mbit/1024Kbit ATM, but i want to limit
the upload to 128Kbit/s, to test the Voip thing.
You can patch for accurate atm rates - it may be in kernel/for hfsc
aswell one day.
http://ace-host.stuart.id.au/russell/files/tc/tc-atm/
You can also make htb more accurate if you change a define in
net/sched/sched_htb.c - HYSTERESIS 0.
If you don't patch you will need to set the sum of rates/ceils to well
below 1024 (if that's showtime rate).
My plan:
HTB qdisc with overall rate at 128kbit, and 2 classes, one with prio 1
(for VoIP) and one with prio 2 (For other data), each of them rated a
1kbit/s and ceiled at 128kbit/s. And, on top of this, SFQ qdiscs for
fairness.
So :
$TC qdisc add dev eth0 root handle 1: htb default 3
It's best not to use default on eth when shaping for some other
bottleneck, that way arp and other eth frames get let through unshaped
by htb. You should use tc/iptables to send unmatched/classified IP to
your own default class.
$TC class add dev eth0 parent 1: classid 1:1 htb rate 128kbit burst 6k
$TC class add dev eth0 parent 1:1 classid 1:2 htb quantum 1600 rate
1kbit ceil 128kbit prio 1
It will be better to give rate 127kbit to the rt traffic.
$TC qdisc add dev eth0 parent 1:2 handle 2: sfq perturb 10
I would use bfifo for rt and think about queue length, though an rt
class usually shouldn't be backlogged.
Andy.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc