Cisco 2960 3750 switch port traffic speed limit (QOS)

Source: Internet
Author: User
Tags bind exit config

Note: Each interface supports only one policy, and one policy can be used for multiple interfaces. Therefore, the download rate limit for the network segment under the port should be defined in the same policy

1. Start QoS on the switch

Switch (config) #mls QoS//Start QoS on the switch

2. Define Access Control List

Switch (config) #access-list permit 59.215.45.0 0.0.0.127

Control the upload traffic of the 59.215.45.0 network segment under this port

Switch (config) #access-list permit 59.215.45.0 0.0.0.127

Control the download traffic of the 59.215.45.0 network segment under this port

3. Define the class and bind to the Access control list defined above

Switch (config) # Class-map Rate-limit-uplink/define the upstream class. And Bind access list 10

Switch (config-cmap) # match Access-group 10

Switch (Config-cmap) # exit

Switch (config) # Class-map Rate-limit-downlink/define the Downlink class. And bind access list 100

Switch (config-cmap) # match Access-group 100

Switch (Config-cmap) # exit

4. Define the policy, bind the defined class to the policy

Switch (config) # Policy-map Rate-limit-uplink//define uplink rate of 30M

Switch (CONFIG-PMAP) # class Rate-limit-uplink

Switch (config-pmap-c) # Trust DSCP

Switch (config-pmap-c) # police 30000000 1000000 exceed-action drop//30M cannot be written 30720000

Otherwise, the following error will be reported:%error:policer rate should be multiples of 1000000.

Please choose either 3000000 or 4000000 (bits per second) as the policer rate

As for the definition of the number 100000, we'll explain it later.

Switch (config) # Policy-map Rate-limit-downlink//define the downlink rate to 30M

Switch (CONFIG-PMAP) # class Rate-limit-downlink

Switch (config-pmap-c) # Trust DSCP

Switch (config-pmap-c) # police 30000000 1000000 exceed-action drop

Switch (config-pmap-c) # exit

5. Apply on the interface

Switch (config) # interface F0/1 (the same port)

Switch (config-if) # Service-policy input Rate-limit-uplink

Interface: Users want to flow control of the port, can be Ethernet can also be serial port, but the different types of interface in the following input output on the selection of different, need to pay attention to

Input|output: This is the direction that defines the data traffic

Switch (config) # interface G0/20 (Allied port)

Switch (config-if) # Service-policy input Rate-limit-downlink

Comments:

Police bps | Burst-normal Burst-max |conform-action Action |exceed-action action

BPS: User wants the rate limit of the flow, the unit is BPS

Burst-normal Burst-max: This refers to the size of the token bucket, generally used 8000,16000,32000 these values, depending on the size of the BPS value depends.

Conform-action: The handling strategy for traffic below the rate limit.

Exceed-action: The processing strategy for traffic exceeding the rate limit.

Action: Process policies, including the following:

Transmit: Transmission

Drop: Discarding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.