This is a branch off of another post I was trying to help someone with this morning, but I was curious about what I posted:
If I have to shape traffic to 128k only during times of congestion, would creating a class-map to match any traffic and applying it to a policy be sufficient? You can't apply shaping to that rate on the class-default, or it would be shaped all of the time. If this isn't correct, how would someone be able to shape all traffic based when congestion occurs only? (This is all theoretical because I know that you would want to shape only certain types of traffic.)
If I have to shape traffic to 128k only during times of congestion, would creating a class-map to match any traffic and applying it to a policy be sufficient?
The 'only during congestion' defines a whole new criteria. The default shaping is to limit the traffic up to the amount specified. With that said, you can use shape peak to have a guaranteed throughput during congestion while having a higher throughput during non-congested times.
Rack1R1#sh policy-map NETPRO
Policy Map NETPRO
Peak Rate Traffic Shaping
CIR 128000 (bps) Max. Buffers Limit 1000 (Packets)
Rack1R1#sh policy-map int s0/1
Service-policy output: NETPRO
Class-map: class-default (match-any)
71 packets, 16511 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Target/Average Byte Sustain Excess Interval Increment
Rate Limit bits/int bits/int (ms) (bytes)
256000/128000 1984 7936 7936 62 1984
Adapt Queue Packets Bytes Packets Bytes Shaping
Active Depth Delayed Delayed Active
- 0 49 15983 0 0 no
I can shape down to 128kbps during congestion for all traffic while allow to send up to 256kbps during non-congested times.