Jump to content

Traffic shaping

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 98.203.28.38 (talk) at 12:33, 21 December 2007 (→‎Companies With Products Employing Traffic Shaping). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


Traffic shaping (also known as "packet shaping") is an attempt to control computer network traffic in order to optimize or guarantee performance, low latency, and/or bandwidth by delaying packets.[1] Traffic shaping deals with concepts of classification, queue disciplines, enforcing policies, congestion management, quality of service (QoS), and fairness.

Summary

Traffic shaping provides a mechanism to control the volume of traffic being sent into a network (bandwidth throttling), and the rate at which the traffic is being sent (rate limiting). For this reason, traffic shaping schemes are commonly implemented at the network edges to control traffic entering the network. This control can be accomplished in many ways and for many reasons but traffic shaping always simply consists in delaying packets. Traffic policing is the related practice of packet dropping and packet marking. Traffic shaping can be applied by the traffic source (for example, computer or network card) or by an element in the network.

Implementation

A traffic shaper works by delaying metered traffic such that each packet complies with the relevant traffic contract. Metering may be implemented with for example the leaky bucket or token bucket algorithms (the former typically in ATM and the latter in IP networks). Metered packets or cells are then stored in a buffer until they can be transmitted in compliance with the prevailing traffic contract. This may occur immediately (if the traffic arriving at the shaper is already compliant), after some delay (waiting in the buffer until its scheduled release time) or never (in case of buffer overflow).

Overflow Condition

All traffic shaper implementations have a finite buffer, and must cope with the case where the buffer is full. A simple and common approach is to drop traffic arriving while the buffer is full (tail drop), thus resulting in traffic policing as well as shaping. A more sophisticated implementation could apply a dropping algorithm such as Random Early Discard; a crude alternative would be to allow overflowing traffic through unshaped.

Traffic Classification

Simple traffic shaping schemes shape all traffic uniformly by rate. More sophisticated shapers first classify traffic. Traffic classification categorises traffic (for example, based on port number or protocol number); each resulting traffic class can be treated differently to differentiate service. For example, each traffic class could be subject to a different rate limit, shaped separately and/or prioritised relative to other traffic classes. This differentiation can be used by a network operator to treat different types of application traffic differently (for example, prioritise voice over file sharing), and to offer premium services at a higher price point than basic ones[2].

Classification is achieved by various means. Matching bit patterns of data to those of known protocols is a simple, yet widely-used technique. An example to match the BitTorrent Protocol Handshaking phase would be a simple check to see if a packet began with character 19 which was then followed by the 19-byte string 'BitTorrent protocol'.[3] Upon classifying a traffic flow using a particular protocol, a policy can be applied to it and other flows to either guarantee a certain quality (as with VoIP or media streaming service[4]) or to provide best-effort delivery. This may be applied at the ingress point (the point at which traffic enters the network) with a granularity that allows the traffic-shaping control mechanism to separate traffic into individual flows and shape them differently [5].

Relationship to Traffic Management

Traffic shaping is a specific technique and one of several which combined comprise Traffic Management[6]. Current common usage, particularly in discussion of domestic Internet service provision, frequently confuses traffic shaping with traffic management and traffic policing, with classification policies and in general with any measure deliberately taken by an ISP which is detrimental to the user's IP traffic performance.

ISPs

Traffic shaping is of interest especially to Internet Service Providers (ISPs). Their high-cost, high-traffic networks are their major assets, and as such, are the focus of all their attentions. They often use traffic shaping as a method to optimize the use of their network, sometimes by intelligently shaping traffic according to importance, other times by discouraging uses of applications by harsh means.[citation needed]

Benefits

To ISPs, mere protocol identification (a large part of modern traffic shaping mechanisms) gives the intangible yet significant benefit of seeing what internet traffic is flowing through the network. From this they can see which subscribers are doing what on their network and can target services to the subscriber base they have attracted.

In addition, intelligent shaping schemes can guarantee a particular Quality of Service (often measured in jitter, packet loss, and latency) for an application or a user while still allowing other traffic to use all remaining bandwidth. This allows ISPs to offer Differentiated services and to upsell existing services to subscribers (such as offering minimum-latency computer gaming for an additional fee on top of basic internet).

Three Types of Traffic

ISPs handle three types of network traffic: Sensitive, Best-Effort, and Undesired.

Sensitive Traffic

Sensitive traffic is traffic the ISP has an expectation to deliver on time. This includes VoIP, online gaming, video conferencing, and web browsing. Shaping schemes are generally tailored in such a way that the Quality of Service of these selected uses is guaranteed, or at least prioritized over other classes of traffic. This can be accomplished by the absence of shaping, or by positive shaping (prioritizing over data).

Best-Effort Traffic

Best effort traffic is all other kinds of non-detrimental traffic. This is traffic that the ISP deems isn't sensitive to Quality of Service metrics (jitter, packet loss, latency). A typical example of the former would be peer-to-peer traffic, the latter: online gaming (though there are exceptions such as [1]). Shaping schemes are generally tailored so best-effort traffic gets the what is left after sensitive traffic.

Undesired Traffic

This category is generally limited to the delivery of spam and traffic created by worms, botnets, and other malicious attacks. In some countries (for example, China), this definition can expand to such traffic as non-local VoIP (Skype) or video streaming services, which are squelched to create a market for the 'in-house' services of the same type. Traffic management schemes usually involve identifying and blocking this traffic entirely, or severely hampering its operation. Rogers Communications in Canada has been accused of shaping and policing peer-to-peer traffic in violation of Canadian Radio-television and Telecommunications Commission (CRTC) regulations.[7]

Peer-To-Peer

Peer-to-peer (P2P) traffic is particularly troublesome for traffic shaping efforts for ISPs because it is designed to use any and all available bandwidth which impacts QoS-sensitive applications (like online gaming) that use comparatively small amounts of bandwidth. Also, P2P programs can suffer from download strategy inefficiencies, namely downloading files from any available peer, regardless of link cost.

This has given P2P a bad reputation with internet service providers trying to roll out quality-dependent services (such as VoIP). Some may even view P2P as an 'attack' on their networks.[citation needed]

However, P2P is often listed as the reason subscribers choose broadband internet.[citation needed] Recent figures show that the usage of one-fifth of the highest-usage subscribers must be added together to make up only close to 80% of P2P traffic on ISP networks. [2] Sandvine Incorporated has determined through traffic analysis that P2P traffic accounts for up to 60% of traffic on most networks.[8] This shows, in contrast to previous studies and forecasts, that P2P has become more mainstream than a handful of P2P users on the network.

These figures have influenced service providers to consider subscriber experience when implementing traffic shaping.[citation needed] If P2P is being used by more than the top fifth of an ISP's subscriber base, a harsh anti-P2P policy may have disastrous consequences on subscriber numbers, increasing the subscriber Churn rate. In some extreme cases (like that of Rogers Communications and ihaterogers.ca) this may damage the ISPs reputation permanently.

P2P protocols are designed specifically to avoid being identified and with enough robustness that it is agnostic to standard QoS metrics (out-of-order packets (jitter) just increase buffering, packet loss and latency just increase the download time) means that it is best classified as Best-Effort traffic. At peak times when sensitive traffic is at its height, download speeds will decrease. However, since P2P downloads are often background activities, it affects the subscriber experience little, so long as the download speeds increase to their full potential when all other subscribers hang up their VoIP phones. Exceptions are real-time P2P VoIP and P2P video streaming services who need permanent QoS and use excessive overhead and parity traffic to enforce this as far as possible. It has an extra negative effect on the network load.

Also from a user standpoint traffic shaping is not necessary for P2P, because most P2P programs allow the user to limit the traffic in both directions.

Enterprises

Traffic Shaping and Prioritization is becoming more and more common in the corporate market. Most companies with remote offices are now connected via a WAN (Wide Area Network). Applications tend to become centrally hosted at the head office and remote offices are expected to pull data from central databases and server farms. As applications become more hungry in terms of bandwidth and prices of dedicated circuits being relatively high in most areas of the world, instead of increasing the size of their WAN circuits, companies feel the need to properly manage their circuits to make sure business-oriented traffic gets priority over best-effort traffic. Traffic shaping is thus a good means for companies to avoid purchasing additional bandwidth while properly managing these resources.

Other upcoming technologies to this regards are Application Acceleration and WAN Optimization and Compression which are fundamentally different from Traffic Shaping. Traffic Shaping defines bandwidth rules (or partitions as some vendors call them) whereas Application Acceleration using multiple techniques like TCP Performance Enhancing Proxy. WAN Optimization and Compression (WOC) on the other hand would use compression and differential algorithms and techniques to compress data streams or send only differences in file updates. The latter is quite effective for chatty protocols like CIFS.

Uses

Traffic shaping is often used in combination with:

See also

Companies With Products Employing Traffic Shaping

Major Internet Service Providers Using Traffic Shaping

References

  1. ^ IETF RFC 2475 "An Architecture for Differentiated Services" section 2.3.3.3 - definition of "Shaper"
  2. ^ PlusNet's Traffic Classes show classification and prioritisation policies used to differentiate between more and less expensive Internet service
  3. ^ BitTorrent Protocol
  4. ^ SIN 450 Issue 1.2 May 2007 Suppliers' Information Note For The BT Network BT Wholesale - BT IPstream Advanced Services - End User Speed Control and Downstream Quality of Service - Service Description
  5. ^ Ferguson P., Huston G., Quality of Service: Delivering QoS on the Internet and in Corporate Networks, John Wiley & Sons, Inc., 1998. ISBN 0-471-24358-2.
  6. ^ ATM Forum Traffic Management Specification, Version 4.0 Approved Specification 0056.00, Section 5.5, Traffic Shaping
  7. ^ Geist, Michael. "The Unintended Consequences of Rogers' Packet Shaping".
  8. ^ Leydon, John. "P2P swamps broadband networks".
  • "Deploying IP and MPLS QoS for Multiservice Networks: Theory and Practice" by John Evans, Clarence Filsfils (Morgan Kaufmann, 2007, ISBN 0-12-370549-5)
  • "Peer-to-Peer File Sharing: The Impact of File Sharing on Service Provider Networks", Sandvine Incorporated, copyright 2002

External links