Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I limit the bandwidth on a Cisco 3550 switch?

Status
Not open for further replies.

Thunderum

IS-IT--Management
Jul 15, 2010
5
US
Hello,

I need to limit the bandwidth (up and down) on a Cisco 3550 switch to 2 Mbps on some of the ports and 3Mbps on some other ports.

I used below configuration on a port that supposed to get 3 Mbps up and down, but I'm getting 1.7 Mbps download and 0.61 Mbps upload which is not anything close to my configuration bandwidth limit.

I tried this several times and I never receive the supposedly configuration bandwidth.

I appreciate any help.
Bernie

mls qos aggregate-policer 2000k 2000000 25000 exceed-action drop
mls qos aggregate-policer 3000k 3000000 25000 exceed-action drop
mls qos
!
class-map match-all traffic1
match ip dscp default cs1 cs2 cs3 cs4 cs5 cs6 cs7
!
!
policy-map traffic_2000k
class traffic1
police aggregate 2000k
!
policy-map traffic_3000k
class traffic1
police aggregate 3000k
!
!
interface FastEthernet0/1
switchport mode access
service-policy input traffic_2000k
service-policy output traffic_2000k
load-interval 30
spanning-tree portfast
!
interface FastEthernet0/2
switchport mode access
service-policy input traffic_3000k
service-policy output traffic_3000k
load-interval 30
spanning-tree portfast
 
You're probably not getting the desired speeds because you're using an aggregate policer (all interfaces with that policer will SHARE the bandwidth limit).

This example might give better results. Just apply the 2Mb policy map to each interface, and make a similar one for the 3Mb interfaces:

class-map match-all 2Mb
match any
!
!
policy-map 2Mb
class 2Mb
police 2000000 conform-action transmit exceed-action drop
!
!
!
!
!
!
!
interface FastEthernet0/0
service-policy input 2Mb
service-policy output 2Mb



CCNP, CCDP
 
Edit: Are you looking to exempt certain DSCP values, or was listing all CS values within the statement your way of "matching all"? If you want a separate class for any specific DSCP values, you can just change the match statement in that example to whatever DSCP codepoints you want to police down to 2Mb/3Mb.

CCNP, CCDP
 
Hello,

Thank you for your help.

I tried:
class-map match-all 2mb
match any

Then I received the following error:
thunder(config)#class-map match-all 2mb
thunder(config-cmap)#match any
^
% Invalid input detected at '^' marker.

So, I came up with the following configuration - it seems to be working - can you please let me know if I'm not doing this configuration correctly:

mls qos
!
class-map match-all 1.5mb
match ip dscp default
class-map match-all 5mb
match ip dscp default
class-map match-all 2mb
match ip dscp default
!
policy-map 1.5mb
class 1.5mb
police 1500000 375000 exceed-action drop
policy-map 5mb
class 5mb
police 5000000 375000 exceed-action drop
policy-map 2mb
class 2mb
police 2000000 375000 exceed-action drop
!
interface FastEthernet0/1
switchport mode dynamic desirable
service-policy input 1.5mb
service-policy output 1.5mb
!
interface FastEthernet0/2
switchport mode dynamic desirable
service-policy input 2mb
service-policy output 2mb
!
interface FastEthernet0/3
switchport mode dynamic desirable
service-policy input 5mb
service-policy output 5mb
!

I appreciate any help,
Bernie

 
It looks fine, as long as no traffic is getting marked with DSCP values other than the default (since any markings would make a packet exempt from the service policy).

I'm actually surprised it doesn't support "match any", but a better workaround may be "match ip dscp 0 63" which will match all traffic too, or just make an ACL with a "permit ip any any" line and match against that. That is, assuming you don't want to ever exempt some traffic types from the cap.

CCNP, CCDP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top