Hello,
I'm trying to get lossless VoIP traffic over my 3000k/500k ADSL line. Shaping
outgoing traffic is no problem: I set total ceil for outgiong device (ppp0)
to 450kbit and put VoIP into highest prio class. Even during full upload the
voice is clean on the other end.
Now I tried to get the same result for incoming data. I attached HTB to eth1
where the incoming voip traffic is forwarded to. But even when I set the
ceiling for other traffic as low as 800kbit there are drop outs in incoming
voice while "full" downloading.
Could I setup HTB better than below? Should I reduce eth1's queue length (now
1000)? If yes, how?
Thanks.
Daniel
-------- 8< --------
INT=eth1
# creating root and root class
tc qdisc add dev $INT root handle 1: htb default 10
tc class add dev $INT parent 1: classid 1:1 htb rate 1000mbit prio 0
# class for not forwarded traffic (and sfq leaf)
tc class add dev $INT parent 1:1 classid 1:10 htb \
rate 997mbit ceil 1000mbit prio 1
tc qdisc add dev $INT parent 1:10 handle 10: sfq perturb 10
# class for forwarded traffic
tc class add dev $INT parent 1:1 classid 1:11 htb \
rate 2500kbit ceil 2500kbit prio 0
# class for highest prio VOIP (and sfq leaf)
tc class add dev $INT parent 1:11 classid 1:110 htb \
rate 200kbit ceil 2500kbit prio 0
tc qdisc add dev $INT parent 1:110 handle 110: sfq perturb 10
# class for higher prio traffic (and sfq leaf)
tc class add dev $INT parent 1:11 classid 1:111 \
htb rate 1200kbit ceil 1500kbit prio 1
tc qdisc add dev $INT parent 1:111 handle 111: sfq perturb 10
# class for low prio traffic (and sfq leaf)
tc class add dev $INT parent 1:11 classid 1:112 htb \
rate 100kbit ceil 800kbit prio 2
tc qdisc add dev $INT parent 1:112 handle 112: sfq perturb 10
# filters for forwarded traffic
tc filter add dev $INT parent 1: prio 0 protocol ip handle 110 fw flowid 1:110
tc filter add dev $INT parent 1: prio 1 protocol ip handle 111 fw flowid 1:111
tc filter add dev $INT parent 1: prio 2 protocol ip handle 112 fw flowid 1:112
# iptables ruels for marking forwarded traffic
# put everything to lowest prio
iptables -t mangle -A FORWARD -o $INT -j MARK --set-mark 112
# VOIP traffic -> 110
iptables -t mangle -A FORWARD -o $INT -p udp --sport sip \
-j MARK --set-mark 110
iptables -t mangle -A FORWARD -o $INT -p udp --dport sip \
-j MARK --set-mark 110
iptables -t mangle -A FORWARD -o $INT -p udp --dport 10000:10500 \
-j MARK --set-mark 110
# higher prio
iptables -t mangle -A FORWARD -o $INT -p tcp -m multiport \
--sports 22,80,443,143 -j MARK --set-mark 111
iptables -t mangle -A FORWARD -o $INT -p icmp -j MARK --set-mark 111
-------- >8 --------
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
|