Re: 3550 QoS - Police problem

From: Petr Lapukhov (petr@internetworkexpert.com)
Date: Thu Nov 23 2006 - 11:32:57 ART


Chris Lewis spent many hours, trying to explain how shaping and policing
differ,
and why there is no Tc in policing :) Try looking for his excellent posts
regarding the
policing in 2005/2006 years archieves :)

I'll try to give a short explanation of things going here. To begin with,
how does policer
work, in short?

Imagine you have 100Mb interface, and you want to limit outgoing traffic
flow to
10Mbs. A big bunch of packets arrives, and is ready to be sent. Now, what
policer does in such situation?.

Well, it starts sending packet, at *interface* bitrate. How could we achieve
the
desired 10M target rate now? Of course, only by using some *averaging*.
Look, If we
drop some packets in line, instead of sending them, then total amount of
traffic
*sent* at 100Mbs would be lower than received amount (at the same time
interval),
and hence, the *average* speed (not interface sending bitrate!) would be
reduced.

So here comes the question: how much of the packets we may permit, before
starting the drops? This question is answered by the "normal burst" value,
which tells us, how many packets in line we can send at wire speed, w/o
any drops. As soon as this value is exeeced, and there are more packets
arriving
we start dropping them, to accomodate the *average* speed. Of course, while
we drop packets, the timer is ticking, and soon we'll have enough credits to
send
a packet again. This is a simple way to achieve desired average rate, and
this
is how actually policer works. (As a matter of fact, real policer "marks"
packets -
this a generic behavior, but with drop as a mark action, my decription seems
to be ok).

Note that policer work is very effective - it does not do any buffering,
and it only keeps
one variable - current bucket size - to track the marking behavior.

Now you see, that burst size actually defines how "long" is you averaging
overall.
The larger is your burst, the more sustainable local "spikes" you permit
(sudden
quick burst at 100mbs from my example). But after all, the measure average
bit
rate would still be the target 10M (again from my example).

--

And finally,a comment about 3550 - it only implements single rate, two color policer. This means, that only one burst value is available for tuning - the normal burst.

Now if your normal burst is specified in Bps, then maybe you need to convert it into bytes somehow... Multiply it by 1 second and divide by 8:

128000*1s/8bits = 32000 bytes.

HTH

2006/11/23, Salman Abbas <dukelondon@gmail.com>: > > Hi Alexei, > > Thanks again for the confirmation. If we were to use the rate-limit legacy > command for this question, i would have to configure CIR, bc and be > values. > I understand that the calculation that you've suggested is for Bc(Normal > Burst). What about Be(Excess burst)? how will we calculate that? From the > Internetwork Expert workbook, I remember the formula: > > Bc = CIR x Tc/1000 > Be = (AR - CIR) x Tc/1000 > Default Tc value is 125ms. > > Ivan mentioned that the formula for calculating Bc is CIR/8 x 1.5 > > Hi Ivan, > > What formula should I use to calculate the Be for my rate-limit command? > > > Cheers, > > Salman > > > > > > > On 11/23/06, Alexei Monastyrnyi <alexeim@orcsoftware.com> wrote: > > > > Sounds right to me.... > > > > Is the anyone who can shed some light on normal burst value? > > > > I remember reading that this is what we can allow above police rate, > > but can't find a source that easy. > > > > A. > > > > Salman Abbas wrote: > > > Hi Alexei, > > > > > > Thanks for the reply. Just to confirm whether I've correctly > > > understood u or not, Lets say the question says: maximum is 256kbps > > > and normal is 64Kbps, would that mean that I'll do > > > > > > Normal bytes = 256k - 64k = 192k => to bytes 24000, so the police > > > command would be > > > > > > police 64000 24000 exceed action drop > > > > > > Regards, > > > > > > Salman > > > > > > > > > On 11/23/06, *Alexei Monastyrnyi* <alexeim@orcsoftware.com > > > <mailto:alexeim@orcsoftware.com>> wrote: > > > > > > Hi. > > > > > > If I understand it right from DocCD, normal burst is what you have > > > above > > > the police rate. 256k-128k=128k => to bytes 16000/ If it should be > > > considered together with police rate, then just 256k=>32000 bytes. > > In > > > either case police rate should be 128000, not 256000 IMO. > > > > > > I would go for > > > police 128000 16000 exceed action drop > > > > > > HTH > > > a. > > > > > > Salman Abbas wrote: > > > > Hi guys, > > > > > > > > Pls help to answer the following question: > > > > > > > > > > > > On SW1 int fa0/6, limit all UDP traffic by maximum 256Kbps and > > > normal > > > > 128Kbps to avoid congestion on your VLAN. > > > > > > > > > > > > My solution is: > > > > > > > > mls qos > > > > access-list 101 permit udp any any > > > > > > > > class-map LIMIT > > > > match access-group 101 > > > > > > > > policy-map POLICE > > > > class LIMIT > > > > police 256000 _____ exceed action drop > > > > > > > > int fa0/6 > > > > service-policy input POLICE > > > > > > > > Now the part that I dont understand is that second value in the > > > police > > > > command which is "Burst in bytes". How can I calculate it based > > > on the > > > > question above? Also, am I missing anyting else in my > > configuration? > > > > > > > > > > > > Thanks in advance, > > > > > > > > Cheers!!! > > > > > > > > Salman > > _______________________________________________________________________ > Subscription information may be found at: > http://www.groupstudy.com/list/CCIELab.html >

-- Petr Lapukhov, CCIE #16379 petr@internetworkexpert.com

Internetwork Expert, Inc. http://www.InternetworkExpert.com Toll Free: 877-224-8987 Outside US: 775-826-4344



This archive was generated by hypermail 2.1.4 : Fri Dec 01 2006 - 08:05:48 ART