Cisco 881 – How to Limit Bandwidth for IP, Subnet, or VLAN

bandwidthciscorouter

I have a router with several workstations running on the switched ports. I need to limit their WAN bandwidth. I tried to use rate-limit on Vlan1, but it looks like it had no effect. What is the easiest way to achieve this? I am not very good at Cisco configuration.

IOS image: c800-universalk9-mz.SPA.154-3.M.bin

Best Answer

There are several ways to limit bandwidth on a Cisco Router and i'll try to mention most of the options below. My example shows how to limit FastEthernet0 to 7 Mbit.

The interface has a 100Mb/s bidirectional communication maximum. You can take that down to 10Mb/s at the physical/electrical level by setting the speed to 10Mb/s, using:

interface fa0
 speed 10

Of course, that is not what you want, but i just wanted to mention it. Please be advised, that many bandwidth shapers are outbound only.

Option 1 CAR (committed access rate)

interface FastEthernet0
 no ip address
 rate-limit input 7000000 3500 3500 conform-action transmit exceed-action drop
 rate-limit output 7000000 3500 3500 conform-action transmit exceed-action drop

Option 2 (Policing via MQC)

I would recommend using MQC, as this is hardware only and very effective.

policy-map POLICEALL
 class class-default
   police rate 7000000

interface FastEthernet0
 service-policy input POLICEALL
 service-policy output POLICEALL

Option 3 (Generic Traffic Shaping--less draconian, but outbound only)

interface FastEthernet0
 traffic-shape rate 7000000 175000 175000 1000

Option 4 (mqc based traffic shaping--less draconian, but outbound only)

policy-map SHAPEALL
 class class-default
  shape average 7000000

interface fa0
 service-policy output SHAPEALL