Tom, Using UDP as the only selection criteria for queue placement is going to be an issue. There are many, many other applications that will directly compete with your bandwidth using UDP. On Sat, Mar 1, 2014 at 11:10 AM, Tom Parrott <tomp@tomp.co.uk> wrote:
Hi,
I have been experimenting with the tc command to prioritise VOIP traffic, and I wondered if anyone could check over my script and see if it does what I think it does :)
Effectively I want to create 3 queues, one for UDP traffic (RTP) with highest priority, one for SIP traffic (port 5060 TCP) with 2nd highest priority, and finally a 3rd queue for everything else.
#Put everything in 3rd queue by default? tc qdisc add dev $DEV root handle 1: prio priomap 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
#Create 3 SFQ queues tc qdisc add dev $DEV parent 1:1 handle 10: sfq limit 3000 tc qdisc add dev $DEV parent 1:2 handle 20: sfq tc qdisc add dev $DEV parent 1:3 handle 30: sfq
#Match UDP traffic and put into priority 1 queue ${TC} filter add dev $DEV parent 1: protocol ip prio 1 u32 \ match ip protocol 17 0xff flowid 1:1
#Match SIP traffic and put into priority 2 queue ${TC} filter add dev $DEV parent 1: protocol ip prio 1 u32 \ match ip dport 5060 0xffff flowid 1:2 ${TC} filter add dev $DEV parent 1: protocol ip prio 1 u32 \ match ip sport 5060 0xffff flowid 1:2
I have check the status of the queues, and it seems to be correctly classifying the different packets.
But I am not sure whether it is prioritising them correctly or not.
Thanks Tom
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-dev mailing list FreeSWITCH-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
-- Kristian Kielhofner