[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Asterisk QoS

Posted on 2007-10-15
15
Medium Priority
?
2,420 Views
Last Modified: 2013-11-12
Hi,
Just wondering if anyone has successfully deployed an Asterisk phone system with Cisco Router QoS?
What how did you tag the packets in Asterisk and what did you use on the Cisco router?
Thanks
0
Comment
Question by:mark_06
  • 5
  • 5
  • 3
  • +2
15 Comments
 
LVL 36

Expert Comment

by:grblades
ID: 20076630
I haven't done it but it can certenly be done. Here is a guide :-
http://www.voip-info.org/wiki/view/QoS+Cisco

I am sure that Asterisk tags the packets accordingly but you can just prioritise all the traffic to the asterisk server.
0
 

Expert Comment

by:raindave
ID: 20079706
We have a 1841 router with bonded T1. Mixed results. I don't think the 1841 is up to the job.
0
 
LVL 36

Expert Comment

by:grblades
ID: 20079770
I would have expected the 1841 to be suitable. However you can only really prioritise the outbound traffic and you are largely reliant on the ISP to prioritise the inbound traffic which a lot of them wont do. There are a few tricks you can do to try and limit the bandwidth for inbound tcp connections but this does not work well as you still have problems when the connection is first made.
I normally recommend a completely separate internet connection just for VoIP. That way there are no QOS issues as only VOIP is using the connection.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:tkfast
ID: 20082360
We have multiple bonded T1's this with what we have running for our asterisk QOS form the cisco to cisco router.  We have worked many months with cisco and this is what we have come to use but I'm sure the is many more options..

class-map match-all sip-class
 match access-group 102
class-map match-all voice-class
 match access-group 103
!
!
policy-map voice
 class voice-class
  priority percent 60
 class sip-class
  priority percent 10
 class class-default
  fair-queue
!

access-list 102 permit udp any any eq 5060
access-list 102 permit udp any any eq 4569
access-list 102 permit udp any any eq 5036
access-list 102 permit tcp any any eq 5060
access-list 103 permit udp any any range 10000 20000
0
 
LVL 11

Expert Comment

by:tvman_od
ID: 20083086
Are we talking about QoS in LAN or WAN?

In LAN you can use QoS only on trunk ports where multiple VLANs use a single port.

1.With T1 or similar connection you can effetivley control OUTGOING traffic only. So for point-to-point connection you should apply a QoS policy-map at both sides to outgoing direction.
2.Voice traffic going from the Internet cannot be controlled effectively, you can try to use policer at inbound interface to keep TCP traffic low when RTP presented, but if you have any sort of excessive UDP traffic conggesting your Internet link, you can shut yourself.
3. DSCP parcks may be (most likely) dropped on access router of your ISP and even if not, nobody will honor them.

As a bottom line, QoS will work in your LAN/WAN. Don't expect too much from Internet.

tkfast,
1. SIP signaling can have lower priority then strict, it's not sensentive fro delays, just packet lost is critical.
2. It's not recommended to assign more then 30-35% of available bandwidth for strict priority queue, otherwise jitter may be higher then 30ms for T1 type connections. Just think what is going to happen if you had one G.729 call and then 10 more started, packets for 10 more will be queued to the priority queue as FIFO, so packets for the first call will be delayed (jitter). Then de-jitter buffer will catch up, but quality will be affected.
3. Recommended parameters: Jitter < 30ms, one way delay < 200-250ms (I's acceptable even on 400ms, but not for people who are not aware of the delay), packet loss < 0.5% (2% for single packets)
 
0
 
LVL 6

Author Comment

by:mark_06
ID: 20083424
How do I add a policer to my cicso 1721 to do this?
and is it done on the dialer sub int or int?
0
 
LVL 6

Author Comment

by:mark_06
ID: 20083782
If I was to install a separate connection to handle voip only, what sort of connection would you recommend? It would have to be ADSL1 (because 2 and 2+ are not avalible in my area).
I was thinking 512k/128k (as I use g729) for 5 simultaneous VoIP calls. All the connection would handle would be voip, I would create an ACL to block other traffic from using the connection.

Though I would like to try policing the existing connections inbound first!

Thanks!
0
 
LVL 36

Expert Comment

by:grblades
ID: 20083827
A G729 call uses approx 31kbps of ethernet bandwidth so for 5 calls you need more than 128k so would need an ADSL connection with at least 256kbps in both directions.
An alterianitive would be to use the IAX2 protocol instead of SIP and trunk the calls. This would reduce the bandwidth requirement to 30kbps for the 1st call plus 10kbps for each additional call. Therefore 5 calls will require 70kbps. Far fewer voip providers support this protocol though.
0
 
LVL 6

Author Comment

by:mark_06
ID: 20083844
Thanks! I do know of a VoIP provider who supports IAX but they are pretty crap. I could probably only justify a max of 1500k/256 in terms of the benefits out waying the costs. 5 calls  = 155 kbps so 256 up should do it.
But will try the policing inbound first!
0
 
LVL 11

Expert Comment

by:tvman_od
ID: 20088926
mark_06,

policer will not really help.
class based queuing on outgoing ethernet interface can do a better job.

classify all your traffic, create a policy map for incoming and outfoing traffic.

In order to give you any suggestions I need to know
1. How many concurent calls do you expect, which protocol and codec
2. Other applications running over the same connection
3. In/Out bandwidth
0
 
LVL 6

Author Comment

by:mark_06
ID: 20090790
tvman_od -
1. 5 concurrent calls running SIP and g729
2. Web server & access, mail server and terminal services
3. x2 512k/512k ADSL connections bonded (for WAN) - to the LAN is 100Mbit

We also have a Cisco 3560G 48 port switch if that helps - I haven't really tried QoS on that yet, other than auto qos to trust all marked packets, I have tried marking them in asterisk (the dscp) but I am not sure if I am doing it right - LAN VoIP calls sounds fine anyway.  

I was thinking of un-bonding the ADSL connections and dedicating one to VoIP, except, then we would not have enough bandwidth for everything else, and 512k/512k ADSL would probably be overkill for 5 calls with g729. Not to mention these connections cost $300 (AUD) per month each and I cannot justify spending $300 per month on VoIP - it would loose its savings. So if I did dedicate a connection I would bring in another connection at around $50-$80 per month, where we could still end up in front....
hope that makes sense...

Thanks
0
 
LVL 11

Accepted Solution

by:
tvman_od earned 1500 total points
ID: 20093304
So, you need to mark all your traffic with EF DSCP (46 decimal)
Assuming that everything else has default priority.

access-list extended default
 permit ip any any  

class-map match-any EF
match ip precedence 5  
match ip dscp ef  

class-map match-any BE
  match access-group default

policy-map QoSLAN
 class EF
   set ip dscp ef
    priority 192  
class BE
   bandwidth 320
   set ip dscp default  

policy-map QoSLAN
 class EF
   set ip dscp ef
    priority 192  
class BE
   bandwidth 832
   set ip dscp default  

interface Fa0
 description  WAN1
 badwidth 512
service-policy output QoS  

interface Fa1
 description  WAN2
 bandwidth 512
service-policy output QoS

interface Fa1
  bandwidth 1024
 description  LAN
service-policy output QoSLAN

 
0
 
LVL 6

Author Comment

by:mark_06
ID: 20094252
Hi,
I am getting this message  "I/f Dialer4 class BE requested bandwidth 320 (kbps), available only 192 (kbps)" but I set the int bandwidth to 512.
Any ideas?
0
 
LVL 11

Expert Comment

by:tvman_od
ID: 20095260
IOS may reserve 25% for possible SNMP and other urgent but not EF traffic. So just give as much as it allows. Any way if there is no EF or that urgent traffic it will give it all to BE queue.
0
 
LVL 11

Expert Comment

by:tvman_od
ID: 20095276
BTW, you can tweak it but it's not recommended.
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are no good configuration guides for HP-H3C router to LYNC on the web. :( Big statement, but we havent been able to find one yet. We did find the following document useful, but the information was not enough to use H3C router for use as a L…
Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Loops Section Overview
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question