traffic shaping

Created: Feb 26, 2020 13:19:27Latest reply: Feb 26, 2020 15:07:59 107 4 0 0
  Rewarded HiCoins: 0 (problem resolved)

 

Dears;


can some one explain to me how traffic shapping is achieved? what is the core behind traffic shaping?

  • x
  • convention:

Featured Answers

Recommended answer

Popeye_Wang
Admin Created Feb 26, 2020 13:34:15 Helpful(0) Helpful(0)

Hi,

I think the key to traffic shaping is to control the size of the token bucket and the rate of adding tokens.

  • If there are sufficient tokens in the bucket, the device sends packets directly and the number of tokens decreases.

  • If there are insufficient tokens in the bucket, the device places packets into the buffer queue. If the buffer queue is full, packets are discarded.

traffic sharping

For details about the principles, see https://support.huawei.com/hedex/hdx.do?docid=EDOC1100007335&id=dc_fd_qos_0104_1&lang=en


  • x
  • convention:

All Answers
Popeye_Wang
Popeye_Wang Admin Created Feb 26, 2020 13:34:15 Helpful(0) Helpful(0)

Hi,

I think the key to traffic shaping is to control the size of the token bucket and the rate of adding tokens.

  • If there are sufficient tokens in the bucket, the device sends packets directly and the number of tokens decreases.

  • If there are insufficient tokens in the bucket, the device places packets into the buffer queue. If the buffer queue is full, packets are discarded.

traffic sharping

For details about the principles, see https://support.huawei.com/hedex/hdx.do?docid=EDOC1100007335&id=dc_fd_qos_0104_1&lang=en


  • x
  • convention:

HaseebAkhtar
HaseebAkhtar Created Feb 26, 2020 14:57:01 Helpful(1) Helpful(1)

So for the readers, here is what the HEDex says about your question, 


What Is Traffic Shaping

Traffic shaping controls the rate of outgoing packets to allow the traffic rate to match that on the downstream device. When traffic is transmitted from a high-speed link to a low-speed link or a traffic burst occurs, the inbound interface of the low-speed link is prone to severe data loss. To prevent this problem, traffic shaping must be configured on the outbound interface of the device connecting to the low-speed link, as shown in Figure 7-11.

Figure 7-11  Data transmission from the high-speed link to the low-speed link
imgDownload?uuid=d4dfb6762ad84fb6aea434d

As shown in Figure below traffic shaping can be configured on the outbound interface of an upstream device to make irregular traffic transmitted at an even rate, preventing traffic congestion on the downstream device.


imgDownload?uuid=f33ca54e4c07435c971985c

Traffic Shaping Implementation

Traffic shaping buffers overspeed packets and uses token buckets to transmit these packets afterward at an even rate.

On router, tokens are added at an interval, which is calculated in the format of CBS/CIR, with the quantity equal to the CBS for traffic shaping.


Traffic shaping is implemented for packets that have been implemented with queue scheduling and are leaving the queues. For details about queues and queue scheduling, see Congestion Management and Avoidance.

There are two traffic shaping modes: queue-based traffic shaping and interface-based traffic shaping.

  • Queue-based traffic shaping applies to each queue on an outbound interface.

    • When packets have been implemented with queue scheduling and are leaving queues, the packets that do not need traffic shaping are forwarded; the packets that need traffic shaping are measured against token buckets.

    • After queues are measured against token buckets, if packets in a queue are transmitted at a rate conforming to the specifications, the packets in the queue are marked green and forwarded. If packets in a queue are transmitted at a rate exceeding the specifications, the packet that is leaving the queue is forwarded, but the queue is marked unscheduled and can be scheduled after new tokens are added to the token bucket. After the queue is marked unscheduled, more packets can be put into the queue, but excess packets over the queue capacity are dropped. Therefore, traffic shaping allows traffic to be sent at an even rate but does not provide a zero-packet-loss guarantee.

    • Figure 7-13  Queue-based traffic shaping
      imgDownload?uuid=8c7cfaf9c37e4d16b30aca6

Assume that the CIR is set to 1 Mbit/s and PBS to 2000 bytes for traffic shaping for a queue, bucket C is initially full of tokens (to be specific, the depth of bucket C is 2000 bytes), and the number of tokens that are placed in the token bucket per millisecond is 125 bytes, which is calculated using the formula of 1 Mbit/s x 1 ms = 1000 bits = 125 bytes.

  • If the first packet arriving at the interface is 1500 bytes long, the packet is marked green because the number of tokens in bucket C is greater than the packet length. The number of tokens in bucket C then decreases by 1500 bytes, with 500 bytes remaining.

  • Assume that the second packet of 1500 bytes arrives at the interface 1 ms later. At this time, 125-byte tokens have been added to bucket C, and bucket C has a total of 625-byte tokens (with the remaining 500-byte tokens being included). As the number of tokens in the token bucket is greater than 0, the system forwards the packet, and the number of remaining tokens in the token bucket is -875 bytes (625 bytes - 1500 bytes). As the number of tokens in the token bucket becomes a minus, the system does not forward the packet.

  • 1 ms later, the third packet of 1000 bytes arrives at the interface. At this time, the number of remaining tokens in bucket C is still a minus (-875 bytes + 125 bytes = -750 bytes). Therefore, the system does not forward packets.

  • 6 ms later, the fourth packet of 1500 bytes arrives at the interface. At this time, the number of tokens in bucket C is 0 (-750 bytes + 125 bytes x 6 = 0). Therefore, the system does not forward packets.

  • 1 ms later, the fifth packet of 1500 bytes arrives at the interface. At this time, bucket C has 125-byte tokens. Therefore, the system forwards the third packet. After that, the number of tokens in the token bucket becomes a minus again (125 bytes - 1500 bytes = -1375 bytes). Therefore, the system does not forward packets.

Interface-based traffic shaping, also called line rate (LR), is used to restrict the rate at which all packets (including burst packets) are transmitted. Interface-based traffic shaping takes effect on the entire outbound interface, regardless of packet priorities. Figure 7-14 shows how interface-based traffic shaping is implemented:

  • When packets have been implemented with queue scheduling and are leaving queues, all queues are measured together against token buckets.

  • After queues are measured against token buckets, if the packets total-rate conforming to the specifications, the queue is forwarded. If the packet rate on an interface exceeds the specification, the interface stops packet scheduling and will resume scheduling when tokens are enough.

Figure 7-14  Interface-based traffic shaping
imgDownload?uuid=0768303dd6544800a2ff618



  • x
  • convention:

lubna
lubna Created Feb 26, 2020 15:04:54 Helpful(0) Helpful(0)

hello dear
Traffic shaping (also known as packet shaping) is bandwidth management technique that delays the flow of certain types of network packets in order to ensure network performance for higher priority applications.
  • x
  • convention:

i%20am%20student%20%20and%20i%20am%20doing%20BSIT%20from%20international%20Islamic%20university%20in%20islamabad
lubna
lubna Created Feb 26, 2020 15:07:59 Helpful(0) Helpful(0)

hello dear hope it will help you

Traffic shaping

From Wikipedia, the free encyclopedia
Jump to navigationJump to search
Traffic shaping is a bandwidth management technique used on computer networks which delays some or all datagrams to bring them into compliance with a desired traffic profile.[1][2] Traffic shaping is used to optimize or guarantee performance, improve latency, or increase usable bandwidth for some kinds of packets by delaying other kinds. It is often confused with traffic policing, the distinct but related practice of packet dropping and packet marking.[3]

The most common type of traffic shaping is application-based traffic shaping.[4][failed verification] 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 of peer-to-peer file sharing traffic. Many application protocols use encryption 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.[5]

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), or the maximum rate at which the traffic is sent (rate limiting), or more complex criteria such as generic cell rate algorithm. 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[6]) 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 a policer.

Shaping is widely used for network traffic engineering, and appears in domestic ISPs' networks as one of several Internet Traffic Management Practices (ITMPs).[7] Some ISPs may use traffic shaping to limit resources consumed by peer-to-peer file-sharing networks, such as BitTorrent.[8]

Data centers 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.[9]

Audio Video Bridging 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. 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 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).

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 and which results in traffic policing as well as shaping. A more sophisticated implementation could apply a dropping algorithm such as random early detection.

Traffic classification
Simple traffic shaping schemes shape all traffic uniformly. More sophisticated shapers first classify traffic. Traffic classification categorises traffic (for example, based on port number or protocol). 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.[10] Self-limiting sources shape the traffic they generate to a greater or lesser degree. Congestion control mechanisms can also affect traffic shaping of sorts - for example TCP's window mechanism implements a variable rate constraint related to bandwidth-delay product.

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 flows. Such flows interfere only minimally with foreground (non-nice) flows, while reaping a large fraction of spare network bandwidth.[11]

Relationship to bandwidth management
Traffic shaping is a specific technique and one of several which combined constitute bandwidth management.[12]

ISPs and traffic management
See also: Bandwidth throttling, Teletraffic engineering, and Traffic management
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 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.[13]

  • x
  • convention:

i%20am%20student%20%20and%20i%20am%20doing%20BSIT%20from%20international%20Islamic%20university%20in%20islamabad

Comment

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!

My Followers

Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login