5.2 Configure and verify ACLs and CoPP to protect the infrastructure

ENCOR 350-401 v1.2 · 5.0 Security

Infrastructure protection keeps attackers and accidents away from the devices themselves. ACLs filter traffic through and to the router (including the VTY lines), and Control Plane Policing (CoPP) rate-limits traffic that the CPU must process, so a flood cannot starve routing protocols.

What you must know

ACLs

ip access-list extended EDGE-IN
 10 deny   ip 10.0.0.0 0.255.255.255 any          ! spoofed internal sources
 20 deny   ip any 10.255.0.0 0.0.255.255         ! nothing may reach infrastructure addresses
 30 permit tcp any host 203.0.113.80 eq 443
 40 permit icmp any any echo-reply
 50 deny   ip any any log
!
interface GigabitEthernet0/0
 ip access-group EDGE-IN in

Extended ACLs go close to the source; the last line is always an implicit deny. Time-based ACLs add a time-range; object groups keep long lists readable. ACLs filter transit traffic; for traffic to the router's CPU, CoPP is the stronger tool.

Control plane policing

ip access-list extended COPP-ROUTING
 permit ospf any any
 permit tcp any any eq bgp
ip access-list extended COPP-MGMT
 permit tcp 10.0.50.0 0.0.0.255 any eq 22
 permit udp 10.0.50.0 0.0.0.255 any eq snmp
ip access-list extended COPP-ICMP
 permit icmp any any
!
class-map match-all ROUTING
 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 ROUTING
  police 1000000 conform-action transmit exceed-action transmit
 class MGMT
  police 500000 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

The flood toward the router is cut to 64 kbps (1), while routing protocol traffic is always transmitted (2). Build CoPP by observing first (all actions transmit), then tighten.

Commands

show access-listsACL lines and hit counters.
show policy-map control-planeCoPP classes with conformed and exceeded counters.
show ip interface Gi0/0ACLs applied in and out.

Exam traps

Check yourself

Where is a CoPP policy applied?
Under control-plane, with service-policy input <name>.
Why put routing protocols in their own CoPP class?
So a flood in another class cannot starve OSPF or BGP, and their packets are always transmitted.
What does an infrastructure ACL at the edge usually deny?
Spoofed internal source addresses and traffic aimed at the network devices' own addresses.

Labs

Try it live: Protect the device: AAA with TACACS+ and Control Plane Policing

More topics in 5.0 Security