1 / 19

Introduction to Traffic Shaping

Introduction to Traffic Shaping. Traffic Regulation. Traffic regulation ( or traffic conditioning) refers to mechanisms to enforce that traffic from a flow or a group of flows adheres to a given specification Policing Drop traffic that violates the specification Shaping

bischoff
Download Presentation

Introduction to Traffic Shaping

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Traffic Shaping ECE 1545

  2. Traffic Regulation • Traffic regulation (or traffic conditioning) refers to mechanisms to enforce that traffic from a flow or a group of flows adheres to a given specification • Policing Drop traffic that violates the specification • Shaping Buffer traffic at network entrance that violates specification • Marking Mark packets with a lower priority, if traffic specification is violated

  3. Traffic Regulation • Traffic regulation can be used to … • … reduce the burstiness of a flow (output is smoother than input) • … enforce a limit on the amount of traffic that be sent by a flow Traffic Regulator Traffic • Traffic regulation is typically done at the network edge

  4. Traffic Specification Burst size: Max. amount of data that can be sent at any timeRate: long-term average rate Traffic Rate r Burst sizeb Time interval

  5. Traffic Specification Burst size: Max. amount of data that can be sent at any timeRate: long-term average rate Peak rate: short-term maximum rate Traffic Rate r Burst sizeb Peak rate P Time interval

  6. Traffic Specification Average rate r Burst sizeb Peak rate P Time interval

  7. Token Bucket Token Bucket is a traffic regulation mechanism that enforces a maximum burst size b and a maximum average rate of r • Tokens are added at rate r up to a maximum size of b

  8. Token Bucket • Assume: Packet can depart if enough tokens are available. • Tokens are removed tokens when packet departs (Here: 10 tokens are needed)

  9. Token Bucket • Assume: Packet removes 10 tokens from buffer • (Number of tokens is associated with packet size)

  10. Token Bucket • Packet must wait until enough tokens are available

  11. Token Bucket (fluid flow version) b • For an analysis it is convenient to work with a fluid flow version of the token bucket (Traffic can depart in arbitrarily small chunks)

  12. TB = b = 2r = 1

  13. TB = b = 2r = 1 A+TB-B

  14. Dual Token Bucket A Dual Token Bucket additionally enforces a peak rate P • To depart, a packet must draw tokens from both buckets

  15. Implementation

  16. Implementation in Assignment 1 TokenBucket

  17. Token Bucket in Assignment 1 TokenBucketReceiver (BR) TokenBucketSender (BS) If (buffer_is_not_empty) if (enough_tokens) consume tokens; sendingInProgress = true; remove packet from buffer; send packet; sendingInProgress = false; else get expected time when there will be enough tokens; sleep for this time; else wait for packet to arrive to buffer; if (buffer_is_empty && not(sendingInProgress) &&enough_tokens_available) consume tokens; send packet; else add packet to buffer;

  18. Alternative implementation for Token Bucket Idea: instead of counting tokens (and compute timestamps from tokens), work directly with timestamps VC : release time of packet (init: VC = 0) l : packet size now : current timeTDTp: Target departure time of packet p b TokenBucketReceiver (BR) TokenBucketSender (BS) If (buffer_is_not_empty) if (TDThead_of_buffer ≤ now) sendingInProgress = true; remove packet from buffer; send packet; sendingInProgress = false; else sleep for now - TDThead_of_buffer ; else wait for packet to arrive to buffer; VC = max {VC, now} + l/r; if ( buffer_is_empty && not(sendingInProgress) && VC - b/r ≤ now ) send packet; else Set TDTp = VC - b/r; add packet to buffer;

  19. Peak Rate Constrained Token Bucket • Adds a constraint on the maximum (“peak”) rate of traffic: • Is implemented with 2 token buckets in series. Traffic Slope r b Slope P Time interval

More Related