The shape average and shape peak commands configure average and peak shaping, respectively. The Bc and Be value in bits can be explicitly configured, or Cisco IOS software can automatically calculate their optimal value. It is not recommended that you configure the Bc and Be in order to let the Cisco IOS algorithm determine the best Bc and Be value to use. Class-based traffic shaping uses a single token bucket with a maximum token bucket size of Bc + Be.
The shape percent command is often used in conjunction with the bandwidth and priority commands. The bandwidth and priority commands can be used to calculate the total amount of bandwidth available on an entity (for example, a physical interface). When the bandwidth and priority commands calculate the total amount of bandwidth available on an entity, the total bandwidth is the bandwidth on the physical interface.
The shape max-buffers command (not shown) specifies the maximum size of the shaping queue. The shaping queue will queue excess packets until the packets conform to the shaping rate. If the shaping queue is full, packets are tail-dropped. The default max-buffer size is 1000 packets and is usually not changed.
Example: Average Rate, Peak Rate
The figure shows an example configuration for standalone class-based shaping (no CBWFQ).
Citrix traffic is classified into the Shape class.
The Shape class is then shaped to different rates on two interfaces:
■ On the Serial 0/0 interface, traffic is shaped to the average rate. The Bc and Be values are not configured, allowing Cisco IOS software to automatically calculate their optimal values.
The Citrix traffic is shaped to the average rate of 16,000 bps. The resulting automatically determined Be and Bc values will both be 8000 bits with a Tc of 500 ms.
■ On the Serial 0/1 interface, the Citrix traffic is shaped to the peak rate. Because the Be and Bc are not specified, Cisco IOS software automatically calculates the optimal value for Tc, Bc, and Be. The shape statement is shape peak 16000. The resulting automatically determined Be and Bc values will each be 8000 bits with a Tc of 500 ms. Therefore, the peak rate will be as follows:
peak rate = ave rate * (1 + Be / Bc) = 16000 * (1 + 8000 /
Showing the policy map on the interface will display the average rate, peak rate, Bc, Be, and Tc values:
router#show policy-map interface s0/1 Serial0/0
Service-policy output: ShapePeak
Class-map: Shape (match-all) 0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps Match: protocol citrix Traffic Shaping
Target/Average Byte Sustain Excess Rate Limit bits/int bits/int
32000/16000 2000 8000 8000
Interval Increment (ms) (bytes)
Adapt Queue Active Depth - 0
Packets Delayed 0
Bytes Delayed 0
Class-map: class-defaul 0 packets, 0 bytes 5 minute offered rate Match: any
0 bps, drop rate 0 bps
Was this article helpful?