From: Chris Lewis (chrlewiscsco@yahoo.com)
Date: Tue Oct 11 2005 - 10:37:36 GMT-3
Q1, optimizing the depth of the token bucket depends on the profile of the incoming traffic, out of scope for the lab. Generally, if you have large bursts, you get better throughput with a seeper bucket, smaller bursts, it is better with a shorter bucket.
Q2, Don't try to memorize everything, spend time working out quick ways to verify these things. Even if you do memorize everthuing, you can't keep up with IOS changes. So apply the policy-map to an interface and run the show policy-map interface command to see the answer as follows:
Router1(config-if)#do sho policy-map int
Serial3/0
Service-policy output: test
Class-map: class-default (match-any)
20 packets, 1682 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
police:
cir 8000 bps, bc 1500 bytes
pir 16000 bps, be 1500 bytes
conformed 1 packets, 44 bytes; actions:
set-prec-transmit 5
exceeded 0 packets, 0 bytes; actions:
set-prec-transmit 1
violated 0 packets, 0 bytes; actions:
drop
conformed 0 bps, exceed 0 bps, violate 0 bps
Q3. Operation is described at http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123tcr/123tqr/qos_o1gt.htm#wp1084420
The key point you should take away for your question is that the incoming packet is first measured against the tokens in the Tp bucket, which is set by the Be parameter. This is kind of counter intuitive, normally we think of things being measured against the committed rate first, then if they exceed, being measured against the exceed bucket, but that is not the case for the two rate policer.
Chris
The Great Ryan <pv.ryan@gmail.com> wrote:
Hi Group,
I read the document and understand that in police command that Bc is
the Token Bucket size in policer and CIR is the rate of filling Token
in Token Bucket
(Q1) CIR & Bc
=========================
i.e. police 128000 16000
It means that the Token Bucket depth is 16000byte and the filling rate
128000bps such that it take one second to fill up the bucket.
I want to know if it is meaningful that I set
"police 128000 20000" => larger bucket, or
"police 128000 10000" => smaller bucket ?
(Q2) CIR & PIR
=========================
If I set the following:
police cir 64000 pir 128000
conform-action set-prec-transmit 5
exceed-action set-prec-transmit 1
Since I haven't set the violate-action, it will drop all packets if
the rate is above 128kbps
If now I have 256kbps rate passing through the policer, will the
result be the following:
- first 64kbps marks as precedence 5 and transmit
- next 64kbps marks as precedence 1 and transmit
- last 128kbps drop
Am I right ?
(Q3) CIR, Bc and Be
=========================
If I set the following
police cir 128000 bc 16000 be 8000
In the situration that , at time T= 0ms, traffic flow such that Bc is
empty and the next packet (size = 1500byte) use Token in Be. After
sending this packet, the time is T1= 5ms. The Token gain in this
period= 128000*0.005/8 = 80byte. I want to know this token will be
put on Bc or Be ? If the next packet size is 100 byte, it will use Bc
or Be ?
Thanks a lot !
Sorry if I have any mistake/mis-understanding.
Ryan
This archive was generated by hypermail 2.1.4 : Sun Nov 06 2005 - 22:00:50 GMT-3