First, network description
The PC1 is connected to the Cisco3550 F0/1 and the rate is 100M;
CISCO3550 's G0/1 for export.
Second, the detailed configuration process
Note: This configuration: Improve the reprint of some of the incorrect configuration.
Each interface supports only one policy in each direction, and one policy can be used for multiple interfaces. Therefore, the download rate limit for all PCs should be defined in the same policy (in this case, Policy-map User-down), while the difference between PC rates is defined separately in Class-map.
1, on the switch to start QoS
Switch (config) #mls QoS//Start QoS on the switch
2. Define PC1 (10.10.10.1) Access Control List
Switch (config) #access-list permit 10.10.10.0 0.0.0.255//control PC1 uplink traffic
Switch (config) #access-list permit ip any 10.10.10.0 0.0.0.255//control PC1 downlink Traffic
3. Define the class and bind to the Access control list defined above
Switch (config) # Class-map user1-up//define PC1 Uplink class, and bind access list 10
Switch (config-cmap) # match Access-group 10
Switch (Config-cmap) # exit
Switch (config) # Class-map User1-down
Switch (config-cmap) # match Access-group 100//define PC1 downlink class, and bind access list 100
Switch (Config-cmap) # exit
4, define the policy, bind the class defined above to the policy
Switch (config) # Policy-map user1-up//define PC1 upstream rate of 100M
Switch (CONFIG-PMAP) # class user1-up
Switch (config-pmap-c) # Trust DSCP
Switch (config-pmap-c) # Police 102400000 (rate) 1024000 (equivalent to cache) exceed-action drop
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/Network/jhjs/
Switch (config) # Policy-map User-down
Switch (CONFIG-PMAP) # class User1-down defines the PC1 upstream rate of 100M
Switch (config-pmap-c) # Trust DSCP
Switch (config-pmap-c) # Police 102400000 (rate) 1024000 (equivalent to cache) exceed-action drop
Switch (config-pmap-c) # exit
5, the application of the strategy on the interface
Switch (config) # interface F0/1
Switch (config-if) # Service-policy input user1-up
Switch (config) # interface G0/1
Switch (config-if) # Service-policy input User-down
Iii.. Examples:
Server speed limit uplink and down behavior for IP 125.91.9.* 100M
MLS QoS (QoS enabled)
Access-list Permit host 125.91.9.* (Access list 10)
Access-list permit IP any host 125.91.9.* (Access list 100)
Class-map user1-up (Define upstream class and bind ACL)
Match Access-group 10
Exit
Class-map User1-down (Define downlink class and bind ACL)
Match Access-group 100
Exit
Policy-map user1-up (defined upstream rate is 100M)
Class user1-up
Trust DSCP
Police 102400000 2000000 exceed-action drop (the first digit represents the rate, the second number is similar to the cache)
Exit
Policy-map user-down (defined downlink rate is 100M)
Class User1-down
Trust DSCP
Police 102400000 2000000 exceed-action drop (the first digit represents the rate, the second number is similar to the cache)
Exit
int FA 0/21 (Application strategy under Interface)
Service-policy input user1-up
No shut
int g 0/2 (apply policy under Interface)
Service-policy input User-down
No shut