You have 3 free guides left 😟
Unlock your guides
You have 3 free guides left 😟
Unlock your guides

19.3 Traffic Shaping and Policing

2 min readjuly 22, 2024

and policing are crucial techniques for managing network bandwidth and enforcing policies. These methods help prevent congestion, ensure fair allocation of resources, and prioritize critical traffic in computer networks.

Traffic shaping smooths out data flow using the , while policing enforces strict limits with the . Both techniques play vital roles in optimizing network performance and maintaining service quality for different types of traffic.

Traffic Shaping and Policing

Traffic shaping vs policing techniques

Top images from around the web for Traffic shaping vs policing techniques
Top images from around the web for Traffic shaping vs policing techniques
  • Traffic shaping smooths out traffic by packets and delaying them to conform to a desired traffic profile (token bucket algorithm)
    • Enforces a maximum rate while allowing bursts up to a certain limit ()
    • Introduces additional delay but avoids
  • enforces strict limits on traffic rates by dropping or marking packets that exceed the specified rate ( algorithm)
    • Does not introduce additional delay
    • Can result in packet drops if traffic exceeds the limit

Token bucket algorithm for shaping

  • Uses tokens to represent the allowed amount of traffic
    • Tokens are generated at a fixed rate and added to the bucket ()
    • The bucket has a maximum capacity that determines the burst size allowed
  • Packets can only be transmitted if there are enough tokens in the bucket
    • If the bucket is full, newly generated tokens are discarded
  • Enforces a long-term average transmission rate while allowing short-term bursts
    • Token generation rate determines the average traffic rate ()
    • Bucket size determines the maximum burst size allowed ()

Leaky bucket algorithm for policing

  • Enforces a strict limit on the traffic rate to ensure conformance to a specified rate and burst size
  • Packets are placed into a buffer (bucket) of fixed size
    • The bucket leaks packets at a constant rate ()
    • If the bucket is full, incoming packets are dropped or marked
  • The leak rate determines the allowed
  • The bucket size determines the maximum burst size allowed
    • Larger bucket size allows for more bursty traffic

Applications of shaping and policing

  • Managing network bandwidth to prevent congestion and ensure fair allocation
    • Use traffic shaping to smooth out traffic and prevent sudden bursts (video streaming)
    • Apply traffic policing to enforce strict bandwidth limits (VoIP calls)
    • Combine shaping and policing to achieve desired bandwidth allocation (enterprise networks)
  • Enforcing Quality of Service (QoS) policies to prioritize critical traffic
    1. Classify traffic into different classes based on QoS requirements (real-time, best-effort)
    2. Apply appropriate shaping or policing parameters to each class
    3. Prioritize critical traffic classes to ensure their performance ()
    4. Use marking techniques to identify and handle traffic classes differently (DiffServ)
© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.


© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.

© 2024 Fiveable Inc. All rights reserved.
AP® and SAT® are trademarks registered by the College Board, which is not affiliated with, and does not endorse this website.
Glossary
Glossary