cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4058
Views
4
Helpful
6
Replies

SIP/VoIP priority on Cisco 1921

robertsouthgate
Level 1
Level 1

Hi,

I am fairly new to Cisco, but am trying to configure a 1921 router to give higher priority to SIP/VoIP traffic (Port 5060) than everything else.

The connection is only 4Mb and is getting hit hard by video streaming, I don't want to block this, just make a lower priority.

Any ideas where I am going wrong?

My current config is as below.

The IP addresses have been changed for security reasons, but in reality are both in the same range, i.e. are both external IPs, so I am not sure if this is causing the problem.  Do I need NAT for QoS to work?

class-map match-any SIP

match protocol sip

class-map match-any CLASS_EtherFlow_Shaping

match any

!

!

policy-map QoSpolicySIP

class SIP

  priority percent 25

class class-default

  fair-queue

policy-map POLICY_EtherFlow_Shaping

class CLASS_EtherFlow_Shaping

  shape average 3680000

!

!

!

!

!

interface Embedded-Service-Engine0/0

no ip address

shutdown

!

interface GigabitEthernet0/0

  mtu 2000

bandwidth 3768

no ip address

duplex full

speed auto

service-policy output POLICY_EtherFlow_Shaping

!

interface GigabitEthernet0/0.4094

encapsulation dot1Q 4094

ip address 1.1.1.26 255.255.255.252

!

interface GigabitEthernet0/1

bandwidth 3768
description ** Local LAN **

ip address 1.1.1.217 255.255.255.252

duplex full

speed auto

service-policy output QoSpolicySIP

!

Thanks

6 Replies 6

John Blakley
VIP Alumni
VIP Alumni

There are a couple of changes you should make.

First, try removing the QoSpolicySIP from the local lan interface.

Change your policy to something like below:

policy-map POLICY_EtherFlow_Shaping

class SIP

  priority percent 25

class class-default

  shape average 3680000

See if that helps...

** Edit **

I was a little short on my response. The original policy that you have on the wan interface is shaping based off of a class map. That class map is matching everything. Policy maps work in that if there's not a specific class map that matches specific traffic, it will hit the class-default class. Your original policy can be modified to match all sip traffic and carve off 25 percent of the total bandwidth. Then, anything that doesn't match the SIP policy (anything on not on port 5060) will be shaped to 4Mb. So that would include your http, ftp, video traffic, etc. If you wanted to also allow your video priority over your web and ftp traffic, you could create another class that matches your video and then apply it to the POLICY_EtherFlow_Shaping policy map as well. You could set aside some bandwidth with the bandwidth command and then shape to a max accordingly.

HTH,

John

HTH, John *** Please rate all useful posts ***

Ok so something more like this?

class-map match-any SIP

match protocol sip

class-map match-any CLASS_EtherFlow_Shaping

match any

!

policy-map POLICY_EtherFlow_Shaping

class CLASS_EtherFlow_Shaping

  shape average 3680000

class SIP

  priority percent 25

Should that work?

I edited my last response and explained why it needed to be changed to what I originally stated. I think the policy that you're creating is overly complicated and can be simplified. Later on it will be easier to manage.

HTH,

John

HTH, John *** Please rate all useful posts ***

Ok, Thanks for the help.  So just to clarify,

I don't need the Class-map parts at the top of the config, just what you posted as a correction? and it should be class-default as well for the shape-average?

and this would give 1Mb of bandwidth to SIP? or 25% of whatever is set on the bandwidth value on the interface?

For QoS, the appliance will allow you to use 75% of the bandwidth. So, in reality, with your "bandwidth 3768" statement,  you'd have 2.8Mb to work with. For 25% of that 2.8Mb, you'd get 700k dedicated off the top for SIP. You can change this behavior by going under the wan interface and putting in "max-reserved-bandwidth 100". Keep in mind that the extra 25% that the router sets aside is so that it has enough bandwidth for other functions like routing updates, ntp, etc.

So, 700k is taken off the top and that leaves 2.1Mb for other traffic (if you left everything at the 75% cap). Your final policy, if you want to keep it just for SIP and then everything else the default class, would look like:

class-map match-any SIP

match protocol sip

policy-map POLICY_EtherFlow_Shaping

class SIP

  priority percent 25

class class-default

  shape average 3680000

int g0/0

service-policy output POLICY_EtherFlow_Shaping

HTH,

John

HTH, John *** Please rate all useful posts ***

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.

Liability Disclaimer

In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.

Posting

What you want, on your WAN facing interface, something like:

class-map match-any LLQ

match protocol sip

policy-map QoS

class LLQ

  priority percent 25

class class-default

  fair-queue

policy-map 4M_Shaping

class class-default

  shape average 3680000

service-policy QoS

interface GigabitEthernet0/0

service-policy output 4M_Shaping

You might also want to match on protocol RTP, as part of the LLQ class.

You may need to tune your shaper's 2nd (optional) parameter, to decrease Tc to 10ms or less.

You may need to tune your Ethernet interface's tx-ring-limit down.

You may need to shape a little slower (to allow for L2 framing overhead - unclear whether shaper accounts for it).

Lastly, don't forget you often need QoS in both directions.  Also, if this is a multi-point Ethernet connection, can other sites (concurrent aggregate) oversubscribe your interface, inbound?

Review Cisco Networking for a $25 gift card