Control Plane Policing Copp
Control Plane Policing Copp
Note • For complete syntax and usage information for the commands used in this chapter, see these
publications:
http://www.cisco.com/en/US/products/ps11846/prod_command_reference_list.html
• For more information about CoPP, see this document:
http://www.cisco.com/en/US/prod/collateral/switches/ps5718/ps708/white_paper_c11-663623.html
• Cisco IOS Release 15.3SY supports only Ethernet interfaces. Cisco IOS Release 15.3SY does not
support any WAN features or commands.
Tip For additional information about Cisco Catalyst 6500 Series Switches (including configuration examples
and troubleshooting information), see the documents listed on this page:
http://www.cisco.com/en/US/products/hw/switches/ps708/tsd_products_support_series_home.html
Participate in the Technical Documentation Ideas forum
• When defining the service policy, the police policy-map action is the only supported action.
• When applying the service policy to the control plane, the input direction is only supported.
Note The default policer rate for the MLD and IGMP classes has been updated to 5000 pps from the previous
default value of 10000 pps. If the default policer rate for the MLD and IGMP classes is not set to 5000
pps, change the value manually by running the no policy-map policy-default-autocopp and platform
qos auto-copp commands in global configuration mode.
Configuring CoPP
To configure CoPP, perform this task:
Command Purpose
Step 1 Router(config)# ip access-list extended Creates an extended ACL.
access_list_name
Note You must configure ACLs in most cases to
identify the important or unimportant traffic.
Step 2 Router(config-ext-nacl)# {permit | deny} protocol Configures filtering in the ACL:
source source_wildcard destination
destination_wildcard [precedence precedence] • permit sets the conditions under which a packet
[tos tos] [established] [log | log-input] passes a named IP access list.
[time-range time_range_name] [fragments]
• deny sets the conditions under which a packet does
not pass a named IP access list.
Step 3 Router(config)# class-map traffic_class_name Creates a class map.
Step 4 Router(config-cmap)# match {ip precedence | Configures matching in the class map.
ip dscp | access_group}
Step 5 Router(config)# policy-map service-policy-name Defines a service policy map.
Step 6 Router(config-pmap)# class traffic_class_name Creates a policy map class.
Command Purpose
Step 7 Router(config-pmap-c)# police bits_per_second Configures policing in the service policy map. You can
[normal_burst_bytes [maximum_burst_bytes]] configure any of the following:
[pir peak_rate_bps]
[[[conform-action selected_action] • Byte-based policing.
exceed-action selected_action]
violate-action selected_action] • Packet-based policing.
• Flow-based policing.
Router(config-pmap-c)# police rate units bps
[burst burst_bytes bytes] [peak-rate See the “Configuring Policy Map Class Policing” section
peak_rate_bps bps] [peak-burst peak_burst_bytes on page 62-11.
bytes] [conform-action selected_action]
[exceed-action selected_action]
[violate-action selected_action]
• Interior Gateway Protocol (IGP)—Traffic that is crucial to maintaining IGP routing protocols, for
example, open shortest path first OSPF, enhanced interior gateway routing protocol (EIGRP), and
routing information protocol (RIP). Maintaining IGP routing protocols is crucial to maintaining
connectivity within a network.
• Management—Necessary, frequently used traffic that is required during day-to-day operations. For
example, traffic used for remote network access, and Cisco IOS image upgrades and management,
such as Telnet, secure shell (SSH), network time protocol (NTP), simple network management
protocol (SNMP), terminal access controller access control system (TACACS), hypertext transfer
protocol (HTTP), trivial file transfer protocol (TFTP), and file transfer protocol (FTP).
• Reporting—Traffic used for generating network performance statistics for the purpose of reporting.
For example, using Cisco IOS IP service level agreements (SLAs) to generate ICMP with different
DSCP settings in order to report on response times within different QoS data classes.
• Monitoring—Traffic used for monitoring a switch. Traffic should be permitted but should never be
a risk to the switch; with CoPP, this traffic can be permitted but limited to a low rate. For example,
ICMP echo request (ping) and traceroute.
• Critical Applications—Critical application traffic that is specific and crucial to a particular customer
environment. Traffic included in this class should be tailored specifically to the required application
requirements of the user (in other words, one customer may use multicast, while another uses IPsec
or generic routing encapsulation (GRE). For example, GRE, hot standby router protocol (HSRP),
virtual router redundancy protocol (VRRP), session initiation protocol (SIP), data link switching
(DLSw), dynamic host configuration protocol (DHCP), multicast source discovery protocol
(MSDP), Internet group management protocol (IGMP), protocol independent multicast (PIM),
multicast traffic, and IPsec.
• Layer 2 Protocols—Traffic used for address resolution protocol (ARP). Excessive ARP packets can
potentially monopolize RP resources, starving other important processes; CoPP can be used to rate
limit ARP packets to prevent this situation. ARP is the only Layer 2 protocol that can be specifically
classified using the match protocol classification criteria.
• Undesirable—Explicitly identifies bad or malicious traffic that should be unconditionally dropped
and denied access to the RP. The undesirable classification is particularly useful when known traffic
destined for the switch should always be denied and not placed into a default category. If you
explicitly deny traffic, then you can enter show commands to collect approximate statistics on the
denied traffic and estimate its rate.
• Default—All remaining traffic destined for the RP that has not been identified. MQC provides the
default class, so the user can specify the treatment to be applied to traffic not explicitly identified in
the other user-defined classes. This traffic has a highly reduced rate of access to the RP. With a
default classification in place, statistics can be monitored to determine the rate of otherwise
unidentified traffic destined for the control plane. After this traffic is identified, further analysis can
be performed to classify it and, if needed, the other CoPP policy entries can be updated to
accomodate this traffic.
After you have classified the traffic, the ACLs build the classes of traffic that are used to define the
policies. For sample basic ACLs for CoPP classification, see the “Sample Basic ACLs for CoPP Traffic
Classification” section on page 76-8.
• You do not have to define policies that match bidirectionally. You only need to identify traffic
unidirectionally (from the network to the RP) since the policy is applied on ingress only.
This example shows how to allow BGP from a known peer to this switch’s BGP TCP port:
Router(config)# access-list 120 permit tcp host 47.1.1.1 host 10.9.9.9 eq bgp
This example shows how to allow BGP from a peer’s BGP port to this switch:
Router(config)# access-list 120 permit tcp host 47.1.1.1 eq bgp host 10.9.9.9
Router(config)# access-list 120 permit tcp host 10.86.183.120 host 10.9.9.9 eq bgp
Router(config)# access-list 120 permit tcp host 10.86.183.120 eq bgp host 10.9.9.9
This example shows how to define ACL 121 for the important class:
Router(config)# access-list 121 remark CoPP Important traffic
This example shows how to permit return traffic from TACACS host:
Router(config)# access-list 121 permit tcp host 1.1.1.1 host 10.9.9.9 established
This example shows how to permit SSH access to the switch from a subnet:
Router(config)# access-list 121 permit tcp 10.0.0.0 0.0.0.255 host 10.9.9.9 eq 22
This example shows how to allow full access for Telnet to the switch from a host in a specific subnet and
police the rest of the subnet:
Router(config)# access-list 121 deny tcp host 10.86.183.3 any eq telnet
Router(config)# access-list 121 permit tcp 10.86.183.0 0.0.0.255 any eq telnet
This example shows how to allow SNMP access from the NMS host to the switch:
Router(config)# access-list 121 permit udp host 1.1.1.2 host 10.9.9.9 eq snmp
This example shows how to allow the switch to receive NTP packets from a known clock source:
Router(config)# access-list 121 permit udp host 1.1.1.3 host 10.9.9.9 eq ntp
This example shows how to define ACL 122 for the normal traffic class:
Router(config)# access-list 122 remark CoPP normal traffic
This example shows how to permit receipt of responses to the switch that originated the pings:
Router(config)# access-list 122 permit icmp any any echo-reply
This example shows how to define ACL 123 for the undesirable class.
Router(config)# access-list 123 remark explicitly defined "undesirable" traffic
Note In the following example, ACL 123 is a permit entry for classification and monitoring purposes, and
traffic is dropped as a result of the CoPP policy.
This example shows how to permit all traffic destined to UDP 1434 for policing:
Router(config)# access-list 123 permit udp any any eq 1434
This example shows how to define ACL 124 for all other traffic:
Router(config)# access-list 124 remark rest of the IP traffic for CoPP
Router(config)# access-list 124 permit ip any any
Monitoring CoPP
You can enter the show policy-map control-plane command for developing site-specific policies,
monitoring statistics for the control plane policy, and troubleshooting CoPP. This command displays
dynamic information about the actual policy applied, including rate information and the number of bytes
(and packets) that conformed or exceeded the configured policies both in hardware and in software.
The output of the show policy-map control-plane command is as follows:
Router# show policy-map control-plane
Control Plane Interface
Service policy CoPP-normal
Hardware Counters:
class-map: CoPP-normal (match-all)
Match: access-group 130
police :
96000 bps 3000 limit 3000 extended limit
Earl in slot 3 :
0 bytes
5 minute offered rate 0 bps
aggregate-forwarded 0 bytes action: transmit
exceeded 0 bytes action: drop
aggregate-forward 0 bps exceed 0 bps
Earl in slot 5 :
0 bytes
5 minute offered rate 0 bps
aggregate-forwarded 0 bytes action: transmit
exceeded 0 bytes action: drop
aggregate-forward 0 bps exceed 0 bps
Software Counters:
Class-map: CoPP-normal (match-all) 0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: access-group 130
police:
96000 bps, 3125 limit, 3125 extended limit
To display the hardware counters for bytes dropped and forwarded by the policy, enter the show
platform qos ip command:
Router# show platform qos ip
QoS Summary [IP]: (* - shared aggregates, Mod - switch module)
To display the CoPP access list information, enter the show access-lists coppacl-bgp command:
Router# show access-lists coppacl-bgp
Extended IP access list coppacl-bgp
10 permit tcp host 47.1.1.1 host 10.9.9.9 eq bgp (4 matches)
20 permit tcp host 47.1.1.1 eq bgp host 10.9.9.9
30 permit tcp host 10.86.183.120 host 10.9.9.9 eq bgp (1 match)
40 permit tcp host 10.86.183.120 eq bgp host 10.9.9.9
Tip For additional information about Cisco Catalyst 6500 Series Switches (including configuration examples
and troubleshooting information), see the documents listed on this page:
http://www.cisco.com/en/US/products/hw/switches/ps708/tsd_products_support_series_home.html
Participate in the Technical Documentation Ideas forum