Bandwidth Restrict per port in cisco WS-3750G-12S-12

Answered Question
Dec 14th, 2009

Dear Experts,

I have cisco WS-3750G-12S-12 Switch 12 SFP port at present working fine connect with router.

Switch port 1 as a trunk port from Router.

Switch port 2 , 3 and 4 connect with different customers with Same VLAN (2).

Now we need to bandwitdh restrict per port in cisco 3750G switch as per their required bandwidth.

switch port 2 customer required bandwith 2 MB maximum
switch port 3 customers required bandwith 1 mb maximum
swtich port 4 customers required bandwith 1.5 mb maximum

I know that is possible to rescrict bandwith to router subinterface but i need to bandwith restrict per port in cisco 3750G switch
cause they have only single ip address.

So please what is the exact configuration commands in global mode to restrict above mention  bandwith per port.

what is the configuration command in global mode and what is command to apply on interface.

I request you to all please give me templates exactly of 2mb bandwidth 1mb bandwith and 1.5 mb bandwith command in global mode.

Thanks in ADV,

Vaib...

I have this problem too.
0 votes
Correct Answer by vvasisth about 7 years 1 month ago

Rate limiting is not supported by 3750,  but 'policing' is, which is what looks like you need to do.

1 ) you can configure policer to do input rate-limiting.

Below is the step by step configuration

1.Example below shows how to create an aggregate policer and attach it to multiple classes within a policy map. In the configuration, the IP ACLs permit traffic from network
10.1.0.0 and from host 11.3.1.1. For traffic coming from network 10.1.0.0, the DSCP in the incoming packets is trusted.  For traffic coming from host 11.3.1.1, the DSCP in the
packet is changed to 56. The traffic rate from the 10.1.0.0 network and from host 11.3.1.1 is policed. If the traffic exceeds an average rate of 48000 bps and a normal burst size of
8000 bytes, its DSCP is marked down (based on the policed-DSCP map) and sent. The policy map can only be attached to an interface as ingress.

Switch(config)# access-list 1 permit 10.1.0.0 0.0.255.255
Switch(config)# access-list 2 permit 11.3.1.1
Switch(config)# mls qos aggregate-police transmit1 48000 8000 exceed-action
policed-dscp-transmit
Switch(config)# class-map ipclass1
Switch(config-cmap)# match access-group 1
Switch(config-cmap)# exit
Switch(config)# class-map ipclass2
Switch(config-cmap)# match access-group 2
Switch(config-cmap)# exit
Switch(config)# policy-map aggflow1
Switch(config-pmap)# class ipclass1
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police aggregate transmit1
Switch(config-pmap-c)# exit
Switch(config-pmap)# class ipclass2
Switch(config-pmap-c)# set ip dscp 56
Switch(config-pmap-c)# police aggregate transmit1
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# interface gigabitethernet2/0/1
Switch(config-if)# service-policy input aggflow1
Switch(config-if)# exit

Please use the follow link to understand the concepts in detail.


http://www.cisco.com/univercd/cc/td/doc/product/lan/cat3750/12119ea1/3750scg/swqos.htm#94135

Hope this helps.

regards,
Varun

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
vvasisth Tue, 12/15/2009 - 03:07

if you want to limit bandwidth per port basis on 3750 refer to the link given below :-

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

Specify the percentage of the port speed to which the port should be limited. The range is 10 to 90. By default, the port is not rate limited and is set to 100 percent.

Hope that helps.

regards,

Varun

csawest.dc Tue, 12/15/2009 - 03:39

Dear Varun,

Thanks for your gr8 support,

but i have one confusion about that so pl i request you to clear it.

our customer required only 2 Mb but my Switch is GigaEthernet so how many perfentage bind or set on this interface.

my Switch port giga port means 1000 mb and our customer required only 2 mb and anather customer required 1 mb only so how can i set it.

what is the command to set in global mode and on interface also.

Thanks in ADV,

Vaib...

vvasisth Tue, 12/15/2009 - 04:12

hi thats a drawback or you can call limitation on a switch.

you can only apply this in % so you need to calculate the % according to the requirement it wont be exactly the no you are looking for but thats the closest you can get

Hope that helps

regards

Varun

csawest.dc Tue, 12/15/2009 - 04:47

Dear Varun,

when i try to configure on interface srr-queue bandwidth limit from 10 -90 % only in giga port so i think there is no possible to set 2 mb or 1.5 mb bandwitfh

in this cisco 3750G switch, through (srr-queue).

What is the alternat solution to set bandwidth restrict per port like QOS through or any other option ??

Please suggest me cause it's URGENT.

Thanks once again!!!

Vaib...

Correct Answer
vvasisth Tue, 12/15/2009 - 04:53

Rate limiting is not supported by 3750,  but 'policing' is, which is what looks like you need to do.

1 ) you can configure policer to do input rate-limiting.

Below is the step by step configuration

1.Example below shows how to create an aggregate policer and attach it to multiple classes within a policy map. In the configuration, the IP ACLs permit traffic from network
10.1.0.0 and from host 11.3.1.1. For traffic coming from network 10.1.0.0, the DSCP in the incoming packets is trusted.  For traffic coming from host 11.3.1.1, the DSCP in the
packet is changed to 56. The traffic rate from the 10.1.0.0 network and from host 11.3.1.1 is policed. If the traffic exceeds an average rate of 48000 bps and a normal burst size of
8000 bytes, its DSCP is marked down (based on the policed-DSCP map) and sent. The policy map can only be attached to an interface as ingress.

Switch(config)# access-list 1 permit 10.1.0.0 0.0.255.255
Switch(config)# access-list 2 permit 11.3.1.1
Switch(config)# mls qos aggregate-police transmit1 48000 8000 exceed-action
policed-dscp-transmit
Switch(config)# class-map ipclass1
Switch(config-cmap)# match access-group 1
Switch(config-cmap)# exit
Switch(config)# class-map ipclass2
Switch(config-cmap)# match access-group 2
Switch(config-cmap)# exit
Switch(config)# policy-map aggflow1
Switch(config-pmap)# class ipclass1
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police aggregate transmit1
Switch(config-pmap-c)# exit
Switch(config-pmap)# class ipclass2
Switch(config-pmap-c)# set ip dscp 56
Switch(config-pmap-c)# police aggregate transmit1
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# interface gigabitethernet2/0/1
Switch(config-if)# service-policy input aggflow1
Switch(config-if)# exit

Please use the follow link to understand the concepts in detail.


http://www.cisco.com/univercd/cc/td/doc/product/lan/cat3750/12119ea1/3750scg/swqos.htm#94135

Hope this helps.

regards,
Varun

csawest.dc Tue, 12/15/2009 - 23:07

Dear Varun,

Thank you very much for your good support to me.

now only for confirmation i made configuration templates for our one customer, they are required only 2 mb bandwidth ok.

our network 111.235.72.0/22 means their IP 111.235.72.34 customer name "modest"

Pl check bellow configuration templates it is right or need to any changes ??

Switch(config)# access-list 1 permit 111.235.72.0 0.0.3.255
Switch(config)# access-list 2 permit 111.235.72.34
Switch(config)# mls qos aggregate-police modest 2096000 64000 exceed-action
policed-dscp-transmit
Switch(config)# class-map ipclass1
Switch(config-cmap)# match access-group 1
Switch(config-cmap)# exit
Switch(config)# class-map modest1
Switch(config-cmap)# match access-group 2
Switch(config-cmap)# exit
Switch(config)# policy-map modest-aggflow1
Switch(config-pmap)# class ipclass1
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police aggregate modest
Switch(config-pmap-c)# exit
Switch(config-pmap)# class modest1
Switch(config-pmap-c)# set ip dscp 56
Switch(config-pmap-c)# police aggregate modest
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# interface gigabitethernet2/0/1
Switch(config-if)# service-policy input modest-aggflow1
Switch(config-if)# exit

Please guide me this above configuation templates for user modest it is right for 2mb bandwidth restrict their port. ??

Thanks in adv,

Vaib...

csawest.dc Wed, 12/16/2009 - 22:22

Dear Varun,

Please I request you to check my above configuration of Bandwidth resctrict per port as per your guidline.

I made bellow templates is it right ?? or need to do any changes afater your confirmation i will apply in my switch.

Pl i am waiting for your reply...

our network 111.235.72.0/22 means their single IP 111.235.72.34 subnet 255.255.255.0 Gateway 111.235.72.1 customer name "modest"

Pl check bellow configuration templates it is right or need to any changes ??

Switch(config)# access-list 1 permit 111.235.72.0 0.0.3.255
Switch(config)# access-list 2 permit 111.235.72.34
Switch(config)# mls qos aggregate-police modest 2096000 64000 exceed-action
policed-dscp-transmit
Switch(config)# class-map ipclass1
Switch(config-cmap)# match access-group 1
Switch(config-cmap)# exit
Switch(config)# class-map modest1
Switch(config-cmap)# match access-group 2
Switch(config-cmap)# exit
Switch(config)# policy-map modest-aggflow1
Switch(config-pmap)# class ipclass1
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police aggregate modest
Switch(config-pmap-c)# exit
Switch(config-pmap)# class modest1
Switch(config-pmap-c)# set ip dscp 56
Switch(config-pmap-c)# police aggregate modest
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# interface gigabitethernet2/0/1
Switch(config-if)# service-policy input modest-aggflow1
Switch(config-if)# exit

Please guide me this above configuation templates for user modest it is right for 2mb bandwidth restrict their port. ??

Thanks in adv,

Vaib...

vvasisth Wed, 12/16/2009 - 22:35

ohh i thought i replied to this one but i guess i missed on this. I have a brief look at the config and it looked fine to me.

try to apply this in the lab and check if you get what you are looking for .

Let me know if you have any issues.

Regards,

Varun

csawest.dc Wed, 12/16/2009 - 23:36

Dear Varun,

Ok varun thanks for your confirmation i will try to do this and then let you know what happend.

Thanks once again...

Regards,

Vaib...

csawest.dc Sat, 03/27/2010 - 08:25

Dear Varun ,

I have configured in 3750G 12S-12 switch, please see as bellow , but it's not work , bandwidth not restrict which is i have to conigrue and apply on interface .

Switch(config)# access-list 1 permit 111.235.72.0 0.0.3.255
Switch(config)# access-list 2 permit 111.235.72.34
Switch(config)# mls qos aggregate-police modest 512000 64000 exceed-action
policed-dscp-transmit
Switch(config)# class-map ipclass1
Switch(config-cmap)# match access-group 1
Switch(config-cmap)# exit
Switch(config)# class-map modest1
Switch(config-cmap)# match access-group 2
Switch(config-cmap)# exit
Switch(config)# policy-map modest-aggflow1
Switch(config-pmap)# class ipclass1
Switch(config-pmap-c)# trust dscp
Switch(config-pmap-c)# police aggregate modest
Switch(config-pmap-c)# exit
Switch(config-pmap)# class modest1
Switch(config-pmap-c)# set ip dscp 56
Switch(config-pmap-c)# police aggregate modest
Switch(config-pmap-c)# exit
Switch(config-pmap)# exit
Switch(config)# interface gigabitethernet2/0/1
Switch(config-if)# service-policy input modest-aggflow1
Switch(config-if)# exit

But it's not work bandwidth not restrict on interface .

So please give me soluction how can i resctrict per port in 3750G switch.

Thanks in ADV.

Vaib...

Joseph W. Doherty Tue, 12/20/2016 - 06:03

You might, but also note, Cisco documents the bandwidth limit command isn't exact.

Usage Guidelines

If you configure this command to 80 percent, the port is idle 20 percent of the time. The line rate drops to 80 percent of the connected speed. These values are not exact because the hardware adjusts the line rate in increments of six.

Actions

This Discussion