Re: Average Bit Rate

From: Elias Chari (elias.chari@gmail.com)
Date: Fri Jul 14 2006 - 12:59:59 ART


Hi,

With Class Based Policing the Bc bucket is replenished every

(T_current - T_old)*Policed_rate/8

If one second has elapsed since the last packet the bucket will fill up.

If the Bc bucket fills up, tokens are captured by the Be bucket assuming it
has capacity.

In terms of tokens available within each backet:
Traffic within the Bc tokens available, conforms
Traffic that is above Bc but below Be, exceeds
Traffic that is above both Bc and Be is violating

Lets say you have police_rate = 80000 bps
Bc = 300 bytes
Be = 700 bytes

Packet arrives at t0 lenght = 300 bytes

at t0 Bc is emptied - Action conform

at t1=25msc seconds later another packet arrives with 500 bytes

Bc is replenished at t1 with 0.025*8000/8 = 25 tokens

Bc = 25

The packet requires 500 tokens, therefore 475 are used from Be bucket -
Action exceed

And goes on.....

On 7/14/06, Patricia Loreal <ploreal@gmail.com> wrote:
>
> Hi Petr, great.
>
> But you did not answer yet my question .
>
> Say:
>
> P1, 300 Bytes, mSec = 0
> P2, 500 Bytes, mSec = 25
> P3, 800 Bytes, mSec = 400
> P4, 1000 Bytes, mSec = 2
> P5, 130 Bytes, mSec = 40
>
> applying your logic.
> That would be:
>
> P1-25ms-P2-400ms-P3-2ms-P4-40ms-P5
>
> If I have configured a average bit rate of 8000 bps, and a BC of 300 and
> a
> BE of 700
>
> As my understanding when packet arrives with a size below 300 they
> conform,
> packet in between 300 and 700 Bytes they exceed, and if is greater that
> 700
> then it takes the violate action, please correct me..
>
> So what is the representation of the Average bit Rate in this formula, is
> like creating a dedicated bandwidth for that traffic?
>
>
>
> On 7/14/06, Petr Lapukhov <petr@internetworkexpert.com> wrote:
> >
> > Patricia,
> >
> > Average bit rate with policer is a bit tricky thing :) As you
> > understand, every packet leave policer at wire speed (actual
> > interface rate). Hence, to introduce an average bitrate, one
> > need to introduce some "averaging" scheme. This is where
> > burst comes to play:
> >
> > By definition of policer, if you observe policer's output
> > for the duration of time [Tc=Bc/AvgBitrate], you will collect
> > no more then Bc bytes of *conforming* (marked as conforming)
> > packets. Tc place role of averaging interval here..
> >
> > Policer's output:
> >
> > PPPPPP----PPPPPPP---PPPP---
> > |_______Bc_________|
> >
> > T0-----------------------------T1 : Time
> >
> > T1-T0=Tc, Avg = Bc/Tc.
> >
> > If you set bigger burst, you "extend" you averaging interval,
> > hence permitting more "spikes" of packets flow. The ultimate
> > goal of using burst is to adapt to "unstable" flows, like
> > that produces by many users surfing web. You may usually
> > find "dense" and "sparse" blocks of packets within that flows.
> >
> > You see, if you police "uniform" flow, like stable ping from cisco
> > router, it does no matter what is your burst size. You will always
> > get that same average bitrate over any output burst.
> >
> > PPPPPPPPPPPPPPPPPPPPP ->
> > P-P-P-P-P-P-P-P-P-P-P-P-P-P
> >
> > But if you have flow like that
> >
> > PPPP--------PPPPPPPP--------PPPPP
> >
> > You would certainly benefit from setting bigger burst size,
> > because that permits you to accumulate some *credit*
> > when your flow is silent, and use the credit when a "spike"
> > arrives.
> >
> > Something like that:
> >
> > PPPP--------PPPPPPPP--------PPPPP is policed to
> >
> > (with small burst) ->
> >
> > P-P-P---------P-P-P-P-P-P-------P-P-P-P
> >
> > OR with large burst: ->
> >
> > PPPP--------PPPPP----------------PPPPP
> >
> >
> > Note that average bit rate remains the same, it is just
> > measured over different bursts (or different averaging intervals)
> >
> > HTH
> > --
> > Petr Lapukhov, CCIE #16379
> > petr@internetworkexpert.com
> >
> > Internetwork Expert, Inc.
> > http://www.InternetworkExpert.com
> > Toll Free: 877-224-8987
> > Outside US: 775-826-4344
> >
> > 2006/7/14, Patricia Loreal <ploreal@gmail.com>:
> > >
> > > Hello Dears.
> >
> > What is the relation between average bit rate and the BC and BE values
> > when
> > we configure sr-TCM or tr-TCM?
> >
> > Say:
> >
> > Average Bit Rage = 192000 bps
> > Bc = 3000 or (KB) CIR in tr-TCM
> > Be = 5000 or (KB) PIR in tr-TCM
> >
> > I understand that when a packet arrives with a determined size it will
> be
> > discounted from the Bc bucket if tokens are available and if not It
> would
> > check the Be Token Bucket. (be/bc are in bytes)
> >
> > OK, that's the meter part that could help me decide what to do with the
> > packet that Conforms or exceed the values (remark, drop, transmit) /
> > Violate
> > in tr-TCM
> >
> > But what is the relation with the Average bit rate?
> >
> > What the process exactly when a packet arrives, in relation to the
> Average
> >
> > Bit Rate ( that is in bits/sec)
> >
> >
> > Say:
> >
> > P1, 300 Bytes, mSec = 0
> > P2, 500 Bytes, mSec = 25
> > P3, 800 Bytes, mSec = 400
> > P4, 1000 Bytes, mSec = 2
> > P5, 130 Bytes, mSec = 40
> >
> > Thanks for you kindest help
> > Patricia Loreal
> >
> > _______________________________________________________________________
> > Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Tue Aug 01 2006 - 07:13:47 ART