cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1235
Views
15
Helpful
7
Replies

Using class and policy maps to prioritise and drop traffic.

patrick morrill
Level 1
Level 1

Hi,

I have a VPN runniing over an ADSL service with a relatively low upload speed of about 700kbps. I am running voice over this and It can be quite choopy, as you can imagine. I want to mitiigate this as much as possible by prioritising our EF (voice) traffic, then dropping anything on the upload when bandwidth is over 650kbps.

In order to achieve this I have created the following policy map. Although I am not entirely sure how the policy-map SHAPE will work... As you can see in that policy I have added the scond line that calls in the PMAP_QOS policy map. Should that be applied before the drop policy, or does it not make a difference?

Bearing in mind it seems logical I would want to prioritise the traffic first, then drop what's left over 650kbps, in which case maybe I should reverse the order?

All comments appreciated.

Thanks.

class-map match-all CMAP_QOS

match ip dscp ef

class-map match-all TRAFFIC-OUT

match any

policy-map PMAP_QOS

class CMAP_QOS

  set precedence 5

policy-map SHAPE

class TRAFFIC-OUT

    police 650000 conform-action transmit  exceed-action drop

  service-policy PMAP_QOS

interface FastEthernet0/1

ip address 10.59.1.254 255.255.0.0

service-policy input SHAPE

7 Replies 7

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

class-map match-all CMAP_QOS

match ip dscp ef

policy-map PMAP_QOS

class CMAP_QOS

  priority percent 33

policy-map SHAPE

class class-default

    shape average 650000

  service-policy PMAP_QOS

interface FastEthernet#/#

!on interface connected to ADSL

service-policy output SHAPE

Thanks for the response.

Just a couple of questions.

Why use priority percent 33? Does that not limit the EF traffic class to 33% when congested. Shouldn't I use bandwidth percent 33?

Also what difference does using shape average 650000
make, as opposed to police 650000 conform-action transmit exceed-action drop?

Lastly, why put the policy on the outbound ADSL interface and not the outbound LAN interface?

Thanks.

Hi,

1)bandwidth command is not for Voice traffic and what priority does is provide this bandwidth in case of congestion and police it at the same time( it will not get more than 33 percent of the bandwidth).

2)shaping is different from policing because when policing your traffic not conforming will get dropped whereas in shaping it will be delayed.

3) it is outbound because a  LLQ or CBWFQ for congestion management is always applied outbound and same for a shaping policy.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

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

To expand a little on what Alain has already provided.

#1 priority option, unlike bandwidth option, has its queued packets dequeued first.  This is useful for VoIP to maintain the least queuing latency and jitter.

Yes, 33% will limit VoIP bandwidth utilization (but only when interface is congested).  Note you can set the percentage higher, but if you need more than about 1/3 bandwidth for real-time traffic, you may need more bandwidth.  Cisco recommends not to exceed 1/3 to preserve bandwidth for non-real-time traffic, but you need excess bandwidth to insure the real-time traffic doesn't congest for lack of bandwidth.  This too to insure least queuing latency and jitter.

#2 Shaping buffers over rate bandwidth packets, rather than just dropping them, as does a policer.  The former then allows us to selectively dequeue packets.  The policer might also indiscriminately drop your VoIP packets.

#3 Because that's where you noted your 700 Kbps bandwidth restriction was, up side of ADSL link.  Appling policy to outbound toward LAN would be impacting DSL down side traffic.

Thanks all for responses!

Jospeh... Sorry, I did originally state that I applied policing to the inbound of LAN interface, but then made a typo later. Cadet then said that policing should always be applied to the outbound, meaning I would have to apply to the DSL interface instead to hit the upload traffic, as you initally advised.

Can I ask, what i reason behind policing being applied to outbound only? Or is it just convention?

Thanks.

Hi patrick,

I said that shaping must be applied outbound but policing can be applied inbound or outbound.

and as you do congestion management you also must apply it outbound.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

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

As Alain has also replied, policing can be used inbound or outbound; shaping and other queuing features are restricted to outbound only.

Since shaping inherently buffers excess traffic, which you can then prioritize dequeuing priorities and/or use WRED for dropping, shaping is often a better option.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: