First, network description
The PC1 is connected to the Cisco3550 F0/1 and the rate is 1M;
The PC1 is connected to the Cisco3550 F0/2 and the rate is 2M;
CISCO3550 's G0/1 for export.
Second, the detailed configuration process
Note: Each interface supports only one policy, and one policy can be used for multiple interfaces. So the download rate limit for all PCs should be defined in the same policy (in this example
For 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, respectively define PC1 (10.10.1.1) and PC2 (10.10.2.1) Access Control List
Switch (config) #access-list permit 10.10.1.0 0.0.0.255//control PC1 uplink traffic
Switch (config) #access-list permit any 10.10.1.0 0.0.0.255//control PC1 downlink Traffic
Switch (config) #access-list permit 10.10.2.0 0.0.0.255//control PC2 uplink traffic
Switch (config) #access-list permit any 10.10.2.0 0.0.0.255//control PC2 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 user2-up
Switch (config-cmap) # match Access-group 11//define PC2 Uplink class and bind access list 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
Switch (config) # Class-map User2-down
Switch (config-cmap) # match Access-group 111//define PC2 downlink class, and bind access list 111
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 1M
Switch (CONFIG-PMAP) # class user1-up
Switch (config-pmap-c) # Trust DSCP
Switch (config-pmap-c) # police 1024000 1024000 exceed-action drop
Switch (config) # Policy-map user2-up//define PC2 upstream rate of 2M
Switch (CONFIG-PMAP) # class user2-up
Switch (config-pmap-c) # Trust DSCP
Switch (config-pmap-c) # police 2048000 1024000 exceed-action drop
Switch (config) # Policy-map User-down
Switch (CONFIG-PMAP) # class User1-down
Switch (config-pmap-c) # Trust DSCP
Switch (config-pmap-c) # police 1024000 1024000 exceed-action drop
Switch (config-pmap-c) # exit
Switch (CONFIG-PMAP) # class User2-down
Switch (config-pmap-c) # Trust DSCP
Switch (config-pmap-c) # police 2048000 1024000 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 F0/2
Switch (config-if) # Service-policy input user2-up
Switch (config) # interface G0/1
Switch (config-if) # Service-policy input User-down