3.3 Troubleshoot control-plane policing for management and routing protocols

ENARSI 300-410 v1.1 · 3.0 Infrastructure Security

Control-plane policing (CoPP) protects the router's CPU. Packets addressed to the router itself (routing protocols, SSH, SNMP, ICMP) are classified with ACLs and class maps, and a policy map on the control-plane polices each class to a safe rate. A wrong class or rate breaks the very protocols it should protect.

What you must know

Building a CoPP policy

ip access-list extended COPP-ROUTING
 permit ospf any any
 permit tcp any any eq bgp
 permit tcp any eq bgp any
ip access-list extended COPP-MGMT
 permit tcp 10.0.99.0 0.0.0.255 any eq 22
 permit udp 10.0.99.0 0.0.0.255 any eq snmp
ip access-list extended COPP-ICMP
 permit icmp any any
!
class-map match-all CRITICAL
 match access-group name COPP-ROUTING
class-map match-all MGMT
 match access-group name COPP-MGMT
class-map match-all ICMP
 match access-group name COPP-ICMP
!
policy-map COPP
 class CRITICAL
  police 512000 conform-action transmit exceed-action transmit
 class MGMT
  police 256000 conform-action transmit exceed-action drop
 class ICMP
  police 64000 conform-action transmit exceed-action drop
 class class-default
  police 128000 conform-action transmit exceed-action drop
!
control-plane
 service-policy input COPP

OSPF keeps working under load (1); the ping flood is cut to 64 kbit/s (2).

Troubleshooting CoPP

R1# show policy-map control-plane
 Control Plane
  Service-policy input: COPP
    Class-map: ICMP (match-all)
      18234 packets, 1823400 bytes
      5 minute offered rate 312000 bps, drop rate 248000 bps
      Match: access-group name COPP-ICMP
      police:
          cir 64000 bps, bc 2000 bytes
        conformed 2310 packets, 231000 bytes; actions:
          transmit
        exceeded 15924 packets, 1592400 bytes; actions:
          drop

Commands

show policy-map control-planePer-class counters, rates, conform and exceed actions.
show class-mapEach class and what it matches.
show access-listsHit counters on the classification ACLs.

Exam traps

Check yourself

Why does BGP need two ACL lines in the routing class?
The router can be the client (destination port 179) or the server (source port 179) of the session.
What does deny mean in an ACL used by a CoPP class map?
The packet is not in that class and goes on to the next class.
OSPF flaps after CoPP was applied. Where do you look?
show policy-map control-plane: which class matches OSPF and whether it exceeds and drops.
Does CoPP affect traffic passing through the router?
No, only traffic to the control plane.

Labs

Try it live: CoPP troubleshooting: the policy that never polices

More topics in 3.0 Infrastructure Security