eth0 == external interface Internet <-> modem <-> Linux Firewall <-> Intranet <-> VoIP phone tc qdisc add dev eth0 root handle 1: prio priomap 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 0 tc qdisc add dev eth0 parent 1:1 handle 10: sfq limit 3000 tc qdisc add dev eth0 parent 1:2 handle 20: sfq tc qdisc add dev eth0 parent 1:3 handle 30: sfq tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip dport 4569 0xffff flowid 1:1 tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip sport 4569 0xffff flowid 1:1 tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip tos 0x10 0xff flowid 1:2 To see some statistics, run the following command: tc -s qdisc ls dev eth0 To remove your queues and return to the normal state, run: tc qdisc del dev eth0 root Source: http://www.howtoforge.com/voip_qos_traffic_shaping_iproute2_asterisk