cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
4722
Views
5
Helpful
6
Replies

help with shape peak calculation

philip moore
Level 1
Level 1

Hi

I want to configure a qos policy for a dmvpn network.

The ideal is to set a pir of 2048000, with cir 512000.

I believe shape peak will do the job, but I'm completely lost on the calculation.

Can anyone help me please with the math.

Thanks a lot!

Phil

1 Accepted Solution

Accepted Solutions

Hi Philip,

Yes this is perfect.

Formula no.1 : Tc = Bc/CIR

10ms = Bc/512000

Bc = 0.01 * 512000

Bc = 5120

Formula No. 2 : PIR = CIR ( 1 + Be/Bc)

2048000 = 512000 (1 + Be/5120)

2048000 /512000 = 1+ Be/5120

4 - 1 = Be/5120

3 = Be/5120

Be = 3 * 5120

Be = 15360

Your "show policy-map interface" output proves your values.

Please rate if useful and question has been answered.

Thanks

View solution in original post

6 Replies 6

philip moore
Level 1
Level 1

By trial and error I arrived at the settings below. This was complete guess work:

policy-map SHAPE

class class-default

  shape peak 512000 256000 768000

The idea was to set the target rate (cir) to 512000. ok so far.

Next, I know that PIR is 2048000 so I take that and divide by the default .125ms timing interval to arrive at bc 256000.

Lastly (now really on rocky ground) for the be value I played with the numbers until the show policy-map returned the correct numbers.

Can someone help me understand please, as for one I have no clue if this is correct, and 2) no clue about the method. I have to repeat the same for different bandwidths so really key I get this right.

it would be much appreciated.

R1(config-pmap-c)#do sh policy-map int f0/0

FastEthernet0/0

  Service-policy output: SHAPE

    Class-map: class-default (match-any)

      39 packets, 4314 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: any

      Traffic Shaping

           Target/Average   Byte   Sustain   Excess    Interval  Increment

             Rate           Limit  bits/int  bits/int  (ms)      (bytes)

          2048000/512000    128000 256000    768000    500       128000

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping

        Active Depth                         Delayed   Delayed   Active

        -      0         39        4314      0         0         no

Cisco routers use following formulas to calculate CIR (Commited Information Rate/Average Rate), Bc (Commited Burst/Sustain bits), Be (Excess Burt/Excess Bits), PIR (Peak Information Rate/Target Rate):

Tc = Bc/CIR

(Tc is time interval in ms)

=================================

peak rate i.e PIR  = CIR(1+Be/Bc)

=================================

Please compute the values from your example and let me know.

Note: (EDITED):

You have a 500ms interval which  could be a problem for a voice traffic so you can use a interval of 25ms by using following values:(just an example use any of your choice)

shape peak 512000 12800 38400

R1#show policy-map int fa0/0

FastEthernet0/0

  Service-policy output: SHAPE

    Class-map: class-default (match-any)

      0 packets, 0 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: any

      Traffic Shaping

           Target/Average   Byte   Sustain   Excess    Interval  Increment

             Rate           Limit  bits/int  bits/int  (ms)      (bytes)

          2048000/512000    6400   12800     38400     25        6400

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping

        Active Depth                         Delayed   Delayed   Active

        -      0         0         0         0         0         no

R1#

well, according to my original configuration

tc = bc/cir

tc = 256000/512000

tc = 500 msecs

yes, you are right, and yes this will carry voice so that is going to be a problem.

PIR  = CIR(1+Be/Bc)

PIR = CIR(1+ 768000/256000)

PIR = CIR * (1 + 3)

PIR = 512000 * 4

PIR = 2048000

the numbers add up.

Your suggestion "shape peak 512000 12800 38400"

tc = 12800/512000

tc = 25 msecs

PIR = 512000 * (1 + 38400/12800)

PIR = 512000 * 4

PIR = 2048000

So this is I guess my question, how to calculate be and bc values if tc, cir and pir are known (I never was any good at re-arranging formulas).

so first to calculate bc:

bc = tc * cir

bc = 0.025 seconds * cir

bc = 12800

...then to calculate be is simply ?

be = 3 * bc

be = 38400

not sure that is correct. any advice?

really appreciated Nandan, thanks

in the end, I went for a 10ms tc....the above calculations seems to carry......but I'd be interested to hear the 'correct way', this seems like a bit of a hack

cheers!!!!

R1(config-pmap-c)#do sh policy-map int f0/0

FastEthernet0/0

  Service-policy output: SHAPE

    Class-map: class-default (match-any)

      1745 packets, 174762 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: any

      Traffic Shaping

           Target/Average   Byte   Sustain   Excess    Interval  Increment

             Rate           Limit  bits/int  bits/int  (ms)      (bytes)

          2048000/512000    2560   5120      15360     10        2560

        Adapt  Queue     Packets   Bytes     Packets   Bytes     Shaping

        Active Depth                         Delayed   Delayed   Active

        -      0         1745      174762    0         0         no

I think I got it, can you comment to re-assure me please?

be = (PIR * tc) - bc

bc = tc * cir

Hi Philip,

Yes this is perfect.

Formula no.1 : Tc = Bc/CIR

10ms = Bc/512000

Bc = 0.01 * 512000

Bc = 5120

Formula No. 2 : PIR = CIR ( 1 + Be/Bc)

2048000 = 512000 (1 + Be/5120)

2048000 /512000 = 1+ Be/5120

4 - 1 = Be/5120

3 = Be/5120

Be = 3 * 5120

Be = 15360

Your "show policy-map interface" output proves your values.

Please rate if useful and question has been answered.

Thanks

Review Cisco Networking for a $25 gift card