Control Plane Policing (CoPP) Configuration in Cisco IOS

As per Cisco website definition:

Control Plane Policing (CoPP) is a Cisco IOS-wide feature designed to allow users to manage the flow of traffic handled by the route processor of their network devices. CoPP is designed to prevent unnecessary traffic from overwhelming the route processor that, if left unabated, could affect system performance.
Here’s a sample configuration in applying CoPP.
Step1: Create necessary ACLs
a. Important services,e.g.NTP,SSH,SNMP
ip access-list extended SSH-ACL
 permit tcp host any eq 22
 permit tcp host any eq 22
 deny   tcp any any eq 22
ip access-list standard SNMP-ACL
ip access-list standard NTP-ACL
ip access-list extended ICMP-ACL
  permit icmp any any echo
  permit icmp any any echo-reply
  permit icmp any any ttl-exceeded
  permit icmp any any port-unreachable
c. IGP
ip access-list extended IGP-ACL
  permit ospf any any
  permit tcp eq bgp
  permit tcp eq bgp
d. Those harmful services or traffic
ip access-list extended HARMFUL-ACL
 permit tcp any any fragments
 permit udp any any fragments
 permit icmp any any fragments
 permit ip any any fragments
 permit udp any any range netbios-ns netbios-ss
 permit tcp any any eq 445
 permit udp any any eq 445
 permit udp any any eq 1434
 permit tcp any any range 137 139
e. All traffic
ip access-list extended ALL-ACL
 permit pim any any
 permit igmp any any
 permit icmp any any
 permit gre any any
 permit tcp any any
 permit udp any any
 permit ip any any
Step2: Configure Class Map
class-map match-any CoPP-SSH-SNMP-NTP
 match access-group name SSH-ACL
 match access-group name SNMP-ACL
 match access-group name NTP-ACL
class-map match-all CoPP-ICMP
 match access-group name ICMP-ACL
class-map match-all CoPP-IGP
 match access-group name IGP-ACL
class-map match-all CoPP-HARMFUL
 match access-group name HARMFUL-ACL
class-map match-all CoPP-ALL
 match access-group name ALL-ACL
Step3:Configure Policy Map (conform and exceed-action can be transmit or drop)
 police  [Target Bit Rate] [burst bytes] [burst bytes] [burst bytes] [conform-action] [transmit/drop]  [exceed-action] [transmit/drop]
 police  [cir]  [Target Bit Rate]  [conform burst] [burst bytes] [excess burst] [burst bytes] [conform-action] [transmit/drop]  [exceed-action] [transmit/drop]
Assumption: 5% excess burst
policy-map CoPP
  police 200000 10000 10000 conform-action transmit  exceed-action transmit
class CoPP-ICMP
  police 200000 10000 10000  conform-action transmit  exceed-action transmit
 class CoPP-IGP
  police 500000 25000 25000 conform-action transmit  exceed-action transmit
  police cir 40000 bc 2000 be 2000 conform-action transmit  exceed-action drop
 class CoPP-ALL
  police 300000 15000 15000 conform-action transmit  exceed-action transmit
For CoPP Best Practices,you can refer to this official Cisco documentation –>  Cisco CoPP Best Practices

Be First to Comment

Leave a Reply