cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
470
Views
0
Helpful
7
Replies

Rate limiting at constant speed

dkorell
Level 1
Level 1

Every night we upload about 5GB of data across the Internet which takes up our entire pipe for about 6 hours. The traffic is constant so really no kind of bursting. I would like to limit this connection to a constant 1mbps without dropping packets, which I have seen in some examples of rate limiting. I have also looked at the using policy maps too but still not clear which would be the best fit.

Any advice or config examples that could accomplish this?

7 Replies 7

mohammedmahmoud
Level 11
Level 11

Hi,

In order to limit the traffic without dropping packets, then you should go for traffic shaping rather than traffic policing.

http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hqos_c/part20/qchpolsh.htm#wp1011592

http://www.cisco.com/univercd/cc/td/doc/product/software/ios124/124cg/hqos_c/part20/ch10/qsbtsovw.htm

HTH,

Mohammed Mahmoud.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Some additional notes:

It's best to shape as close to the source as possible (to minimize bandwidth utilization further downstream).

If where you apply the shaper has other traffic, you'll need to identify just the traffic you want to shape, otherwise you're likely to shape all the traffic to your configured rate.

How shaping is configured, can vary somewhat, especially between LAN and WAN devices.

Not all devices offer a shaper.

Thanks for pointing me in the right direction. After reading more on shaping, I think I have a good config. Only thing I'm not quite clear on, in my case, is to use shape average or peak. Basically, I want to give it 1mbps but let it go up to 1.5mbps if the link isn't fully utilized. Any input on this?

Thanks.

access-list 103 permit ip host x.x.x.x any

class-map Testing

match access-group 103

policy-map Shape_Traffic

class-map Testing

bandwidth 1000

shape peak 1500000

interface S0/0/0

service-policy output Shape_Traffic

Hi,

One point to add, keep in mind when you shape at Peak (you shape above your CIR rate).

when you shape at average (You shape at your CIR rate).

Some Service provider wont let you acheive this goal.

But since you did it, give it a try & check things out.

Regards,

Mohamed Sobair

"Only thing I'm not quite clear on, in my case, is to use shape average or peak."

The long term xfer rate should be the same, but peak allows some small bursts to pass without delay.

Assume you have capacity to transfer 10 Mbps. This means you can transfer 1 million bits in .1 sec but we want to limit our effective transfer rate to 1 Mbps. We might do this by also limiting a .1 sec transfer to 100,000 bits.

To transfer 300,000 bits on a 10 Mbps media shaped at 1 Mbps and using an .1 sec time interval; average shaping you allow 100,000 bits in each .1 sec. Actual transfer of each 100,000 bits only takes .01 sec, but with .09 sec delay between. With peak shaping, you allow 200,000 bit in the first .1 sec (.02 sec of the .1), none in the second .1 sec and 100,000 in the third .1 sec.

You might also want to look at: http://www.cisco.com/en/US/tech/tk543/tk545/technologies_tech_note09186a00800a3a25.shtml

"Basically, I want to give it 1mbps but let it go up to 1.5mbps if the link isn't fully utilized. Any input on this?"

Looks good.

I do worry about default class's use of FQ with other defined classes. I.e. whether the defined class's minimum bandwidth is truly guaranteed. If this is an issue, adding (if supported on your IOS version)

class class-default

bandwidth remaining percent 100

might do the trick.

Tried the bandwidth command but didn't work.

I have a packet sniffer monitoring my outgoing serial and this doesn't appear to be working as expected. Currently I have my policy map set to bandwidth 500 and peak average at 1000000. The line is currently at full utilization with traffic that's in the default map, not the one I made. But when I start generating big traffic in the map, it transmits at 1mbps.

It's my understanding that traffic in the policy map is guaranteed 500kbps and can go up to 1.5mbps if the additional bandwidth is available (which it's being used currently).

Am I off on this understanding?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: