Configure VLAN-based Rate Limiting

Procedure

  1. In privileged EXEC mode, access global configuration mode.
    device# configure terminal
    
  2. Create the class map and access its configuration mode.
    device(config)# class-map c2
    
  3. Add a match statement to the VLAN.
    device(config-classmap)# match vlan 500
    
  4. Access global configuration mode.
    device(config-classmap)# exit
    
  5. Create the policy map and access its configuration mode.
    device(config)# policy-map p2
    
  6. Add the class map to the policy map and access the policy-class configuration mode.
    device(config-policymap)# class c2
    
  7. Configure the class map.
    device(config-policymap-class)# police cir 100000 cbs 6000
    
    This step configures the committed information rate for the class map.
  8. Access global configuration mode.
    device(config-policymap-class)# exit
    device(config-policymap)# exit
    
  9. Access interface configuration mode for the interface where you want to apply the policy map.
    device(config)# interface ethernet 1/1
    
  10. Apply the policy map to the interface.
    device(conf-if-eth-1/1)# service-policy in p2
    
  11. Access global configuration mode.
    device(conf-if-eth-1/1)# exit
    
  12. (Optional) Apply the policy map globally.
    device(config)# qos service-policy in p2

Example

The following example summarizes the commands in this procedures.

device# configure terminal
device(config)# class-map c2
device(config-classmap)# match vlan 500
device(config-classmap)# exit
device(config)# policy-map p2
device(config-policymap)# class c2
device(config-policymap-class)# police cir 100000 cbs 6000
device(config-policymap-class)# exit
device(config-policymap)# exit
device(config)# interface ethernet 1/1
device(conf-if-eth-1/1)# service-policy in p2
device(conf-if-eth-1/1)# exit
device(config)# qos service-policy in p2