Traffic shaping smooths bursts by buffering excess and releasing at a controlled rate. Shaping delays packets instead of dropping.
How shaping works:
- Define committed information rate (CIR)
- Buffer traffic exceeding CIR
- Transmit when tokens arrive
- Tail-drop if buffer fills
Shaping versus policing:
- Shaping: Buffer, smooth, adds latency
- Policing: Drop immediately, no latency
- Shaping: Better TCP performance
- Policing: Real-time prefers drop over delay
Use cases:
- Match rate to provider CIR
- Avoid provider policing
Shaping applies on egress only. You cannot shape incoming traffic.