Traffic Shaping
September 18th, 2007 neteng Posted in CCIE Notes, Networking |
Here are my notes on Traffic Shaping…Once again, click below to see them. Enjoy!
Traffic Shaping:
Terms:
- Bc - Committed burst size, in bits. Defaults to 8000 bits at speeds < 320 kbps
- Tc - Time interval (in milliseconds) over which the committed burst(Bc) bits is sent. Defaults to 25ms (.025 seconds) at speeds > 320kbps
- Be - Excess burst size, in bits. The number of bits above Bc that can be sent after periods of inactivity.
- CIR - Commited Information Rate, in bits per second (bps). The rate defined in the traffic contract between customer and provider.
- Shaped Rate - Oftentimes equal to CIR, sometimes not. Depends on the goal of shaping.
Formulas:
Bc = Tc * Shaped Rate(often CIR)
Tc = Bc/Shaped Rate(often CIR)
With delay-sensitive traffic such as VoIP, configure Bc so that Tc is 10ms or less.
The key advantage of Be is a larger token bucket (Bc + Be). The bucket is filled up to Bc + Be after a periods of inactivity.
Adaptive Shaping:
Allows the traffic shaper to recognize congestion and temporarily drop the shaping rate. As the congestion clears, the shaping returns to the original rate.
Recognition performed via BECN, FECN and Foresight messages.
Once congested, the shaping rate is dropped 25% for each congestion message (BECN, etc) until it hits the configured ‘floor’ - the Minimum Information Rate (MIR or mincir).
After 16 consecutive Tc intervals, the rate grows again by 1/16th of the maximum rate until the CIR is hit again.
Shaping can be applied to a physical interface, subinterface and sometimes an individual Virtual Circuit (VC).
CB shaping cannot be applied per VC if in use on a multipoint interface.
Traffic shaping tools:
- GTS - Generic Traffic Shaping
- CB Shaping - Class Based Shaping
- FRTS - Frame Relay Traffic Shaping
Shapers have their own queues, before packets are pushed to the interface software queues. The shaper queues default to FIFO (except GTS).
Supported queue methods:
- GTS - WFQ
- CB Shaping- FIFO, WFQ, CBWFQ, LLQ
- FRTS - FIFO, WFQ, CBWFQ, LLQ, PQ, CQ
These queues are only implemented when shaping occurs.
Generic Traffic Shaping (GTS)
- Works on large variety of interfaces
- Can adapt via BECN/FECN
- Can shape a subset of traffic via ACLs
Frame Relay Traffic Shaping (FRTS)
- Applies to Frame Relay only
- Does not permit any queueing tools on the physical interface when FRTS is enabled
- Supports Frame Relay Fragmentation (FRF.12) - Interleaves small packets with fragments of larger packets to avoid long serialization delay
- Cannot shape a subset of traffic on an interface
- Can shape per-VC
- Can dynamically learn CIR, Bc and Be using Enhanced LMI (ELMI)
Class-Based Shaping (CB Shaping)
- Uses the Modular QoS CLI (MQC)
- Works on large variety of interfaces
- Can adapt via BECN/FECN
- Can shape a subset of traffic via class-maps
- Can shape by perecentage of bandwidth on link
Shaping to a peak rate - Instead of filling the token bucket with Bc every Tc, the shaper always fills the token bucket with Bc + Be, no matter if there was inactivity or not. This means that the shaper can send Bc+Be every Tc.
With ’shape peak
Why would you use ’shape peak’? According to Cisco.com:
Buy Me a Beer! Help me keep my sanity as I write more articles.Peak rate shaping allows the router to burst higher than average rate shaping. However, using peak rate
shaping, the traffic sent above the CIR (the delta) has the potential of being dropped if the network
becomes congested.
If your network has additional bandwidth available (over the provisioned CIR) and the application or
class can tolerate occasional packet loss, that extra bandwidth can be exploited through the use of peak
rate shaping. However, there may be occasional packet drops when network congestion occurs. If the
traffic being sent to the network must strictly conform to the configured network provisioned CIR, then
you should use average traffic shaping.








Leave a Reply