In Modular Quality of Service (MQC), the statement class-map defines the name of the classes. It consists of one or more match statements that includes the classification of the packets. The keyword match supports the following items:
- Can contain access-control lists
- Can contain the IP type of service packets
- Can contain ARP protocol packets
The following steps show the configuration of CoPP:
The following commands show how to configure a control-plane policing to reduce the ARP traffic sent to Router A to 75% and to drop the Telnet traffic from Router C to Router A.
The first step is create a class-map for the ARP traffic and Telnet, then create a policy map and apply the policy map to the control plane:
RouterA(config)#class-map ARP
RouterA(config-cmap)#match protocol arp
After the creation of class-map that matches the ARP protocol, create a policy map to reduce the packets to 75% per second:
RouterA(config)#policy-map POLICY
RouterA(config-pmap)#class ARP
RouterA(config-pmap-c)#police rate ?
<1-2000000000> Rate value in the range 8000-2,000,000,000 bps or 1-2,000,000
pps
percent % of interface bandwidth for rate
RouterA(config-pmap-c)#police rate 75 pps
RouterA(config-pmap-c-police)#exit
Now the ARP protocol on RouterA is reduced to 75% packets per second.
The next step is to create an access-list to group the Telnet packets:
RouterA(config)#ip access-list extended TELNET
RouterA(config-ext-nacl)#permit tcp host 192.168.22.2 any eq telnet
RouterA(config-ext-nacl)#exit
RouterA(config)#class-map TELNET
RouterA(config-cmap)#match access-group name TELNET
RouterA(config-cmap)#exit
Then, configure policing for the TELNET class map you created:
RouterA(config-pmap)#class TELNET
RouterA(config-pmap-c)#?
QoS policy-map class configuration commands:
bandwidth Bandwidth
compression Activate Compression
drop Drop all packets
exit Exit from QoS class action configuration mode
netflow-sampler NetFlow action
RouterA(config-pmap-c)#drop
RouterA(config-pmap-c)#exit
RouterA(config-pmap)#exit
RouterA(config)#control-plane
RouterA(config-cp)#?
Control Plane configuration commands:
exit Exit from control-plane configuration mode
no Negate or set default values of a command
service-policy Configure QOS Service Policy
RouterA(config-cp)#service-policy input POLICY
RouterA(config-cp)#exit