Re: Rate-Limit - I just don't get it !!

From: Chris Lewis (chrlewiscsco@yahoo.com)
Date: Tue Nov 08 2005 - 10:59:57 GMT-3


Godswill,
 
I will reply to you in-line, to each point raised.
 
Chris

Godswill Oletu <oletu@inbox.lv> wrote:

Chris,

I read your last post and the other post you referred to. The older post is great, I am trying to reconcile it with some of the text I have read.

I will also want to take back the comment I made in my last post that "'traffic-shape rate can be used to achieve the same thing" But what I described in my last post was policing and not shaping.

 

CSL: There is no point in us arguing, but what you described was incorrect.

In traffic shaping Bc is the amount of packet that have to be sent within a time interval and Be if configured and not equal to zero is the non-committed burst at which packets can be sent but with the DE bit set.

 

CSL: Not true: The description of Bc seems good, but Be in frame shaping is an amount of bits that can be sent once per second, if enough credit has been built up by the traffic running at below CIR prior to that. The DE bit is only set by the service provider's switch unless you specifically configure it on your router, it does not mark Be bits with DE (in fact the router does not know which specific bits are allowed by .Be or Bc)

 

 Since, shapping have a queue or buffer packets are delayed and held in queue rather dropped, but policing will drop the packet because no buffer is involved.

 

CSL: this is correct.

Rate-limit:
In Bc(in bytes) = CIR(in bps) * (1 bytes)/(8 bits) * 1.5 Sec

(Page 473, Karl Solie CCIE Practical Vol. said "1.5 sec. is an average round-trip time, you should change this value to accurately represent the route trip time").

 

CSL: all books have errors in them (mine included), this is one of the errors in Solie's book.

I have not been able to validate that statement from another source, all my CCO search came up with many places where the value 1.5 sec was used but no explaination was given as to why it was used.

You said "tokens are added to the bucket as packets arrive " do you meant to say tokens are removed from the bucket as packets arrived?

 

CSL: no. For policiing, tokens are added and deducted as packest arrive. Please see http://www.cisco.com/univercd/cc/td/doc/product/software/ios123/123tcr/123tqr/qos_o1gt.htm#wp1093915

 

CSL: The key differences between shape and police is as you point out, shaping can buffer packest over the rate, whereas policing cannot. The algorithms for doing this are completely different. In shaping tokens are added to the bucket at regular intervals, in policing tokens are only added when a packet arrives, using the formulat (T-T1)*CIR, meaning the time difference between last packet arrival and current packet arrival times the CIR.

 

 It is only logical that tokens will be removed from the bucket when packets arrive at the interface and the packet size exceeds the CIR, if the bucket depth as configured by Bc is still not enough to match the size of the packet to be transmitted and Be is configured, token will be borrowed as long as the actual & compounded debt criterias are met.

(http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/fqos_c/fqcprt4/qcfpolsh.htm)

Please comment.

Thanks.
Godswill Oletu

----- Original Message -----
From: Chris Lewis
To: Godswill Oletu ; Leigh Harrison ; FORUM
Sent: Monday, November 07, 2005 9:25 PM
Subject: Re: Rate-Limit - I just don't get it !!

Godwill,

I do not believe the explanation you have given is totally correct. I think the main issue is that rate-limit is a police action, not a shape action and your descriptions are applicable to shaping.

The1.5 seconds does not refer to a round trip time. It is a rule of thumb figure that enables the policer to achieve CIR and can be varied depending on the burstiness of the traffic.
Second, the default Tc of 125msec refers to shaping for low speed links (the higher the speed of the link, the lower the value of default Tc in shaping), there is no standard time interval for policing, tokens are added to the bucket as packets arrive and not at regular intervals as is done in shaping. Pretty much this issue negates the description of token opereation in your post.

If you have an opportunity to look over the reply I gave Leigh (with a link to a previous post), you may wish to comment further.

Cheers

Chris

Godswill Oletu wrote:
Leigh,

There are various way, to arrive at the various values to be used, this is
the way I understand it based on your scenario:

CIR=4meg=4000000 bytes.

Normal rate=8th of CIR=500000
Bc=normal burst*1.5 Sec =750000
Be=Bc*2=1500000

(1.5 Sec is the average round trip time, you can use a value more suitable
to your situation)

interface fastethernet0/0
rate-limit input 4000000 500000 1500000 conform-action transmit
exceed-action drop

Meaning:
1. All traffic from 0 to 4000000 bytes will be allowed normal passage.
2. Traffic above 4000000 bytes will result in token been removed from the
token bucket and the bucket will become empty after 500000 bytes has been
removed.
3. When a packet is transmitted, the token will be released, but it will not
be returned to the bucket until after Tc, which is by default 125ms.
4. When the token bucket is empty, tokens will be borrowed upto 1500000
bytes and placed in the bucket.
5. If the token bucket become empty again, after borrowing the excess tokens
in step 4 above, the 'exceed-action' will kick-in and tail drop all excess
traffics.

You can see that, steps 1 - 4 will trigger the confirm action and the packet
will be transmitted but under different conditions and step 5 will trigger
the exceed action and the packet will be dropped.

When in doubts, you only need to configure the CIR.

#show interface fa0/0 rate-limit

will use the default recommended Cisco values to calculate the other values
and apply then for you and you can note the values down and then manually
add them to your configs..

Remember that, you can also use 'traffic-shape rate' to achieve the same
objective, only that 'rate-limit' is more granular and give one more control
and you will be correct if you say more confusion:

#interface fastethernet0/0
#traffic-shape rate

Bc=CIR*Tc

Be=Bc*2

If the interface will not support burst..
Be=Bc
(Where recommended Tc value = 125ms).

Note:
Your ISP is only committed to transmitting 4000000 bytes.

HTH
Godswill Oletu

----- Original Message -----
From: "Leigh Harrison"
To: "FORUM"
Sent: Friday, November 04, 2005 11:00 AM
Subject: Rate-Limit - I just don't get it !!

> All,
>
> I'm having a hard time getting my head around some of the bits of QoS.
> No matter how much I read about it - it doesn't seem to sink in.
>
> I had a requirement to set the bandwidth on an incoming interface to 4
meg.
>
> No problem I thought and did it thusly:-
>
> policy-map traffic_in
> class class-default
> police 4000000
>
> int f0/0
> service policy input traffic_in
>
> But then I thought to myself - hang on, what if in the lab I couldn't
> use a policy map, what else could I do? Ah-ha, I thought,
> Rate-Limiting. Then it hit me - I've no idea why there are so many
> variables for rate limiting!! To be honest - I think I'm going mad. I
> got quite angry with my telnet session when it wanted me to specify
> normal burst size and extended burst size.
>
> Could someone put this into simple(ton) terms for me?
>
> Many thanks in advance,
> LH
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Thu Dec 01 2005 - 09:12:05 GMT-3