Troubleshooting notes · Security

CoPP blocks SSH and telnet, and OSPF lands in class-default

After applying a control plane policing policy, management access to the router stops and the routing class counts zero packets. How CoPP classifies traffic, and why "permit tcp any any eq 89" never matches OSPF. Real output from Cisco IOS XE 17.18.

The symptom

Since a CoPP policy went on R1, the management station can't telnet to it any more (Trying 1.1.1.1 ... and nothing). The routing class counts 0 packets, so OSPF is being policed together with everything else.

How CoPP classifies

Like any MQC policy, the classes are checked in order, the first match wins, and anything unmatched goes to class-default. In a CoPP ACL, permit means "this traffic belongs to the class", not "allow it"; the action comes from the policy. A deny just means "not this class", so the packet moves on to the next one.

Cause 1: the management ACL has the wrong subnet

ip access-list extended COPP-MGMT-ACL
 permit tcp 10.0.21.0 0.0.0.3 any eq telnet
 permit tcp 10.0.21.0 0.0.0.3 any eq 22

The management subnet is 10.0.12.0/30, not 10.0.21.0. Telnet from R2 doesn't match the management class, falls into the class that drops other management traffic, and is dropped.

R1(config)# ip access-list extended COPP-MGMT-ACL
R1(config-ext-nacl)# no permit tcp 10.0.21.0 0.0.0.3 any eq telnet
R1(config-ext-nacl)# no permit tcp 10.0.21.0 0.0.0.3 any eq 22
R1(config-ext-nacl)# permit tcp 10.0.12.0 0.0.0.3 any eq telnet
R1(config-ext-nacl)# permit tcp 10.0.12.0 0.0.0.3 any eq 22

Cause 2: OSPF isn't TCP

ip access-list extended COPP-ROUTING-ACL
 permit tcp any any eq 89

OSPF is IP protocol 89, not TCP port 89. Nothing matches the routing class, so OSPF lands in class-default with all the junk traffic. In our test the adjacency stayed up, because OSPF's few packets fit under the class-default rate. But during a flood, the hellos would be dropped too, and OSPF would fail exactly when the network is under attack.

R1(config)# ip access-list extended COPP-ROUTING-ACL
R1(config-ext-nacl)# no permit tcp any any eq 89
R1(config-ext-nacl)# permit ospf any any

Check it

R1# show policy-map control-plane | include Class-map|conformed
    Class-map: COPP-ROUTING (match-all)
        conformed 4 packets, 456 bytes; actions:
    Class-map: COPP-MGMT (match-all)
        conformed 17 packets, 1041 bytes; actions:
    Class-map: COPP-MGMT-OTHER (match-all)
        conformed 13 packets, 798 bytes; actions:
    Class-map: class-default (match-any)
        conformed 142 packets, 22133 bytes; actions:

All classes now count packets. The class that drops other management traffic keeps its count from before the fix.

Dropping traffic in CoPP on IOS XE

On IOS XE 17.18, a plain drop under the class was rejected in our test (% Invalid input). When it was in the startup config, IOS silently skipped it, leaving a class with no action, which lets everything through. Use a policer that drops in both cases:

 class COPP-MGMT-OTHER
  police 8000 conform-action drop exceed-action drop

Practise this fault

This fault is in ENARSI Lab 35 of ENARSI Troubleshooting Labs: a ready-made GNS3 project where you find and fix it yourself, alongside the other faults in the ticket, with the tested solution.

Or start with 15 free labs (5 each from CCNA, ENARSI and ENCOR), by email:

We’ll email you the download links and occasional lab tips. Unsubscribe with one click, any time. Your address is never shared.