Rate Shaping
   HOME

TheInfoList



OR:

Traffic shaping is a
bandwidth management Bandwidth management is the process of measuring and controlling the communications (traffic, packets) on a network link, to avoid filling the link to capacity or overfilling the link,https://www.internetsociety.org/wp-content/uploads/2017/08/BWro ...
technique used on
computer networks A computer network is a collection of communicating computers and other devices, such as printers and smart phones. In order to communicate, the computers and devices must be connected by wired media like copper cables, optical fibers, or ...
which delays some or all
datagram A datagram is a basic transfer unit associated with a packet-switched network. Datagrams are typically structured in header and payload sections. Datagrams provide a connectionless communication service across a packet-switched network. The de ...
s to bring them into compliance with a desired ''traffic profile''. Traffic shaping is used to optimize or guarantee performance, improve latency, or increase usable
bandwidth Bandwidth commonly refers to: * Bandwidth (signal processing) or ''analog bandwidth'', ''frequency bandwidth'', or ''radio bandwidth'', a measure of the width of a frequency range * Bandwidth (computing), the rate of data transfer, bit rate or thr ...
for some kinds of packets by delaying other kinds. It is often confused with
traffic policing Traffic police (also known as traffic officers, traffic enforcement units, traffic cops, traffic monitors, or traffic enforcers) are units and agencies who enforce traffic laws and manage traffic. Traffic police help to assist in patrolling ...
, the distinct but related practice of
packet dropping Packet loss occurs when one or more packets of data travelling across a computer network fail to reach their destination. Packet loss is either caused by errors in data transmission, typically across wireless networks, or network congestion.Kur ...
and packet marking. The most common type of traffic shaping is application-based traffic shaping. In application-based traffic shaping, fingerprinting tools are first used to identify applications of interest, which are then subject to shaping policies. Some controversial cases of application-based traffic shaping include
bandwidth throttling Bandwidth throttling consists in the limitation of the communication speed (bytes or kilobytes per second), of the ingoing (received) or outgoing (sent) data in a network node or in a network device such as computers and mobile phones. The d ...
of
peer-to-peer file sharing Peer-to-peer file sharing is the distribution and sharing of digital media using peer-to-peer (P2P) networking technology. P2P file sharing allows users to access media files such as books, music, movies, and games using a P2P software program th ...
traffic. Many application protocols use
encryption In Cryptography law, cryptography, encryption (more specifically, Code, encoding) is the process of transforming information in a way that, ideally, only authorized parties can decode. This process converts the original representation of the inf ...
to circumvent application-based traffic shaping. Another type of traffic shaping is route-based traffic shaping. Route-based traffic shaping is conducted based on previous- hop or next-hop information.


Functionality

If a link becomes utilized to the point where there is a significant level of congestion, latency can rise substantially. Traffic shaping can be used to prevent this from occurring and keep latency in check. Traffic shaping provides a means to control the volume of traffic being sent into a network in a specified period (
bandwidth throttling Bandwidth throttling consists in the limitation of the communication speed (bytes or kilobytes per second), of the ingoing (received) or outgoing (sent) data in a network node or in a network device such as computers and mobile phones. The d ...
), or the maximum rate at which the traffic is sent (
rate limiting In computer networks, rate limiting is used to control the rate of requests sent or received by a network interface controller. It can be used to prevent DoS attacks and limit web scraping. Research indicates flooding rates for one zombie machin ...
), or more complex criteria such as
generic cell rate algorithm The generic cell rate algorithm (GCRA) is a leaky bucket-type scheduling algorithm for the network scheduler that is used in Asynchronous Transfer Mode (ATM) networks. It is used to measure the timing of cells on virtual channels (VCs) and or Virt ...
. This control can be accomplished in many ways and for many reasons; however traffic shaping is always achieved by delaying packets. Traffic shaping is commonly applied at the network edges to control traffic entering the network, but can also be applied by the traffic source (for example, computer or
network card A network interface controller (NIC, also known as a network interface card, network adapter, LAN adapter and physical network interface) is a computer hardware component that connects a computer to a computer network. Early network interface ...
) or by an element in the network.


Uses

Traffic shaping is sometimes applied by traffic sources to ensure the traffic they send complies with a contract which may be enforced in the network by
traffic policing Traffic police (also known as traffic officers, traffic enforcement units, traffic cops, traffic monitors, or traffic enforcers) are units and agencies who enforce traffic laws and manage traffic. Traffic police help to assist in patrolling ...
. Shaping is widely used for
teletraffic engineering Teletraffic engineering, or telecommunications traffic engineering is the application of transportation traffic engineering theory to telecommunications. Teletraffic engineers use their knowledge of statistics including queuing theory, the natu ...
, and appears in domestic ISPs' networks as one of several Internet Traffic Management Practices (ITMPs). Some
ISP An Internet service provider (ISP) is an organization that provides a myriad of services related to accessing, using, managing, or participating in the Internet. ISPs can be organized in various forms, such as commercial, community-owned, non ...
s may use traffic shaping to limit resources consumed by peer-to-peer file-sharing networks, such as
BitTorrent BitTorrent is a Protocol (computing), communication protocol for peer-to-peer file sharing (P2P), which enables users to distribute data and electronic files over the Internet in a Decentralised system, decentralized manner. The protocol is d ...
.
Data center A data center is a building, a dedicated space within a building, or a group of buildings used to house computer systems and associated components, such as telecommunications and storage systems. Since IT operations are crucial for busines ...
s use traffic shaping to maintain service level agreements for the variety of applications and the many tenants hosted as they all share the same physical network.M. Noormohammadpour, C. S. Raghavendra
"Datacenter Traffic Control: Understanding Techniques and Trade-offs,"
IEEE Communications Surveys & Tutorials, vol. PP, no. 99, pp. 1-1.
Audio Video Bridging Audio Video Bridging (AVB) is a common name for a set of technical standards that provide improved synchronization, low latency, and reliability for switched Ethernet networks. AVB embodies the following technologies and standards: * IEEE 802 ...
includes an integral traffic-shaping provision defined in IEEE 802.1Qav. Nodes in an IP network which buffer packets before sending on a link which is at capacity produce an unintended traffic shaping effect. This can appear across, for example, a low bandwidth link, a particularly expensive WAN link or satellite hop.


Implementation

A traffic shaper works by delaying metered traffic such that each packet complies with the relevant
traffic contract If a network service (or application) wishes to use a broadband network (an ATM network in particular) to transport a particular kind of traffic, it must first inform the network about what kind of traffic is to be transported, and the performan ...
. Metering may be implemented with, for example, the
leaky bucket The leaky bucket is an algorithm based on an analogy of how a bucket with a constant leak will overflow if either the average rate at which water is poured in exceeds the rate at which the bucket leaks or if more water than the capacity of th ...
or
token bucket The token bucket is an algorithm used in packet-switched and telecommunications networks. It can be used to check that data transmissions, in the form of packets, conform to defined limits on bandwidth and burstiness (a measure of the unevenne ...
algorithms (the former typically in ATM and the latter in IP networks). Metered packets or cells are then stored in a FIFO buffer, one for each separately shaped class, until they can be transmitted in compliance with the associated traffic contract. Transmission 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
packet loss Packet loss occurs when one or more packets of data travelling across a computer network fail to reach their destination. Packet loss is either caused by errors in data transmission, typically across wireless networks, or network congestion.Ku ...
).


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 a strategy known as
tail drop Tail drop is a simple queue management algorithm used by network schedulers in network equipment to decide when to drop packets. With tail drop, when the queue is filled to its maximum capacity, the newly arriving packets are dropped until the qu ...
and which results in traffic policing as well as shaping. A more sophisticated implementation could apply a dropping algorithm such as
random early detection Random early detection (RED), also known as random early discard or random early drop, is a queuing discipline for a network scheduler suited for congestion avoidance. In the conventional tail drop algorithm, a router or other network componen ...
.


Traffic classification

Simple traffic shaping schemes shape all traffic uniformly. More sophisticated shapers first
classify Classification is the activity of assigning objects to some pre-existing classes or categories. This is distinct from the task of establishing the classes themselves (for example through cluster analysis). Examples include diagnostic tests, identif ...
traffic. ''Traffic classification'' categorises traffic (for example, based on
port number In computer networking, a port is a communication endpoint. At the software level within an operating system, a port is a logical construct that identifies a specific process or a type of network service. A port is uniquely identified by a numbe ...
or
protocol Protocol may refer to: Sociology and politics * Protocol (politics) Protocol originally (in Late Middle English, c. 15th century) meant the minutes or logbook taken at a meeting, upon which an agreement was based. The term now commonly refers to ...
). Different ''classes'' can then be shaped separately to achieve a desired effect.


Self-limiting sources

A ''self-limiting source'' produces traffic which never exceeds some upper bound, for example media sources which cannot transmit faster than their encoded rate allows. Self-limiting sources shape the traffic they generate to a greater or lesser degree.
Congestion control Network congestion in data networking and queueing theory is the reduced quality of service that occurs when a network node or link is carrying more data than it can handle. Typical effects include queueing delay, packet loss or the blocking of ...
mechanisms can also affect traffic shaping of sorts - for example TCP's window mechanism implements a variable rate constraint related to
bandwidth-delay product In data communications, the bandwidth-delay product is the product of a data link's capacity (in bits per second) and its round-trip delay time (in seconds). The result, an amount of data measured in bits (or bytes), is equivalent to the maximu ...
. TCP Nice, a modified version of TCP developed by researchers at the University of Texas at Austin, allows applications to request that certain TCP connections be managed by the operating system as near zero-cost background transfers, or ''
nice Nice ( ; ) is a city in and the prefecture of the Alpes-Maritimes department in France. The Nice agglomeration extends far beyond the administrative city limits, with a population of nearly one millionbandwidth management Bandwidth management is the process of measuring and controlling the communications (traffic, packets) on a network link, to avoid filling the link to capacity or overfilling the link,https://www.internetsociety.org/wp-content/uploads/2017/08/BWro ...
.


ISPs and traffic management

Traffic shaping is of interest especially to
internet service provider An Internet service provider (ISP) is an organization that provides a myriad of services related to accessing, using, managing, or participating in the Internet. ISPs can be organized in various forms, such as commercial, community-owned, no ...
s (ISPs). Their high-cost, high-traffic networks are their major assets, and as such, are the focus of their attentions. They sometimes use traffic shaping to optimize the use of their network, sometimes by shaping traffic according to their assessment of importance and thus discouraging use of certain applications.


Enterprises

Most companies with remote offices are now connected via a
wide area network A wide area network (WAN) is a telecommunications network that extends over a large geographic area. Wide area networks are often established with leased telecommunication circuits. Businesses, as well as schools and government entities, use ...
(WAN). Applications tend to be centrally hosted at the head office and remote offices are expected to pull data from central
database In computing, a database is an organized collection of data or a type of data store based on the use of a database management system (DBMS), the software that interacts with end users, applications, and the database itself to capture and a ...
s and
server farm A server farm or server cluster is a collection of Server (computing), computer servers, usually maintained by an organization to supply server functionality far beyond the capability of a single machine. They often consist of thousands of compu ...
s. 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 other traffic. Traffic shaping is thus a good means for companies to avoid purchasing additional bandwidth while properly managing these resources. Alternatives to traffic shaping in this regard are application acceleration and
WAN optimization WAN optimization is a collection of techniques for improving data transfer across wide area networks (WANs). In 2008, the WAN optimization market was estimated to be $1 billion, and was to grow to $4.4 billion by 2014 according to Gartner, a techn ...
and compression, which are fundamentally different from traffic shaping. Traffic shaping defines bandwidth rules whereas application acceleration using multiple techniques like a TCP performance-enhancing proxy. WAN optimization, on the other hand, compresses data streams or sends only differences in file updates. The latter is quite effective for chatty protocols like
CIFS Server Message Block (SMB) is a communication protocol used to share files, printers, serial ports, and miscellaneous communications between nodes on a network. On Microsoft Windows, the SMB implementation consists of two vaguely named Windows ...
.


Traffic shaping detection

There are several methods to detect and measure traffic shaping. Tools have been developed to assist with detection.Glasnost
(Retired)


See also

*
Network congestion avoidance Network congestion in data networking and queueing theory is the reduced quality of service that occurs when a network node or link is carrying more data than it can handle. Typical effects include queueing delay, packet loss or the blocking of ...
*
Quality of service Quality of service (QoS) is the description or measurement of the overall performance of a service, such as a telephony or computer network, or a cloud computing service, particularly the performance seen by the users of the network. To quantitat ...
*
Multilayer switch A multilayer switch (MLS) is a computer networking device that switches on OSI layer 2 like an ordinary network switch and provides extra functions on higher OSI layers. The MLS was invented by engineers at Digital Equipment Corporation. Swit ...
*
TCP pacing In the field of computer networking, TCP pacing is the denomination of a set of techniques to make the pattern of packet transmission generated by the Transmission Control Protocol less bursty. Where there could be insufficient buffers in switches a ...
*
Broadband networks In telecommunications, broadband or high speed is the wide- bandwidth data transmission that exploits signals at a wide spread of frequencies or several different simultaneous frequencies, and is used in fast Internet access. The transmission m ...
*
Net neutrality Net neutrality, sometimes referred to as network neutrality, is the principle that Internet service providers (ISPs) must treat all Internet communications equally, offering User (computing), users and online content providers consistent tra ...
*
Tc (Linux) tc (traffic control) is the user-space system administration utility program used to configure the Linux kernel packet scheduler. Tc is usually packaged as part of the iproute2 package. Syntax tc filter add dev pppoe-dsl parent 1: prio 1 ...
command used to manage traffic shaping


References

*


External links


BBC News - Traffic Shaping and BitTorrent

IT-world.com, Traffic Shaping
article comparing traffic management techniques circa 2001




Linux Kernel: Traffic Control, Shaping and QoS

A Practical Guide to Linux Traffic Control

Web based traffic shaping bridge/router


(German work about
DynShaper-Software
used a

(student network at
Chemnitz University of Technology Chemnitz University of Technology () is a public university in Chemnitz, Germany. With around 8,300 students, it is the third largest university in Saxony. It was founded in 1836 as ''Königliche Gewerbschule'' (Royal Mercantile College) and ...
)
Manuals
{{DEFAULTSORT:Traffic Shaping Network performance Network scheduling algorithms Teletraffic