[asterisk-users] Setting QOS settings in asterisk and/or CentOS?

Rich Adamson
Fri, 22 Sep 2006 17:43:12 -0000

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).