Definition

What is traffic shaping (packet shaping)?

Traffic shaping, or packet shaping, is a congestion management method that regulates network data transfer by delaying the flow of less important or less desired packets. Network professionals use traffic shaping to optimize network performance by prioritizing specific traffic flows to ensure the traffic rate doesn't exceed the bandwidth limit.

Network professionals can control traffic flow with the following:

  • Bandwidth throttling. The regulation of packet flow into a network.
  • Rate limiting. The regulation of packet flow out of a network.

Besides bandwidth, three major factors affect network quality:

  1. Latency.
  2. Jitter.
  3. Loss.

Traffic shaping attempts to prevent those factors by controlling the burst size using a leaky bucket algorithm to smooth the output rate over at least eight time intervals. If traffic arrives slower than the configured rate, it is forwarded normally. If traffic arrives faster than the configured rate, it's held in a buffer until it can travel normally.

What's the purpose of traffic shaping?

Traffic shaping is a quality of service (QoS) technique configured on network interfaces to enable higher-priority traffic to flow at optimal levels at all times -- even when links become overused. Traffic shaping creates a bandwidth limit for less critical packets and lessens the possibility for more important packets to delay or drop as they leave the interface.

Common traffic shaping uses include the following:

  • Network professionals can prioritize time-sensitive data and business-related traffic over traffic that they can briefly delay with little to no effect on the network.
  • A large internet service provider (ISP) might shape traffic based on customer priority.
  • An ISP might limit maximum bandwidth consumption for specific applications to reduce costs and create the capacity to take on additional subscribers. This practice can limit a subscriber's unlimited connection. ISPs often impose it without notice.
  • Traffic shaping is an integral component of the proposed two-tiered internet. In this model, customers or services receive traffic priority for a premium charge.
8 ways to optimize network bandwidth consumption
Optimize network bandwidth consumption with these tips.

Importance of traffic shaping

Traffic shaping is an important traffic management technique to ensure high network performance. Without traffic shaping, networks drop or queue any excess traffic unable to travel out of an interface when network uplinks become congested. This causes delays in all packets and results in poor performance of mission-critical applications.

To remedy this problem, network administrators use traffic shaping to specify which applications are less critical. Traffic shaping creates intelligence around which packets drop or delay first.

Traffic shaping methods

Traffic shaping only occurs on packets leaving the interface rather than those entering it. The network device can use several methods to identify to which Internet Protocol packet an application exiting an interface belongs. Based on this information, the interface drops or holds these specific packets inside a temporary queue until it reaches a certain bandwidth limit.

Traffic shaping uses a leaky bucket algorithm to release the delayed packets for delivery. While this might increase latency, it's usually more efficient than dropping the packets.

Traffic shaping methods include the following.

Generic traffic shaping

Generic traffic shaping (GTS) is a method that supports traffic shaping of most media and encapsulation data types on a router. GTS performs the following:

  • Shapes traffic on a per-interface basis and uses access control lists to choose what traffic to shape.
  • Dynamically adapts to the available bandwidth by integrating shapes and backward explicit congestion notifications at a defined rate.
  • Responds to Resource Reservation Protocol features that signal permanent virtual circuits over statically configured asynchronous transfer mode.

Frame relay traffic shaping

Frame relay traffic shaping, also known as Modular QoS Command-Line Interface FRTS, is similar to GTS. FRTS eliminates bottlenecks in frame relay networks with high-speed connections at the central site and low speeds at the branch sites.

Class-based traffic shaping

Class-based traffic shaping enables users to configure traffic shaping on a per-traffic class basis. Network professionals can specify the shaping of one or more categories of data.

Class-based shaping also enables users to optimize the available bandwidth by specifying an average or peak rate for shaping. If bandwidth is available, this supports more data than the configured rate to travel across the network.

Class-based shaping also enables users to create a hierarchical policy map structure. Network professionals can place traffic shaping in a primary policy map and other QoS features in a secondary map.

Traffic shaping vs. traffic policing

Traffic shaping affects packets leaving an interface. The network temporarily stores packets deemed less necessary in a buffer queue and sends them out more slowly with a leaky bucket technique.

Meanwhile, network professionals can configure traffic policing for exiting and entering an interface. However, policing is less efficient in most cases. Policing drops packets instead of storing them in a temporary queue.

Traffic shaping and net neutrality

Traffic shaping is a frequently debated topic between net neutrality advocates and proponents of a two-tiered system. Net neutrality advocates argue that users should treat internet data packets impartially without regard to their content, destination or source. They also argue specific types of traffic are challenging to delay without unintentionally hampering others.

However, proponents of a two-tiered system argue that there have always been different levels of internet service, and a two-tiered system can enable more freedom of choice and promote internet-based commerce.

This was last updated in April 2025

Continue Reading About What is traffic shaping (packet shaping)?

Dig Deeper on Cloud and data center networking