I have a 100MB ethernet connection to our service provider, but am only buying 10MB of bandwidth.
I am shaping our traffic to 10MB and then applying QOS to prioritize Voice and Video and this works great.
Here is the existing running config that works just fine:
class-map match-any Voice
match ip dscp ef
class-map match-any Video
match ip dscp af41
class-map match-any Call-Control
match ip dscp cs3
shape average 10000000
Now I need to limit the amount of imaging traffic (large file transfers) to 2MB going across this link. I could police the image class to 2MB, but to stay away from retransmissions when the policer drops packets, I thought I'd shape the image class instead.
class-map match-any Imaging
match access-group 151 (ACL permits TCP ports 104 and 6464)
When I add this new class to the policy-map with shaping I get this error:
VoIP-2621-MDF(config-pmap-c)#shape average 2000000
GTS : Can be enabled only at the first level
So instead I added the class to the top level like:
shape average 2000000
set dscp af11
shape average 10000000
This works well, but my question is how does adding a class with shaping at the top level affect the class-default shaping of the original bandwidth to 10MB below it?
Should I stick with policing the Image class and not have two levels of shaping?
I couldn't agree more with this post. He would have 2Mb/s for imaging and then an additional 10Mb/s for the other traffic.
I was checking earlier to make sure this wasn't a switch. I see this is a router, so that error message is letting you know that generic traffic shaping is not supported in child policies. The idea of hierarchical shaping is to apply relative weights and bandwidth statements all within a sub-line rate pipe.
A shaper is absolutely a policer with a big buffer, that's all - good point.
The final point here is also a good one; why not give a lower bandwidth to this imaging class within the 10Mb/s shaped class? This way you can have the minimum required bandwidth of whatever you choose but not restrict it when you have more bandwidth available.
Does that make sense?
For what it's worth, shaping within a shaper is on the roadmap. Likely in 12.4T/12.5 code. I work with switching and don't deal with much above 12.2 most days so I am not 100% on this one.
What I believe you now have is the possibility of 12 Mbps outbound, 2 for images and 10 for everything else. To avoid going over the 10 Mbps, you could reconfigure the class-default to only use 8 Mbps but then the two distinct shapers couldn't use available bandwidth the other shaper isn't using. So, to be able to use the full 10 Mbps but still constrain imaging, you'll need to police it.
BTW: shapers drop packets too, although usually with more buffering than a default policier provides. The policier could (I believe) be tuned to be a bit more burst tolerant. Also, with something like file transfers of images, the queuing of a shaper isn't as advantageous.
You might also consider, instead of trying to shape or police the image class, just provide it its own class but with the minimal bandwidth allowance. This will then permit it to transfer using all available bandwidth, but yield bandwidth to other more important traffic.