Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

QoS Class-Based Traffic Shaping (what is Be)

Guys,

two questions on the output below :

1. What is the Be, is this an amount per interval that can go over Bc or is it the total amount of data that can be sent?

ie, i interpret the command to read, Bc is the sustained rate per interval and Be is the sustained rate plus another amount, it I would use sommat like this

shape average 128000 7936 8500

this would show that I could send in total up to 8500 bits per interval

or does it work like this ?

shape average 128000 7936 564

this would show that I could send in total up to 8500 bits per interval

if it is the first one, you would not expect to be able to configure a Be of less than Bc?

Also, how can you show what traffic is within the Bc and what is in the Be? ie, how much data is being sent out of contract?

Many kind regards,

Ken

Metro2(config-pmap-c)#policy-map test1_cos

Metro2(config-pmap)# class class-default

Metro2(config-pmap-c)# shape average ?

<8000-154400000> Target Bit Rate (bits per second), the value needs to be

multiple of 8000

percent % of interface bandwidth for Committed information rate

Metro2(config-pmap-c)# shape average 128000 ?

<256-154400000> bits per interval, sustained. Needs to be multiple of 128.

Recommend not to configure it, the algorithm will find out

the best value

<cr>

Metro2(config-pmap-c)# shape average 128000 7936 ?

<0-154400000> bits per interval, excess. Needs to be multiple of 128. Bc

will be used if you don't configure it.

<cr>

Metro2(config-pmap-c)# shape average 128000 7936 1000 ?

<cr>

Metro2(config-pmap-c)# shape average 128000 7936 1000

Metro2(config-pmap-c)#^Z

Metro2#

Metro2#sh policy-map int fa 0/1 out

FastEthernet0/1

Service-policy output: test1_cos

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

5476 packets, 1934775 bytes

30 second 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)

128000/128000 1117 7936 1000 62 992

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 0 5476 1934775 967 1448313 no

Metro2#

Metro2# conf t

Enter configuration commands, one per line. End with CNTL/Z.

Metro2(config)#policy-map test1_cos

Metro2(config-pmap)# class class-default

Metro2(config-pmap-c)# shape average 128000

Metro2(config-pmap-c)#^Z

Metro2#sh policy-map int fa 0/1 out

FastEthernet0/1

Service-policy output: test1_cos

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

5479 packets, 1934955 bytes

30 second 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)

128000/128000 1984 7936 7936 62 992

Adapt Queue Packets Bytes Packets Bytes Shaping

Active Depth Delayed Delayed Active

- 0 5479 1934955 967 1448313 no

Metro2#

3 ACCEPTED SOLUTIONS

Accepted Solutions
New Member

Re: QoS Class-Based Traffic Shaping (what is Be)

Be in class-based QOS is incremental. meaning Bc + Be bits can be sent per interval when Be is configured. This information and more can be found here:

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

(Url may have word wraps)

Regards,

Yash

Silver

Re: QoS Class-Based Traffic Shaping (what is Be)

When u use average option u can send only Bc per interval.Unlike peak option it won't send Bc+Be per interval. But Whenever less than the burst size is sent during an interval, the remaining number of bits, up to the Be size, can be used to send more than the burst size in a later interval.

When u use peak option u can send Bc+Be per interval. Sending in peak rate may result in dropping during the time-period of congenstion.

I hope this will clear ur doubt.

New Member

Re: QoS Class-Based Traffic Shaping (what is Be)

Hi Ken

as the others mentioned there are two ways of shaping, average and peak. You can give 3 options to each of them, first the mean-reat (cir), then the bc (burst-commited) and the be (burst-excess) size. Each time intervall the interface may send bc, no mater if you shape to peak or to average. With be it is a bit different, if you shape to peak, it can also send each intervall the be size, so shape peak means sending each tc (time intervall) be+bc.

Shape average is a little different. You have to think of shaping as a system of token buckets, which get some new tokens each tc, the bc bucket gets full each tc, and if it is not used fully, and it gets refueled the next tc, the tokens overflowing are flowing into the be bucket, so the next tc, it may send bc plus what is in the be bucket.

So actually the only differenc in shaping to average or peak is the way that the be bucket gets refueled, either by getting refueled completly each tc (peak) or by getting what overflows be (avarage).

By the way, if you don't specify the be or bc value, IOS does it for yourself. At speeds lower then 320 kbps it always asumes bc=8000bits, at higher speeds it uses a tc of 0.025 seconds to calculate bc (be is always asumed as the same size of bc). So you see, you can adjust the tc intervall by changing the be because tc=bc/CIR!

There is a extremly good book about that on Cisco Press, "CISCO QOS Exam Certification Guide 2nd Editon", which explains all the shaping and policing concepts in a very understandable way.

Hope that clarifies your questions a bit.

Simon

8 REPLIES
New Member

Re: QoS Class-Based Traffic Shaping (what is Be)

Be in class-based QOS is incremental. meaning Bc + Be bits can be sent per interval when Be is configured. This information and more can be found here:

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

(Url may have word wraps)

Regards,

Yash

Silver

Re: QoS Class-Based Traffic Shaping (what is Be)

When shape average is configured, the interface sends no more than the Bc size for each interval, achieving an average rate no higher than the CIR.

So u can send only 7936 bits per interval. not more than that.

When the shape peak command is configured, the interface sends Bc plus Be bits in each interval.

if needed u can refer this link,

http://www.cisco.com/en/US/products/hw/switches/ps669/products_configuration_guide_chapter09186a008007f1e8.html

New Member

Re: QoS Class-Based Traffic Shaping (what is Be)

Guys,

this is great stuff and I really apprciate it.

The thing is this.

One one URL it says the following :-

For Class-based Shaping - How it Works

When the Be size equals 0, the interface sends no more than the burst size every interval, achieving an average rate no higher than the mean rate. However, when the Be size is greater than 0, the interface can send as many as Bc + Be bits in a burst, if in a previous time period the maximum amount was not sent. Whenever less than the burst size is sent during an interval, the remaining number of bits, up to the Be size, can be used to send more than the burst size in a later interval.

The other URL says :-

DTS How It Works

The Be size allows more than the Bc size to be sent during a time interval under certain conditions. Therefore, DTS provides two types of shape commands: average and peak. When shape average is configured, the interface sends no more than the Bc size for each interval, achieving an average rate no higher than the CIR. When the shape peak command is configured, the interface sends Bc plus Be bits in each interval.

So which one is correct. I am really confused.

As far as I am aware, I am running CB Shaping and not DTS, but when I go into the router configurations I get both options.

average and peak ?

Please see example :-

Metro2(config)#policy-map test1_cos

Metro2(config-pmap)#class class-default

Metro2(config-pmap-c)#shap ?

adaptive Enable Traffic Shaping adaptation to BECN

average configure token bucket: CIR (bps) [Bc (bits) [Be (bits)]],

send out Bc only per interval

fecn-adapt Enable Traffic Shaping reflection of FECN as BECN

fr-voice-adapt Enable rate adjustment depending on voice presence

max-buffers Set Maximum Buffer Limit

peak configure token bucket: CIR (bps) [Bc (bits) [Be (bits)]],

send out Bc+Be per interval

Many kind regards and thx for the help with this :)

Ken

Silver

Re: QoS Class-Based Traffic Shaping (what is Be)

When u use average option u can send only Bc per interval.Unlike peak option it won't send Bc+Be per interval. But Whenever less than the burst size is sent during an interval, the remaining number of bits, up to the Be size, can be used to send more than the burst size in a later interval.

When u use peak option u can send Bc+Be per interval. Sending in peak rate may result in dropping during the time-period of congenstion.

I hope this will clear ur doubt.

New Member

Re: QoS Class-Based Traffic Shaping (what is Be)

it does many thanks. - thats great :))

so you can only send Bc in shape avg, but if you only send half of Bc in one interval, on the next interval you could send Bc plus the extra bits (that you did not use in the last interval) to make the shaper hit the target rate?

Thats what you are saying right?

Also, when you say later interval, do you mean next interval

Best regards,

Ken

New Member

Re: QoS Class-Based Traffic Shaping (what is Be)

Guys,

I suppose what I am saying is.

I am using the CB shaping average command

policy-map test1_cos

class class-default

shape average 128000

So does this mean that I WILL NEVER use Be even though it shows in the output in the policy-map

The only way I would ever use Be with CB shaping would be with the shape peak command

And then the shape peak command is Bc + Be that could potentially be sent in one time interval (dependant on the last interval not acheiving its max rate for Bc)

If someone could clarify that these statements are correct, there is many truck loads of BEER for them :)

Kind regards,

Ken

New Member

Re: QoS Class-Based Traffic Shaping (what is Be)

Hi Ken

as the others mentioned there are two ways of shaping, average and peak. You can give 3 options to each of them, first the mean-reat (cir), then the bc (burst-commited) and the be (burst-excess) size. Each time intervall the interface may send bc, no mater if you shape to peak or to average. With be it is a bit different, if you shape to peak, it can also send each intervall the be size, so shape peak means sending each tc (time intervall) be+bc.

Shape average is a little different. You have to think of shaping as a system of token buckets, which get some new tokens each tc, the bc bucket gets full each tc, and if it is not used fully, and it gets refueled the next tc, the tokens overflowing are flowing into the be bucket, so the next tc, it may send bc plus what is in the be bucket.

So actually the only differenc in shaping to average or peak is the way that the be bucket gets refueled, either by getting refueled completly each tc (peak) or by getting what overflows be (avarage).

By the way, if you don't specify the be or bc value, IOS does it for yourself. At speeds lower then 320 kbps it always asumes bc=8000bits, at higher speeds it uses a tc of 0.025 seconds to calculate bc (be is always asumed as the same size of bc). So you see, you can adjust the tc intervall by changing the be because tc=bc/CIR!

There is a extremly good book about that on Cisco Press, "CISCO QOS Exam Certification Guide 2nd Editon", which explains all the shaping and policing concepts in a very understandable way.

Hope that clarifies your questions a bit.

Simon

New Member

Re: QoS Class-Based Traffic Shaping (what is Be)

Simon,

WOW I am off to buy this book. That is a brilliant way of putting it Simon - Thx

Many thx to youj and all for the help :))

beers in the post!

1123
Views
0
Helpful
8
Replies
CreatePlease login to create content