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

Rich Adamson radamson at routers.com
Tue Sep 26 06:24:18 MST 2006


Steven wrote:
> I found this command if your Cisco switches support it:
> "auto qos voip trust"
> You set this on each interface.
> It automatically prioritizes all SIP and skinny traffic, but not iax.
> 
> There is also "auto qos voip cisco-phone". This one can detect a Cisco phone and prioritize it.
> 
> I just have to figure out how to verify that it is actually doing anything.
> 

The auto qos function is a relatively new addition to the cisco routers 
and switches (eg, last year or so). The parameter is added to an 
individual interface (usually a serial interface), and it truly watches 
for actual traffic on that interface until you shut it down. At that 
point, auto qos "writes" the policy statements into the router config 
needed to support that actual traffic.

To use it, you must:
  - enable it on an individual interface,
  - do not change the interface "bandwidth" statement while its running,
  - cisco express forwarding must be enabled, and,
  - all previously attached QoS policies must be removed from the 
interface being sampled.

Its my understanding (although I've not actually done this) that auto 
qos can be used to monitor all traffic and not just voip packets. For 
example, some companies may wish to generate qos policies for Citrix, MS 
Terminal Server traffic, etc, and may not have any voip implementation 
at all. So, auto qos is not just for voip traffic and should be very 
usable with iax.

Since you've specifically mentioned the "auto qos voip cisco-phone" 
statement, that statement essentially says watch for voip traffic coming 
from a cisco phone. Reading between the lines says: Cisco ships their 
voip phones with QoS already preconfigured with signaling traffic in one 
DSCP class and rtp traffic in another DSCP class. If your non-cisco 
phones aren't set up with those exact same DSCP markings, auto qos won't 
write the policy statements into your router's config. (E.g., cisco 
tends to push their proprietary voip sutff, so guess what... "auto qos 
voip cisco-phone" was oriented around those phones and not necessarily 
the sip versions of that same cisco phone.) The simplest command is 
"auto qos" applied to an individual interface without any other 
qualifying parameters.

Keep in mind that auto qos is actually monitoring your traffic in real 
time, which assumes you've got voip phones, asterisk box, etc, already 
preconfigured to mark packets with TOS or DSCP bits. If that's not the 
case, then your voip traffic appears as "default" non-qos traffic and no 
policy will be written to the router's config.

For testing purposes, auto qos can be applied to an interface then 
multiple voip test calls can be initiated manually. It would then write 
the appropriate policy statements into your config based on those voip 
test calls. In a large production world, one would apply auto qos to an 
interface and let it be for some much longer period of time (eg, hours). 
Then auto qos would write the config statements necessary to support the 
actual traffic observed over that period of time.

There is no magic behind using auto qos; you can do the exact same thing 
manually by configuring policies in the router and doing something like 
"show policy-map interface s1". That display will tell you how much 
bandwidth is consumed for each QoS class that has been configured in 
your policy. The problem with doing that manually is that you have to 
know when your peak traffic period is for voip traffic, and then run the 
commands during that peak period to get it right.

There are technical white papers on the cisco web site (somewhere) that 
describes how to use the auto qos function, but keep in mind the 
function was only recently introduced so it is not yet implemented on 
every product or in every IOS image.



More information about the asterisk-users mailing list