How many policy maps can be assigned to an interface

Unanswered Question
Dec 28th, 2007

Probably a dumb question. I have one policy map doing traffic shaping on an outgoing interface. I want to create another policy map for voip traffic and apply it to the same outgoing interface. Can I just use the service policy output command for both maps, or should I add the shaping command to the end of the voip map. In what order would the items in the policy be applied if it were all wrapped up into one.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (8 ratings)
vanguard1 Fri, 12/28/2007 - 10:36

OK. Just one outgoing or incoming policy map per interface. Now my question is in what order are the class maps looked at? Should I do the voip first and then do the shaping?

PAUL TRIVINO Fri, 12/28/2007 - 16:15

I believe the classes are looked at in the order specified. Put your VoIP (LLQ) class at the top, other bandwidth-limiting classes after that, and then the default class.

vanguard1 Fri, 12/28/2007 - 18:21

So you disagree with the first response. Looking at that example, it looks like entering in those commands would give you 2 separate policy maps. When applied in the example for pppoe shown, it looks like just one is applied to the interface. How would it know to use the child-queueing policy, which seems to be just a name for a policy-map?

royalblues Fri, 12/28/2007 - 22:32

Both the above posters are right.

You can have multiple policy maps defined on a router but only one can be applied to the interface

Paolo's example is that of a nested policy, wherin the parent policy will be applied to the interface and will be referencing the child policy defined under it



Paolo Bevilacqua Sat, 12/29/2007 - 04:30

Hi, is not that I disagree, it's that it depends what you want to do.

If you are trying to do QoS on an ethernet for voice, you will definitely need a nested policy with shaping at the link speed of the next slower circuit.

If you are just setting shaping, remarking, etc, for "general purpose", then a regular policy is OK and order doesn't count.

Hope this clarify that a bit.

vanguard1 Tue, 01/01/2008 - 06:51

Will be using for voice. Thank you for clarifying. How does this look.

class-map match-all Voip-Control

match access-group 111

class-map match-all Voip-RTP

match access-group 110

policy-map shape100mb

class class-default

shape average 100000000

service-policy qos-policy-voip

policymap qos-policy-voip

class Voip-RTP

priority 800

class Voip-Control

bandwidth 8

class class-default


on interface to MPLS Cloud

service-policy output shape100mb

royalblues Tue, 01/01/2008 - 09:23

config looks good

btw, how many calls do you wanna support?

The values for priority and bandwidth should be in accordance to that (control bandwidth seems way too low)

A single G729 call would take around 24K



vanguard1 Tue, 01/01/2008 - 10:52

Here are the access lists from the same config, forgot to post before.

access-list 110 permit udp any any range 60000 63071

access-list 110 permit udp any range 60000 63071 any

access-list 111 permit udp any eq 3455 any eq 3456

access-list 111 permit udp any eq 3458 any

access-list 111 permit udp any eq 4000 any

Each site will have around 20-25 ip phones. 10 would be the most in use at one time from any site I would guess. Is their a best practice or common setting for the priority and bandwidth commands. Definitely can change if you think that would be best. 20 mb for 3 sites, 100mb from the other 2. PBX is in one of the 100 mb sites.

Paolo Bevilacqua Tue, 01/01/2008 - 11:31


You should configure the shaping value to be the circuit speed of the next upstream link, for example 640000 for a DSL, 1500000 for T1, etc.

Then, cisco voip by default uses the correct dscp ef marking, so you can replace all the udp/port matching ACL with simply "match ip dscp ef".

Paolo Bevilacqua Tue, 01/01/2008 - 14:48

Another thing. Try asking your MPLS provider, if they honor dscp in your traffic. If they do, you don't need to do anything.

vanguard1 Thu, 01/03/2008 - 09:27

Will do. You mentioned that the bandwidth and priority settings seemed low. Say you were going to have a maximum of 15 calls at any one time, and had 20 mb of bandwidth to play with. What would you recommend for settings in that scenario. Bandwidth command I belive is the amount of bandwidth allocated per call?

Priority command I believe is the amount of bandwidth guaranteed to marked traffic during congesiton. If I have 20mb, give 8mb for the priority command. Let me know what you think, I appreciate your feedback.

Paolo Bevilacqua Thu, 01/03/2008 - 11:17


what matters is the shaping parameter, 20000000 if you have 20 mbps guaranteed throughput, and the priority parameter, that is cumulative for all calls or marked traffic as you say.

15 times 80 Kbps, makes 1,200,000 that is written as 1200. You can omit the control class, worry not, control traffic will work anyway.

vanguard1 Mon, 02/11/2008 - 09:18

Thanks again for all of your help. When applying this policy, should I apply to the subinterface for the voice vlan, or can I apply it to the main interface going out to the mpls cloud.


This Discussion