Re: CB Policing with Be and Without Violate Action

From: SIMON HART (simon.hart@btinternet.com)
Date: Fri Jul 01 2005 - 10:44:57 GMT-3


Hi Gladston,

CB Policing without violate action is valid. Your
configs below, however, do not make a great deal of
sense. I shall try and explain.

Police cir 64000 bc 8000 be 1000

Now this statement dictates that we can transmit
conforming bits at a rate of 64000 bits (8000bytes)
every second. So our Tc is 1 second. The statement
also suggests that during any Tc interval of 1 second
we can send an additional 8000 bits (1000bytes), if
the be bucket has not been used up.

Now in order to explore this further we need to make
some assumptions. Firstly lets assume that the
packets offered are 1000bytes (8000 bits).

Therefore for each Tc we can transmit 64000/8000 = 8
packets that conform.

We need to determine the actions for conforming and
non-conforming traffic

so in your config:

conform-action transmit
exceed-action drop
violate-action drop

Example 1

Now look at what happens as packets are offered

At Tc0

Bc = 8 packets
Be = 1 packet

At Tc1 (end of first period)
Offered packets 9
In contract first 8 packets - transmit
Remaining 1 packet - try and use Be
Decrement Be by 1 token
Take action on Be - in this case drop, therefore
packet is dropped.

At Tc2
Offered packets 10
In contract first 8 packets - transmit
Remaining 2 packets - try and use Be
Be = 0
therefore take Violate action - which is drop
remaining packets

At Tc3
Offered packets 5
In contract first 5 packets - transmit
Because Bc has not been fully used (3 tokens spare)
We can now add 1 token to Be

At Tc4
Offered packets 10
In contract first 8 packets - transmit
Remaining 2 packets - try and use Be
Decrement Be by 1 token
Take exceed action on Be - in this case drop,
therefore packet is dropped.
1 packet now violates - take violate action -
therefore drop this packet.

Hopefully from the above example you can see that Be
is not really being used for any purpose. This is
because the Be action is the same as the violate
action, and hence any non-conforming packets will be
dropped.

Example 2

Now see what happens when we remove the violate action
on the previous example.

At Tc0

Bc = 8 packets
Be = 1 packet

At Tc1 (end of first period)
Offered packets 9
In contract first 8 packets - transmit
Remaining 1 packet - try and use Be
Decrement Be by 1 token
Take action on Be - in this case drop, therefore
packet is dropped.

At Tc2
Offered packets 10
In contract first 8 packets - transmit
Remaining 2 packets - try and use Be
Be = 0
No violate action - however therefore take Be action -
drop packets

At Tc3
Offered packets 5
In contract first 5 packets - transmit
Because Bc has not been fully used (3 tokens spare)
We can now add 1 token to Be

At Tc4
Offered packets 10
In contract first 8 packets - transmit
Remaining 2 packets - try and use Be
Decrement Be by 1 token
Take exceed action on Be - in this case drop,
therefore packet is dropped.
No violate action, therefore take exceed action -
which is drop the remaining packet.

Example 3

This time we have no violate action and the exceed
action is set-dscp to af13

exceed-action set-dscp-transmit af13

At Tc0

Bc = 8 packets
Be = 1 packet

At Tc1 (end of first period)
Offered packets 9
In contract first 8 packets - transmit
Remaining 1 packet - try and use Be
Decrement Be by 1 token
Take action on Be - transmit with dscp of af13

At Tc2
Offered packets 10
In contract first 8 packets - transmit
Remaining 2 packets - try and use Be
Be = 0
No violate action - however therefore take Be action -
transmit with dscp of af13

At Tc3
Offered packets 5
In contract first 5 packets - transmit
Because Bc has not been fully used (3 tokens spare)
We can now add 1 token to Be

At Tc4
Offered packets 10
In contract first 8 packets - transmit
Remaining 2 packets - try and use Be
Decrement Be by 1 token
Take exceed action on Be - set dscp of af13
No violate action, therefore take exceed action -
which is transmit with dscp of af13

In this example it should be clear that the class is
no longer policed as all traffic is transmitted,
however the out of contract traffic (everything above
cir) will be marked as af13.

Example 4

One final example to round this off.

We shall use an exceed action that sets dscp and a
violate action that drops packets

exceed-action set-dscp-transmit af13
violate-action drop

At Tc0

Bc = 8 packets
Be = 1 packet

At Tc1 (end of first period)
Offered packets 9
In contract first 8 packets - transmit
Remaining 1 packet - try and use Be
Decrement Be by 1 token
Take action on Be - transmit with dscp of af13

At Tc2
Offered packets 10
In contract first 8 packets - transmit
Remaining 2 packets - try and use Be
Be = 0
Violate action - Drop the remaining 2 packets

At Tc3
Offered packets 5
In contract first 5 packets - transmit
Because Bc has not been fully used (3 tokens spare)
We can now add 1 token to Be

At Tc4
Offered packets 10
In contract first 8 packets - transmit
Remaining 2 packets - try and use Be
Decrement Be by 1 token
Take exceed action on Be - set the dscp of af13
Violate action - Drop the remaining 1 packet

This last example shows that the Be is being used
effectively. That is we can transmit a small burst of
traffic if the Be token bucket is full (but perhaps
mark it down). And any packets above Be are going to
be dropped.

Sorry for the rather longwinded mail, but I am not
sure how to describe the various options any more
succinctly. I think once you have read this through a
couple of times it will become a little more
intuitive.

Thanks

simon



This archive was generated by hypermail 2.1.4 : Sun Sep 04 2005 - 17:00:29 GMT-3