About Traffic Shaping
Traffic shaping allows you to control the traffic going out an interface in order to match its flow to the speed of the remote target interface and to ensure that the traffic conforms to policies contracted for it. Traffic that is adhering to a particular profile can be shaped to meet downstream requirements, which eliminates bottlenecks in topologies with data-rate mismatches.
Traffic shaping regulates and smooths out the packet flow by imposing a maximum traffic rate for each port's egress queue. Packets that exceed the threshold are placed in the queue and are transmitted later. This process is similar to traffic policing; however, the packets are not dropped. Because packets are buffered, traffic shaping minimizes packet loss (based on the queue length), which provides a better traffic behavior for TCP traffic.
Using traffic shaping, you can control access to available bandwidth, ensure that traffic conforms to the policies established for it, and regulate the flow of traffic in order to avoid congestion that can occur when the egress traffic exceeds the access speed of its remote, target interface. For example, you can control access to the bandwidth when policy dictates that the rate of a given interface should not, on average, exceed a certain rate even though the access rate exceeds the speed.
The traffic shaping rate can be configured in kilobits per second (kbps) or packets per second (PPS) and is applied to unicast queues. Queue length thresholds are configured using weighted randam early detection (WRED) configuration.
Traffic shaping can be configured at the system level or the interface level. System level queuing policies can be overridden by interface queuing policies.