BerkHolz, Steven
2006-Sep-21 06:33 UTC
[asterisk-users] Setting QOS settings in asterisk and/or CentOS?
How would I go about setting the TOS bit to "RTP IP TOS Byte: 18 (hex)" for SIP and IAX traffic at the asterisk server? Also, Do you have a quick reference on how to configure a Cisco switch to prioritize SIP traffic? I check in various Cisco docs, and there are so many references, and none of them seem to relate directly to using the TOS bit for QOS. I am looking into using the TOS bit because that is the only method that my SIP devices use. (Citel Handset Gateway) ref: QOS settings from Citel Handset Gateway: Handset Gateway - QoS Configuration IP Type of Service RTP IP TOS Byte: 18 (hex) Silence Suppression Mute Mode: On, UDP keep-alive every 10 seconds G.711 Voice Activity Detection: Off Codec Preferences G.711u: 1 (Highest priority) G.711a: 2 Thank You, Steven BerkHolz - MCSA - MCSE - Manager of Information Systems TESCO Group Companies Fax. 248-836-5101 www.TESCOGroup.com Board member of www.glimasoutheast.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060921/5c731f25/attachment.htm
Redouane Doumer
2006-Sep-21 08:26 UTC
[asterisk-users] Setting QOS settings in asterisk and/or CentOS?
Hello, For the Cisco QOS: Based on a Cisco Router all you need is a simple access-list. class-map match-any voip-class match ip rtp 10001 9999 match access-group 150 ! ! policy-map voip-policy class voip-class priority xxx (in Kbits) access-list 150 permit udp any any eq 5060 access-list 150 permit udp any any eq 4569 Voila! Redouane ________________________________ De : BerkHolz, Steven [mailto:StevenBerkHolz@TESCOGroup.com] Envoy? : jeudi 21 septembre 2006 15:33 ? : asterisk-users@lists.digium.com Objet : [asterisk-users] Setting QOS settings in asterisk and/or CentOS? How would I go about setting the TOS bit to "RTP IP TOS Byte: 18 (hex)" for SIP and IAX traffic at the asterisk server? Also, Do you have a quick reference on how to configure a Cisco switch to prioritize SIP traffic? I check in various Cisco docs, and there are so many references, and none of them seem to relate directly to using the TOS bit for QOS. I am looking into using the TOS bit because that is the only method that my SIP devices use. (Citel Handset Gateway) ref: QOS settings from Citel Handset Gateway: Handset Gateway - QoS Configuration IP Type of Service RTP IP TOS Byte: 18 (hex) Silence Suppression Mute Mode: On, UDP keep-alive every 10 seconds G.711 Voice Activity Detection: Off Codec Preferences G.711u: 1 (Highest priority) G.711a: 2 Thank You, Steven BerkHolz - MCSA - MCSE - Manager of Information Systems TESCO Group Companies Fax. 248-836-5101 www.TESCOGroup.com Board member of www.glimasoutheast.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060921/54ea1192/attachment.htm
Greg Kennedy
2006-Sep-21 10:37 UTC
[asterisk-users] RE: Setting QOS settings in asterisk and/or CentOS?
I use the following in rc.local for setting tos bits using iptables:iptables -A POSTROUTING -t mangle -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x2eWorks like a champ!> 1. RE: Setting QOS settings in asterisk and/or CentOS?> (Redouane Doumer)> De : BerkHolz, Steven [mailto:StevenBerkHolz@TESCOGroup.com] > Envoy? : jeudi 21 septembre 2006 15:33> ? : asterisk-users@lists.digium.com> Objet : [asterisk-users] Setting QOS settings in asterisk and/or CentOS?> > > How would I go about setting the TOS bit to "RTP IP TOS Byte: 18 (hex)" for SIP and IAX traffic at the asterisk server?> > Also, > Do you have a quick reference on how to configure a Cisco switch to prioritize SIP traffic?> I check in various Cisco docs, and there are so many references, and none of them seem to relate directly to using the TOS bit for QOS.> > I am looking into using the TOS bit because that is the only method that my SIP devices use. (Citel Handset Gateway)> > ref:> QOS settings from Citel Handset Gateway:> Handset Gateway - QoS Configuration> > IP Type of Service > RTP IP TOS Byte: 18 (hex) > > Silence Suppression > Mute Mode: On, UDP keep-alive every 10 seconds> G.711 Voice Activity Detection: Off> > Codec Preferences > G.711u: 1 (Highest priority) > G.711a: 2> > > > Thank You,> > Steven BerkHolz> - MCSA - MCSE -> Manager of Information Systems> TESCO Group Companies> Fax. 248-836-5101> www.TESCOGroup.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20060921/8a3f1911/attachment.htm
Bob Amen
2006-Sep-22 13:14 UTC
[asterisk-users] Setting QOS settings in asterisk and/or CentOS?
BerkHolz, Steven wrote:> How would I go about setting the TOS bit to "RTP IP TOS Byte: 18 > (hex)" for SIP and IAX traffic at the asterisk server?We do it by setting the DSCP value to 40, which sets the TOS bit to 5 using iptables. Here's our rules_save for these opertations: [350334:180338667] -A OUTPUT -p udp -m udp --dport 5060 -j DSCP --set-dscp 0x28 [12085728:2417094759] -A OUTPUT -p udp -m udp --sport 10000:20000 -j DSCP --set-dscp 0x28 [4531:356102] -A OUTPUT -p udp -m udp --sport 4569 -j DSCP --set-dscp 0x28 [4531:356102] -A OUTPUT -p udp -m udp --dport 4569 -j DSCP --set-dscp 0x28 which sets the TOS bit on all IAX, SIP and RTP packets. Using iptables means that we can set up our rules on the router without using ACLs. Our Cisco Cookbook (http://www.oreilly.com/catalog/ciscockbk/) has a nice section on QoS (Chapter 11) and an appendix on TOS, etc. The author advises not to use ACLs when possible as they take more CPU in the router to implement and on a heavily loaded router can cause packet delays. So here's what our config looks like: class-map match-any Class-A description Voice (IPP Critical) match ip precedence 5 match protocol rtp ! ! policy-map MPLS class Class-A bandwidth percent 25 class class-default fair-queue 512 random-detect Then you just apply the policy-map to the outgoing interface. Cheers, Bob -- Bob Amen O'Reilly Media, Inc. http://www.ora.com/ http://www.oreilly.com/
Rich Adamson
2006-Sep-22 17:43 UTC
[asterisk-users] Setting QOS settings in asterisk and/or CentOS?
BerkHolz, Steven wrote:> How would I go about setting the TOS bit to "RTP IP TOS Byte: 18 (hex)" > for SIP and IAX traffic at the asterisk server? > > Also, > Do you have a quick reference on how to configure a Cisco switch to > prioritize SIP traffic? > I check in various Cisco docs, and there are so many references, and > none of them seem to relate directly to using the TOS bit for QOS. > > I am looking into using the TOS bit because that is the only method that > my SIP devices use. (Citel Handset Gateway)For asterisk, take a look at sip.conf.sample and you'll find something like this for v1.2 and earlier: tos=lowdelay ;ox18 sets ip tos bits (=lowdelay, throughput) After v1.2, the look in the asterisk/docs directory and you'll find a readme file relative to QoS. The format of the QoS parameters have changed from the older TOS bits to the newer terminology Differentiated Services, and coding within sip.conf looks something like this: tos_sip=cs3 tos_audio=ef Differentiated Services is a superset of TOS; anything you want to do in TOS bits have an equivalent in Differentiated Services, and the bits map exactly. The cisco web site has a very significant amount of documentation for configuring routers and switches for QoS, and they have a very excellent 700+ page book that is oriented 100% towards implementing QoS on various cisco boxes. Cisco's search engine leaves something to be desired in some cases, but the info you want is there. Not all cisco switches have the same QoS implementations. For example, most of the workgroup type switches support something like 3 or 4 outbound queues, while the higher end switches support more queues. If you're going to deal with RTP only from a QoS perspective, you only need two queues (eg, RTP & Default). The Default queue (or Class) is a special case that includes everything not in other queues. For the most part, QoS on switches is not required unless: a) trunk port traffic exceeds the bandwidth available (for that port), or, b) outbound port is a slower speed then the majority of other switch ports (eg, congestion).