traffic shaping

What is traffic shaping?

Traffic shaping, also known as 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 can control traffic flow with the following methods:

  • Data transfer throttling is the regulation of packet flow into a network.
  • Rate limiting is the regulation of packet flow out of a network.

Network professionals use traffic shaping to optimize network performance by prioritizing certain traffic flows to ensure the traffic rate doesn't exceed the bandwidth limit. In addition to bandwidth, three major factors affect the quality of a network: latency, jitter and loss.

Traffic shaping attempts to prevent delay, jitter and loss by controlling the burst size and uses a leaky bucket algorithm to smooth the output rate over at least eight time intervals. If traffic arrives slower than the configured rate, it will forward normally. If traffic arrives faster than the configured rate, it will hold in a buffer until it can travel without going over the limit.

What is traffic shaping used for?

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

Common uses of traffic shaping include the following:

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

Importance of traffic shaping

Traffic shaping is important when network uplinks become congested with data traveling out of an interface. Without traffic shaping, networks can drop or queue any excess traffic that can't travel out of an interface, and this can cause delays in all packets or result in poor performance of mission-critical applications.

Traffic shaping enables network administrators to specify which applications are less important and, therefore, creates intelligence around which packets will drop or delay first. Overall, traffic shaping is an important traffic management technique to ensure high network performance.

Traffic shaping methods

Traffic shaping can only occur on packets leaving interface as opposed to those coming into the interface. The network device can use several different methods to identify to which application an IP packet exiting an interface belongs. Based on this information, the interface can drop or hold these specific packets inside a temporary queue until a certain bandwidth limit has been reached.

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

Traffic shaping methods include the following:

  • Generic traffic shaping (GTS). This method supports traffic shaping of most media and encapsulation data types on a router. GTS will do the following:
    • perform traffic shaping on a per-interface basis and use access control lists to choose what traffic to shape;
    • dynamically adapt to the available bandwidth by integrating shapes and backward explicit congestion notifications at a defined rate; and
    • respond to Resource Reservation Protocol features that signal over statically configured asynchronous transfer mode permanent virtual circuits.
  • Frame relay traffic shaping (FRTS). Similar to GTS, FRTS eliminates bottlenecks occurring in frame relay networks with high-speed connections at the central site and low speeds at the branch sites.
  • Class-based traffic shaping. This method enables users to configure traffic shaping on a per-traffic class basis, meaning network professionals can specify the shaping to 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. This supports more data than the configured rate to travel across the network if bandwidth is available.

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

Traffic shaping vs. traffic policing

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

On the other hand, network professionals can configure traffic policing for traffic that exits and enters an interface. Policing will simply drop packets as opposed to storing them in a temporary queue, so policing is less efficient in most cases.

Traffic shaping and net neutrality

Traffic shaping is a frequent topic of debate between advocates of net neutrality and proponents of a two-tiered system. Advocates of net neutrality argue that users should treat internet data packets impartially, without regard to their content, destination or source. They also argue that it's difficult to delay some types of traffic without unintentionally hampering others.

On the other hand, 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.

Editor's note: This article was republished in November 2022 to improve the reader experience.

This was last updated in November 2022

Continue Reading About traffic shaping

Dig Deeper on Cloud and data center networking

Unified Communications
Mobile Computing
Data Center