cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1659
Views
28
Helpful
35
Replies

Limit the bandwitch

Tauer Drumond
Level 1
Level 1

Hi all,

I have a 2801 router.

I have a 34MB link from ISP plugged at my interface f0/1, but I would like to use only 12MB. Can I restrict the bandwitch on the router?

Thanks

Tauer

35 Replies 35

paolo bevilacqua
Hall of Fame
Hall of Fame

Do you want to restrict input, output or both bandwidth ?

I want to restrict both. The port cant flow more than 12MB.

Under interface going to ISP, configure "traffic-shape rate 12000000". Do the same under interface connected internal things.

Note a 2801 properly configured should be able to handle a lot than more 12 mbps bidirectional.

Hope this helps, please rate post if it does!

Pravin Phadte
Level 5
Level 5

Hi,

Rate-limit

confg t

int fa0/1

rate-limit input 12000000 1400000 1400000 conform-action transmit exceed-action drop

rate-limit output 12000000 1400000 1400000 conform-action transmit exceed-action drop

Hope this helps

Regards,

Pravin

Hi Pravin,

can you explain all the commands?

I also have a 2950 between the router and ISP. Can I restrict on it?

The commands will do shaping on the traffic, you can check in the documentation.

On the switch there are "srr-rate" commands however I do reccomend you use the router exclusively to limit bandwidth, as it is more flexible. For example, you can limit all employees to 2 mbps, but the boss only has no limitation.

Hi,

The rate-limit will not work on 2950. For this there is one more commnad which helps but not as rate-limit.

"srr-queue"

Below is linkt to the doc which may help.

http://www.cisco.com/en/US/docs/switches/lan/catalyst2960/software/release/12.2_44_se/configuration/guide/swqos.html

For rate limit commnad.

The 3 values are 1st one for

bps : -Average rate in bits per second. The value must be in increments of

8 kbps. It is measured in bits.

burst-normal:Normal burst size in bytes. The minimum value is bps divided by 2000.

burst-max: Excess burst size in bytes.

The above example is a rough figure but should work right for 12 Mb as requested.

Below is a link which explains more on rate-limit.

http://www.cisco.com/en/US/docs/ios/12_0/qos/command/reference/qrcmdr.html#wp1017761

Hope this helps

Regards,

Pravin

I do not recommend to use rate limit as suggested above because it has adverse effects on tcp performances.

Hi paolo,

I have been using this in lot of sites and never found any performance issuie. I would also add that this were not for much cricital sites but still the router was running clean and also the interface with the limit on them.

If possible can you explain about the tcp performance issue ?

Regards,

Pravin

With rate limit and no buffer, any bandwidth excess (normal burst) is cut abruptly and leads to retransmission, consequently waste of bandwidth, and it makes impossible for TCP to work properly. It is like having a WAN circuit without packet queuing (bad thing). This effect is largely documented in networking papers.

Traffic shaping instead buffers excess traffic ,to send it when possible.

You can compare with tcperf between the two options and see the difference.

So... Do u advice me to use "traffic-shape" instead "rate limit"? Or can I test both to see what fit better on my netowrk?

As said above, I recommend traffic-shape. If you have proper equipment and time, you can of course test both methods.

As a recognition to those providing naswers, please rate useful posts!

Thanks you all.

The answers clarified me so much.

Tauer

I too would normally recommend a shaper over a policer, but that's more due to the fact that shapers often seem to implement WFQ where policers mimic single queue FIFO. Also, with policers, to really optimally use them, you need to understand how to tune the interval or burst sizes.

That said, there are situations where you'll be forced to use a policer. For instance, assume you want to have an aggregate bandwidth limit for multiple output interfaces, might be accomplished with an inbound interface policer (if only one inbound source interface) or with an aggregate policer (supported on some L3 switches).

In your case, the ideal might be an outbound shaper on both your router with the connection to the ISP, and on the ISP's outbound to you. (If the ISP won't limit bandwidth to you, then there's the question of why restrict it after you've already received if. If the ISP has tiered rates, restricting bandwidth after it's been delivered to you from the ISP is likely to have already been charged against your usage.)

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco