Documente Academic
Documente Profesional
Documente Cultură
Policing
Drops out-of-profile traffic (TCP retransmissions)
More resource efficient
Supports incoming and outgoing interfaces
Supports (re-)marking
Shaping
Reduces bursts by queuing out-of-profile traffic
• Minimizes TCP retransmits
Only for outbound interfaces
Does not support (re-)marking
"Delay instead drop"
Policing Shaping
1
Token Buckets PERIHEL
2
Dual Token Bucket – Single Rate PERIHEL
Size N No No
Packet N < Nc N < (Nc+Ne) Violate
Yes Yes
Nc = Nc – N Nc = Nc – N
Ne = Ne – (N – Nc)
Conform Exceed
Current number of
Current number of
tokens in PIR bucket Np Nc tokens in CIR bucket
Size N No No
Packet N > Np N > Nc Conform
Nc = Nc – N
Ne = Ne – N
Same amount of tokens
Yes Yes consumed from both buckets
Ne = Ne – N
Violate Exceed
Only the tokens from the PIR bucket
are required to transmit the packet
3
Practical Comparison PERIHEL
Packet Drop:
No more Tokens in Be and Bc
Violating
PIR PIR
Violating
Exceeding Exceeding
Conforming CIR Conforming CIR
Leaky Bucket
Dual Leaky Bucket
Better performance than Dual Token
Bucket
Hierarchical Token Bucket
Used by Linux since kernel 2.6.20
Many others…
4
Configuration PERIHEL
5
Configuration: Two Rate DTB PERIHEL
6
Example & Verification PERIHEL
policy-map MY_TRAFFIC_POLICY
class MY_VOICE
police cir 250000000 conform-action transmit
exceed-action transmit
violate-action drop
class MY_DATA
police cir 250000000 conform-action transmit
exceed-action set-prec-transmit 3
violate-action drop
interface fa0/0
service-policy input MY_TRAFFIC_POLICY
7
Shaping PERIHEL
Either shape to
Average rate (CIR) – but allow up to (Bc+Be)/Tc
Peak rate – but during congestion drop down to CIR
It is recommended to specify the bit-rate only and
let the IOS calculate Bc and Be
By default Tc is 4 ms
If Bc given, then Tc = Bc / CIR
Optionally specify the length of the shaping queue (in packets aka "buffers")
policy-map MY_FTP_POLICY
class af11-traffic
bandwidth remaining percent 15
random-detect dscp-based
random-detect dscp 10 26 40 10
shape average 16000