Re: limit traffic without police or rate-limit

From: Mienbaikebi Patani (patmien@gmail.com)
Date: Mon Jun 19 2006 - 04:34:53 ART


using the MQC command "shape peak" effectively fills both Bc and Be buckets
at the begining of every Tc, and then effectively transmitting traffic worth
Bc + Be at every Tc. So if you use the command "shape peak" you are
effectively transmitting more than is expected depending on the Bc and the
CIR you want to achieve. So the "shape average" is what will meet the
requirements of not transmitting more than you want.

For example I want CIR to be 128k and Tc is left at default of 125ms, and I
do the following;

shape peak cir 128000 bc 16000 be 16000

The above setting effectively transmits Bc + Be (16000 + 16000 = 32000) at
every interval. Considering the total rate for a period of 1000ms you are
going to have 32000 X 8 = 256000(since we have 8 intervals of 125ms in
1000ms) which is effectively more than the CIR of 128k we want.

But if we do the following for thesame values in the above example I stated;

shape average cir 128000 bc 16000 be 16000

The following will be the result;

Assuming there is no period of inactivity, meaning that we effectively
transmit Bc at every interval, the overall rate will be 16000 X 8 = 128000.
This is because the value Be can only have tokens to transmit data when not
all Bc value was used in prior Tc intervals. So if we do not have any
interval of inactivity, then effectively the value Be will be equal to 0.

Note: Be is only filled with Bc Tokens that were not used in some intervals
when you use the command "shape average" but is effectively filled at the
begining of every interval when we use the command "shape peak".

To meet the requirements of the example I stated with the command "shape
peak" I will rather do the following;

shape peak cir 64000 bc 8000 be 8000

Then I will be transmitting for every interval Bc + Be (8000 + 8000 =
16000), and then the overall rate becomes 16000 X 8 = 128000, which still
meets the requirements of my example.

If you take a look carefully at the output of the "show policy-map interface
X" you will see the difference of the settings when you use the two
commands. I don't have a router currently with me to get the outputs for you
to see. You may check yourself to confirm.

So you need to be careful with the values you set when using either
commands.

I hope this was informative to you.

On 6/17/06, Koen Zeilstra <koen@koenzeilstra.com> wrote:
> Hi Group,
>
> Say I want to limit the amount of traffic to to a certain destination to
> 128k. What would the best solution?
>
> Something like this?
>
> ip access-list ext TARGET
> permit ip any host 10.0.0.1
> !
>
> class-map LIM128
> match access-group name TARGET
> !
>
> policy-map QOS
> class LIM128
> shape peak 12800
> !
>
> int f0/0
> service-policy output QOS
> !
>
>
> Does this make sure there isn't a single bit extra being sent out from int
> f0/0?
>
> Is shape peak here better or shape average if no more requirements are
> mentioned.
>
> thanks,
>
> Koen
>
>
> -----------------------
> Math is like love -- a simple idea but it can get complicated.
> -- R. Drabek
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Sat Jul 01 2006 - 07:57:33 ART