Configuring Control Plane Policing

This chapter contains the following sections:

About CoPP

Control Plane Policing (CoPP) protects the control plane and separates it from the data plane, which ensures network stability, reachability, and packet delivery.

This feature allows a policy map to be applied to the control plane. This policy map looks like a normal QoS policy and is applied to all traffic entering the switch from a non-management port. A common attack vector for network devices is the denial-of-service (DoS) attack, where excessive traffic is directed at the device interfaces.

The Cisco NX-OS device provides CoPP to prevent DoS attacks from impacting performance. Such attacks, which can be perpetrated either inadvertently or maliciously, typically involve high rates of traffic destined to the supervisor module or CPU itself.

The supervisor module divides the traffic that it manages into three functional components or planes:

Data plane
Handles all the data traffic. The basic functionality of a Cisco NX-OS device is to forward packets from one interface to another. The packets that are not meant for the switch itself are called the transit packets. These packets are handled by the data plane.
Control plane
Handles all routing protocol control traffic. These protocols, such as the Border Gateway Protocol (BGP) and the Open Shortest Path First (OSPF) Protocol, send control packets between devices. These packets are destined to router addresses and are called control plane packets.
Management plane
Runs the components meant for Cisco NX-OS device management purposes such as the command-line interface (CLI) and Simple Network Management Protocol (SNMP).

The supervisor module has both the management plane and control plane and is critical to the operation of the network. Any disruption or attacks to the supervisor module will result in serious network outages. For example, excessive traffic to the supervisor module could overload and slow down the performance of the entire Cisco NX-OS device. For example, a DoS attack on the supervisor module could generate IP traffic streams to the control plane at a very high rate, forcing the control plane to spend a large amount of time in handling these packets and preventing the control plane from processing genuine traffic.

Examples of DoS attacks include:

  • Internet Control Message Protocol (ICMP) echo requests

  • IP fragments

  • TCP SYN flooding

These attacks can impact the device performance and have the following negative effects:

  • Reduced service quality (such as poor voice, video, or critical applications traffic)

  • High route processor or switch processor CPU utilization

  • Route flaps due to loss of routing protocol updates or keepalives

  • Unstable Layer 2 topology

  • Slow or unresponsive interactive sessions with the CLI

  • Processor resource exhaustion, such as the memory and buffers

  • Indiscriminate drops of incoming packets


Caution


It is important to ensure that you protect the supervisor module from accidental or malicious attacks by configuring control plane protection.

Control Plane Protection

To protect the control plane, the Cisco NX-OS device segregates different packets destined for the control plane into different classes. Once these classes are identified, the Cisco NX-OS device polices the packets, which ensures that the supervisor module is not overwhelmed.

Control Plane Packet Types

Different types of packets can reach the control plane:

Receive packets
Packets that have the destination address of a router. The destination address can be a Layer 2 address (such as a router MAC address) or a Layer 3 address (such as the IP address of a router interface). These packets include router updates and keepalive messages. Multicast packets can also be in this category where packets are sent to multicast addresses that are used by a router.
Exception packets
Packets that need special handling by the supervisor module. For example, if a destination address is not present in the Forwarding Information Base (FIB) and results in a miss, the supervisor module sends an ICMP unreachable packet back to the sender. Another example is a packet with IP options set.
The following exceptions are possible from line cards only:
  • match exception ip option
  • match exception ipv6 option
  • match exception ttl-failure
The following exceptions are possible from fabric modules only:
  • match exception ipv6 icmp unreachable
  • match exception ip icmp unreachable
The following exceptions are possible from line cards and fabric modules:
  • match exception mtu-failure
Redirected packets
Packets that are redirected to the supervisor module.
Glean packets
If a Layer 2 MAC address for a destination IP address is not present in the FIB, the supervisor module receives the packet and sends an ARP request to the host.

All of these different packets could be maliciously used to attack the control plane and overwhelm the Cisco NX-OS device. CoPP classifies these packets to different classes and provides a mechanism to individually control the rate at which the supervisor module receives these packets.

Classification for CoPP

For effective protection, the Cisco NX-OS device classifies the packets that reach the supervisor modules to allow you to apply different rate controlling policies based on the type of the packet. For example, you might want to be less strict with a protocol packet such as Hello messages but more strict with a packet that is sent to the supervisor module because the IP option is set. You configure packet classifications and rate controlling policies using class maps and policy maps.

Rate Controlling Mechanisms

Once the packets are classified, the Cisco NX-OS device has different mechanisms to control the rate at which packets arrive at the supervisor module. Two mechanisms control the rate of traffic to the supervisor module. One is called policing and the other is called rate limiting.

Using hardware policers, you can define separate actions for traffic that conforms to or violates certain conditions. The actions can transmit the packet, mark down the packet, or drop the packet.

You can configure the following parameters for policing:

Committed information rate (CIR)
Desired bandwidth, specified as a bit rate or a percentage of the link rate.
Committed burst (BC)
Size of a traffic burst that can exceed the CIR within a given unit of time and not impact scheduling

In addition, you can set separate actions such as transmit or drop for conform and violate traffic.

For more information on policing parameters, see the Cisco Nexus 9000 Series NX-OS Quality of Service Configuration Guide.

Default Policing Policies

When you bring up your Cisco NX-OS device for the first time, the Cisco NX-OS software installs the default copp-system-p-policy-strict policy to protect the supervisor module from DoS attacks. You can set the level of protection by choosing one of the following CoPP policy options from the initial setup utility:

  • Strict—This policy is 1 rate and 2 color.

  • Moderate—This policy is 1 rate and 2 color. The important class burst size is greater than the strict policy but less than the lenient policy.

  • Lenient—This policy is 1 rate and 2 color. The important class burst size is greater than the moderate policy but less than the dense policy.

  • Dense—This policy is 1 rate and 2 color. The policer CIR values are less than the strict policy.

  • Skip—No control plane policy is applied. (Cisco does not recommend using the Skip option because it will impact the control plane of the network.)

If you do not select an option or choose not to execute the setup utility, the software applies strict policing. We recommend that you start with the strict policy and later modify the CoPP policies as required.


Note


Strict policing is not applied by default when using POAP, so you must configure a CoPP policy.


The copp-system-p-policy policy has optimized values suitable for basic device operations. You must add specific class and access-control list (ACL) rules that meet your DoS protection requirements. The default CoPP policy does not change when you upgrade the software.


Caution


Selecting the skip option and not subsequently configuring CoPP protection can leave your Cisco NX-OS device vulnerable to DoS attacks.


You can reassign the CoPP default policy by entering the setup utility again using the setup command from the CLI prompt or by using the copp profile command.

Default Class Maps - For Cisco NX-OS Release 6.1(2)I2(1)

The copp-system-class-critical class has the following configuration:

class-map type control-plane match-any copp-system-p-class-critical
  match access-group name copp-system-p-acl-bgp
  match access-group name copp-system-p-acl-rip
  match access-group name copp-system-p-acl-vpc
  match access-group name copp-system-p-acl-bgp6
  match access-group name copp-system-p-acl-ospf
  match access-group name copp-system-p-acl-rip6
  match access-group name copp-system-p-acl-eigrp
  match access-group name copp-system-p-acl-ospf6
  match access-group name copp-system-p-acl-eigrp6
  match access-group name copp-system-p-acl-auto-rp
  match access-group name copp-system-p-acl-mac-l2pt
  match access-group name copp-system-p-acl-mac-l3-isis

The copp-system-class-exception class has the following configuration:

class-map type control-plane match-any copp-system-p-class-exception
  match exception ip option
  match exception ip icmp unreachable
  match exception ipv6 option
  match exception ipv6 icmp unreachable

The copp-system-class-exception-diag class has the following configuration:

class-map type control-plane match-any copp-system-p-class-exception-diag
  match exception ttl-failure
  match exception mtu-failure

The copp-system-class-important class has the following configuration:

class-map type control-plane match-any copp-system-p-class-important
  match access-group name copp-system-p-acl-glbp
  match access-group name copp-system-p-acl-hsrp
  match access-group name copp-system-p-acl-vrrp
  match access-group name copp-system-p-acl-wccp
  match access-group name copp-system-p-acl-hsrp6
  match access-group name copp-system-p-acl-mac-lldp
  match access-group name copp-system-p-acl-icmp6-msgs
  match access-group name copp-system-p-acl-mac-flow-control

The copp-system-class-l2-default class has the following configuration:

class-map type control-plane match-any copp-system-p-class-l2-default
  match access-group name copp-system-p-acl-mac-undesirable

The copp-system-class-l2-unpoliced class has the following configuration:

class-map type control-plane match-any copp-system-p-class-l2-unpoliced
  match access-group name copp-system-p-acl-mac-stp
  match access-group name copp-system-p-acl-mac-lacp
  match access-group name copp-system-p-acl-mac-cfsoe
  match access-group name copp-system-p-acl-mac-sdp-srp
  match access-group name copp-system-p-acl-mac-l2-tunnel
  match access-group name copp-system-p-acl-mac-cdp-udld-vtp

The copp-system-class-l3mc-data class has the following configuration:

class-map type control-plane match-any copp-system-p-class-l3mc-data
  match exception multicast rpf-failure
  match exception multicast dest-miss

The copp-system-class-l3uc-data class has the following configuration:

class-map type control-plane match-any copp-system-p-class-l3uc-data
  match exception glean

The copp-system-class-management class has the following configuration:

class-map type control-plane match-any copp-system-p-class-management
  match access-group name copp-system-p-acl-ftp
  match access-group name copp-system-p-acl-ntp
  match access-group name copp-system-p-acl-ssh
  match access-group name copp-system-p-acl-ntp6
  match access-group name copp-system-p-acl-sftp
  match access-group name copp-system-p-acl-snmp
  match access-group name copp-system-p-acl-ssh6
  match access-group name copp-system-p-acl-tftp
  match access-group name copp-system-p-acl-tftp6
  match access-group name copp-system-p-acl-radius
  match access-group name copp-system-p-acl-tacacs
  match access-group name copp-system-p-acl-telnet
  match access-group name copp-system-p-acl-radius6
  match access-group name copp-system-p-acl-tacacs6
  match access-group name copp-system-p-acl-telnet6

The copp-system-class-monitoring class has the following configuration:

class-map type control-plane match-any copp-system-p-class-monitoring
  match access-group name copp-system-p-acl-icmp
  match access-group name copp-system-p-acl-icmp6
  match access-group name copp-system-p-acl-traceroute

The copp-system-class-multicast-router class has the following configuration:

class-map type control-plane match-any copp-system-p-class-multicast-router
  match access-group name copp-system-p-acl-pim
  match access-group name copp-system-p-acl-msdp
  match access-group name copp-system-p-acl-pim6
  match access-group name copp-system-p-acl-pim-reg
  match access-group name copp-system-p-acl-pim6-reg
  match access-group name copp-system-p-acl-pim-mdt-join

The copp-system-class-normal class has the following configuration:

class-map type control-plane match-any copp-system-p-class-normal
  match access-group name copp-system-p-acl-mac-dot1x
  match protocol arp

The copp-system-class-normal-dhcp class has the following configuration:

class-map type control-plane match-any copp-system-p-class-normal-dhcp
  match access-group name copp-system-p-acl-dhcp

The copp-system-class-normal-dhcp-relay-response class has the following configuration:

class-map type control-plane match-any copp-system-p-class-normal-dhcp-relay-response
  match access-group name copp-system-p-acl-dhcp-relay-response

The copp-system-class-normal-igmp class has the following configuration:

class-map type control-plane match-any copp-system-p-class-normal-igmp
  match access-group name copp-system-p-acl-igmp

The copp-system-class-redirect class has the following configuration:

class-map type control-plane match-any copp-system-p-class-redirect

The copp-system-class-undesirable class has the following configuration:

class-map type control-plane match-any copp-system-p-class-undesirable
  match access-group name copp-system-p-acl-undesirable
  match exception multicast sg-rpf-failure

Default Class Maps - For Cisco NX-OS Release 6.1(2)I1(1)

The copp-system-class-critical class has the following configuration:


class-map type control-plane match-any copp-system-p-class-critical 
    match access-group name copp-system-p-acl-bgp
    match access-group name copp-system-p-acl-pim
    match access-group name copp-system-p-acl-rip
    match access-group name copp-system-p-acl-vpc
    match access-group name copp-system-p-acl-bgp6
    match access-group name copp-system-p-acl-msdp
    match access-group name copp-system-p-acl-ospf
    match access-group name copp-system-p-acl-rip6
    match access-group name copp-system-p-acl-eigrp
    match access-group name copp-system-p-acl-ospf6
    match access-group name copp-system-p-acl-eigrp6
    match access-group name copp-system-p-acl-auto-rp
    match access-group name copp-system-p-acl-mac-l2pt
    match access-group name copp-system-p-acl-mac-l3-isis
 

The copp-system-class-exception class has the following configuration:


class-map type control-plane match-any copp-system-p-class-exception 
				match exception ip option
      match exception ip icmp unreachable
      match exception ttl-failure
      match exception ipv6 option
      match exception mtu-failure

The copp-system-class-important class has the following configuration:


class-map type control-plane match-any copp-system-p-class-important    
    match access-group name copp-system-p-acl-hsrp
    match access-group name copp-system-p-acl-vrrp
    match access-group name copp-system-p-acl-hsrp6
    match access-group name copp-system-p-acl-pim-reg
    match access-group name copp-system-p-acl-mac-lldp
    match access-group name copp-system-p-acl-pim-mdt-join
    match access-group name copp-system-p-acl-mac-flow-control

The copp-system-class-l2-default class has the following configuration:


class-map type control-plane match-any copp-system-p-class-l2-default
    match access-group name copp-system-p-acl-mac-undesirable

The copp-system-class-l2-unpoliced class has the following configuration:


class-map type control-plane match-any copp-system-p-class-l2-unpoliced
    match access-group name copp-system-p-acl-mac-stp
    match access-group name copp-system-p-acl-mac-lacp
    match access-group name copp-system-p-acl-mac-sdp-srp
    match access-group name copp-system-p-acl-mac-l2-tunnel
    match access-group name copp-system-p-acl-mac-cdp-udld-vtp

The copp-system-class-l3mc-data class has the following configuration:


class-map type control-plane match-any copp-system-p-class-l3mc-data
    match exception multicast rpf-failure
    match exception multicast dest-miss

The copp-system-class-l3uc-data class has the following configuration:


class-map type control-plane match-any copp-system-p-class-l3uc-data
    match exception glean

The copp-system-class-management class has the following configuration:


class-map type control-plane match-any copp-system-p-class-management
    match access-group name copp-system-p-acl-ftp
    match access-group name copp-system-p-acl-ntp
    match access-group name copp-system-p-acl-ssh
    match access-group name copp-system-p-acl-ntp6
    match access-group name copp-system-p-acl-sftp
    match access-group name copp-system-p-acl-snmp
    match access-group name copp-system-p-acl-ssh6
    match access-group name copp-system-p-acl-tftp
    match access-group name copp-system-p-acl-tftp6
    match access-group name copp-system-p-acl-radius
    match access-group name copp-system-p-acl-tacacs
    match access-group name copp-system-p-acl-telnet
    match access-group name copp-system-p-acl-radius6
    match access-group name copp-system-p-acl-tacacs6
    match access-group name copp-system-p-acl-telnet6

The copp-system-class-monitoring class has the following configuration:


class-map type control-plane match-any copp-system-p-class-monitoring
    match access-group name copp-system-p-acl-icmp
    match access-group name copp-system-p-acl-traceroute

The copp-system-class-normal class has the following configuration:


class-map type control-plane match-any copp-system-p-class-normal
    match protocol arp

The copp-system-class-normal-dhcp class has the following configuration:


class-map type control-plane match-any copp-system-p-class-normal-dhcp
    match access-group name copp-system-p-acl-dhcp

The copp-system-class-normal-dhcp-relay-response class has the following configuration:


class-map type control-plane match-any copp-system-p-class-normal-dhcp-relay-response
    match access-group name copp-system-p-acl-dhcp-relay-response

The copp-system-class-normal-igmp class has the following configuration:


class-map type control-plane match-any copp-system-p-class-normal-igmp
    match access-group name copp-system-p-acl-igmp

The copp-system-class-redirect class has the following configuration:


class-map type control-plane match-any copp-system-p-class-redirect 

The copp-system-class-undesirable class has the following configuration:


class-map type control-plane match-any copp-system-p-class-undesirable 
    match access-group name copp-system-p-acl-undesirable
				multicast sg-rpf-failure

Strict Default CoPP Policy - For Cisco NX-OS Release 6.1(2)I2(1)
The strict CoPP policy has the following configuration:
policy-map type control-plane copp-system-p-policy-strict
  class copp-system-p-class-critical
    set cos 7
    police cir 19000 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-important
    set cos 6
    police cir 3000 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-multicast-router
    set cos 6
    police cir 3000 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-management
    set cos 2
    police cir 3000 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-l3mc-data
    set cos 3
    police cir 3000 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-l3uc-data
    set cos 3
    police cir 250 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-normal
    set cos 1
    police cir 300 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-normal-dhcp
    set cos 1
    police cir 300 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-normal-dhcp-relay-response
    set cos 1
    police cir 400 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-normal-igmp
    set cos 1
    police cir 6000 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-redirect
    set cos 1
    police cir 150 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-exception
    set cos 1
    police cir 50 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-exception-diag
    set cos 1
    police cir 50 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-monitoring
    set cos 1
    police cir 75 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-l2-unpoliced
    set cos 7
    police cir 20000 pps bc 8192 packets conform transmit violate drop 
  class copp-system-p-class-undesirable
    set cos 0
    police cir 15 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-l2-default
    set cos 0
    police cir 50 pps bc 32 packets conform transmit violate drop 
  class class-default
    set cos 0
    police cir 50 pps bc 32 packets conform transmit violate drop
Strict Default CoPP Policy - For Cisco NX-OS Release 6.1(2)I1(1)

The strict CoPP policy has the following configuration:


policy-map type control-plane copp-system-p-policy-strict
    class copp-system-p-class-critical
      set cos 7
      police cir 19000 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-important
      set cos 6
      police cir 500 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-management
      set cos 2
      police cir 3000 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-l3mc-data
      set cos 2
      police cir 3000 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-l3uc-data
      set cos 2
     police cir 250 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-normal
      set cos 1
      police cir 300 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-normal-dhcp
      set cos 1
      police cir 300 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-normal-dhcp-relay-response
      set cos 1
      police cir 400 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-normal-igmp
      set cos 1
      police cir 6000 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-redirect
      set cos 1
      police cir 150 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-exception
      set cos 1
      police cir 50 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-monitoring
      set cos 1
      police cir 75 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-l2-unpoliced
     set cos 7
      police cir 20000 pps bc 4096 packets conform transmit violate drop 
    class copp-system-p-class-undesirable
      set cos 0
      police cir 15 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-l2-default
      set cos 0
      police cir 50 pps bc 32 packets conform transmit violate drop 
    class class-default
      set cos 0
      police cir 50 pps bc 32 packets conform transmit violate drop

Moderate Default CoPP Policy - For Cisco NX-OS Release 6.1(2)I2(1)

The moderate CoPP policy has the following configuration:

policy-map type control-plane copp-system-p-policy-moderate
  class copp-system-p-class-critical
    set cos 7
    police cir 19000 pps bc 192 packets conform transmit violate drop 
  class copp-system-p-class-important
    set cos 6
    police cir 3000 pps bc 192 packets conform transmit violate drop 
  class copp-system-p-class-multicast-router
    set cos 6
    police cir 3000 pps bc 192 packets conform transmit violate drop 
  class copp-system-p-class-management
    set cos 2
    police cir 3000 pps bc 48 packets conform transmit violate drop 
  class copp-system-p-class-l3mc-data
    set cos 3
    police cir 3000 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-l3uc-data
    set cos 3
    police cir 250 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-normal
    set cos 1
    police cir 300 pps bc 48 packets conform transmit violate drop 
  class copp-system-p-class-normal-dhcp
    set cos 1
    police cir 300 pps bc 48 packets conform transmit violate drop 
  class copp-system-p-class-normal-dhcp-relay-response
    set cos 1
    police cir 400 pps bc 96 packets conform transmit violate drop 
  class copp-system-p-class-normal-igmp
    set cos 1
    police cir 6000 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-redirect
    set cos 1
    police cir 150 pps bc 48 packets conform transmit violate drop 
  class copp-system-p-class-exception
    set cos 1
    police cir 50 pps bc 48 packets conform transmit violate drop 
  class copp-system-p-class-exception-diag
    set cos 1
    police cir 50 pps bc 48 packets conform transmit violate drop 
  class copp-system-p-class-monitoring
    set cos 1
    police cir 75 pps bc 192 packets conform transmit violate drop 
  class copp-system-p-class-l2-unpoliced
    set cos 7
    police cir 20000 pps bc 8192 packets conform transmit violate drop 
  class copp-system-p-class-undesirable
    set cos 0
    police cir 15 pps bc 48 packets conform transmit violate drop 
  class copp-system-p-class-l2-default
    set cos 0
    police cir 50 pps bc 48 packets conform transmit violate drop 
  class class-default
    set cos 0
    police cir 50 pps bc 48 packets conform transmit violate drop
Moderate Default CoPP Policy - For Cisco NX-OS Release 6.1(2)I1(1)

The moderate CoPP policy has the following configuration:


policy-map type control-plane copp-system-p-policy-moderate
    class copp-system-p-class-critical
      set cos 7
      police cir 19000 pps bc 48 packets conform transmit violate drop 
    class copp-system-p-class-important
      set cos 6
      police cir 500 pps bc 192 packets conform transmit violate drop 
    class copp-system-p-class-management
      set cos 2
      police cir 3000 pps bc 48 packets conform transmit violate drop 
    class copp-system-p-class-l3mc-data
      set cos 2
      police cir 3000 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-l3uc-data
      set cos 2
      police cir 250 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-normal
      set cos 1
      police cir 300 pps bc 48 packets conform transmit violate drop 
    class copp-system-p-class-normal-dhcp
      set cos 1
      police cir 300 pps bc 48 packets conform transmit violate drop 
    class copp-system-p-class-normal-dhcp-relay-response
      set cos 1
      police cir 400 pps bc 96 packets conform transmit violate drop 
    class copp-system-p-class-normal-igmp
      set cos 1
      police cir 6000 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-redirect
      set cos 1
      police cir 150 pps bc 48 packets conform transmit violate drop 
    class copp-system-p-class-exception
      set cos 1
      police cir 50 pps bc 48 packets conform transmit violate drop 
    class copp-system-p-class-monitoring
      set cos 1
      police cir 75 pps bc 192 packets conform transmit violate drop 
    class copp-system-p-class-l2-unpoliced
      set cos 7
      police cir 20000 pps bc 4096 packets conform transmit violate drop 
    class copp-system-p-class-undesirable
      set cos 0
      police cir 15 pps bc 48 packets conform transmit violate drop 
    class copp-system-p-class-l2-default
      set cos 0
      police cir 50 pps bc 48 packets conform transmit violate drop 
    class class-default
      set cos 0
      police cir 50 pps bc 48 packets conform transmit violate drop

Lenient Default CoPP Policy - For Cisco NX-OS Release 6.1(2)I2(1)

The lenient CoPP policy has the following configuration:

policy-map type control-plane copp-system-p-policy-lenient
  class copp-system-p-class-critical
    set cos 7
    police cir 19000 pps bc 256 packets conform transmit violate drop 
  class copp-system-p-class-important
    set cos 6
    police cir 3000 pps bc 256 packets conform transmit violate drop 
  class copp-system-p-class-multicast-router
    set cos 6
    police cir 3000 pps bc 256 packets conform transmit violate drop 
  class copp-system-p-class-management
    set cos 2
    police cir 3000 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-l3mc-data
    set cos 3
    police cir 3000 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-l3uc-data
    set cos 3
    police cir 250 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-normal
    set cos 1
    police cir 300 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-normal-dhcp
    set cos 1
    police cir 300 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-normal-dhcp-relay-response
    set cos 1
    police cir 400 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-normal-igmp
    set cos 1
    police cir 6000 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-redirect
    set cos 1
    police cir 150 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-exception
    set cos 1
    police cir 50 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-exception-diag
    set cos 1
    police cir 50 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-monitoring
    set cos 1
    police cir 75 pps bc 256 packets conform transmit violate drop 
  class copp-system-p-class-l2-unpoliced
    set cos 7
    police cir 20000 pps bc 8192 packets conform transmit violate drop 
  class copp-system-p-class-undesirable
    set cos 0
    police cir 15 pps bc 64 packets conform transmit violate drop 
  class copp-system-p-class-l2-default
    set cos 0
    police cir 50 pps bc 64 packets conform transmit violate drop 
  class class-default
    set cos 0
    police cir 50 pps bc 64 packets conform transmit violate drop
Lenient Default CoPP Policy - For Cisco NX-OS Release 6.1(2)I1(1)

The lenient CoPP policy has the following configuration:


policy-map type control-plane copp-system-p-policy-lenient
    class copp-system-p-class-critical
      set cos 7
      police cir 19000 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-important
      set cos 6
      police cir 500 pps bc 256 packets conform transmit violate drop 
    class copp-system-p-class-management
      set cos 2
      police cir 3000 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-l3mc-data
      set cos 2
      police cir 3000 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-l3uc-data
      set cos 2
      police cir 250 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-normal
      set cos 1
      police cir 300 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-normal-dhcp
      set cos 1
      police cir 300 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-normal-dhcp-relay-response
      set cos 1
      police cir 400 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-normal-igmp
      set cos 1
      police cir 6000 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-redirect
      set cos 1
      police cir 150 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-exception
      set cos 1
      police cir 50 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-monitoring
      set cos 1
      police cir 75 pps bc 256 packets conform transmit violate drop 
    class copp-system-p-class-l2-unpoliced
      set cos 7
      police cir 20000 pps bc 4096 packets conform transmit violate drop 
    class copp-system-p-class-undesirable
      set cos 0
      police cir 15 pps bc 64 packets conform transmit violate drop 
    class copp-system-p-class-l2-default
      set cos 0
      police cir 50 pps bc 64 packets conform transmit violate drop 
    class class-default
      set cos 0
      police cir 50 pps bc 64 packets conform transmit violate drop

Dense Default CoPP Policy - For Cisco NX-OS Release 6.1(2)I2(1)
The dense CoPP policy has the following configuration:
policy-map type control-plane copp-system-p-policy-dense
  class copp-system-p-class-critical
    set cos 7
    police cir 2500 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-important
    set cos 6
    police cir 1200 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-multicast-router
    set cos 6
    police cir 1200 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-management
    set cos 2
    police cir 1200 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-l3mc-data
    set cos 3
    police cir 1200 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-l3uc-data
    set cos 3
    police cir 250 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-normal
    set cos 1
    police cir 150 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-normal-dhcp
    set cos 1
    police cir 150 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-normal-dhcp-relay-response
    set cos 1
    police cir 200 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-normal-igmp
    set cos 1
    police cir 2500 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-redirect
    set cos 1
    police cir 100 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-exception
    set cos 1
    police cir 50 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-exception-diag
    set cos 1
    police cir 50 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-monitoring
    set cos 1
    police cir 50 pps bc 128 packets conform transmit violate drop 
  class copp-system-p-class-l2-unpoliced
    set cos 7
    police cir 20000 pps bc 8192 packets conform transmit violate drop 
  class copp-system-p-class-undesirable
    set cos 0
    police cir 15 pps bc 32 packets conform transmit violate drop 
  class copp-system-p-class-l2-default
    set cos 0
    police cir 25 pps bc 32 packets conform transmit violate drop 
  class class-default
    set cos 0
    police cir 25 pps bc 32 packets conform transmit violate drop
Dense Default CoPP Policy - For Cisco NX-OS Release 6.1(2)I1(1)

The dense CoPP policy has the following configuration:


policy-map type control-plane copp-system-p-policy-dense
    class copp-system-p-class-critical
      set cos 7
      police cir 2500 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-important
      set cos 6
      police cir 300 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-management
      set cos 2
      police cir 1200 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-l3mc-data
      set cos 2
      police cir 1200 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-l3uc-data
      set cos 2
      police cir 250 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-normal
      set cos 1
      police cir 150 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-normal-dhcp
      set cos 1
      police cir 150 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-normal-dhcp-relay-response
      set cos 1
      police cir 200 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-normal-igmp
      set cos 1
      police cir 2500 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-redirect
      set cos 1
      police cir 100 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-exception
      set cos 1
      police cir 50 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-monitoring
      set cos 1
      police cir 50 pps bc 128 packets conform transmit violate drop 
    class copp-system-p-class-l2-unpoliced
      set cos 7
      police cir 20000 pps bc 4096 packets conform transmit violate drop 
    class copp-system-p-class-undesirable
      set cos 0
      police cir 15 pps bc 32 packets conform transmit violate drop 
    class copp-system-p-class-l2-default
      set cos 0
      police cir 25 pps bc 32 packets conform transmit violate drop 
    class class-default
      set cos 0
      police cir 25 pps bc 32 packets conform transmit violate drop

Packets Per Second Credit Limit

The aggregate packets per second (PPS) for a given policy (sum of PPS of each class part of the policy) is capped by an upper PPS Credit Limit (PCL). If an increase in PPS of a given class causes a PCL exceed, the configuration is rejected. To increase the desired PPS, the additional PPS beyond PCL should be decreased from other class(es).

Modular QoS Command-Line Interface

CoPP uses the Modular Quality of Service Command-Line Interface (MQC). MQC is a CLI structure that allows you to define a traffic class, create a traffic policy (policy map), and attach the traffic policy to an interface. The traffic policy contains the CoPP feature that will be applied to the traffic class.

SUMMARY STEPS

  1. Define a traffic class using the class-map command. A traffic class is used to classify traffic.
  2. Create a traffic policy using the policy-map command. A traffic policy (policy map) contains a traffic class and one or more CoPP features that will be applied to the traffic class. The CoPP features in the traffic policy determine how to treat the classified traffic.
  3. Attach the traffic policy (policy map) to the control plane using the control-plane and service-policy commands.

DETAILED STEPS


Step 1

Define a traffic class using the class-map command. A traffic class is used to classify traffic.

This example shows how to create a new class-map called copp-sample-class:
class-map type control-plane copp-sample-class

Step 2

Create a traffic policy using the policy-map command. A traffic policy (policy map) contains a traffic class and one or more CoPP features that will be applied to the traffic class. The CoPP features in the traffic policy determine how to treat the classified traffic.

Step 3

Attach the traffic policy (policy map) to the control plane using the control-plane and service-policy commands.

This example shows how to attach the policy map to the control plane:
control-plane
service-policy input copp-system-policy

Note

 

The copp-system-policy is always configured and applied. There is no need to use this command explicitly.


CoPP and the Management Interface

The Cisco NX-OS device supports only hardware-based CoPP, which does not support the management interface (mgmt0). The out-of-band mgmt0 interface connects directly to the CPU and does not pass through the in-band traffic hardware where CoPP is implemented.

On the mgmt0 interface, ACLs can be configured to give or deny access to a particular type of traffic.

Licensing Requirements for CoPP

The following table shows the licensing requirements for this feature:

Product

License Requirement

Cisco NX-OS

CoPP requires no license. Any feature not included in a license package is bundled with the nx-os image and is provided at no extra charge to you. For an explanation of the Cisco NX-OS licensing scheme, see the Cisco NX-OS Licensing Guide.

Guidelines and Limitations for CoPP

CoPP has the following configuration guidelines and limitations:

  • We recommend that you use the strict default CoPP policy initially and then later modify the CoPP policies based on the data center and application requirements.

  • Customizing CoPP is an ongoing process. CoPP must be configured according to the protocols and features used in your specific environment as well as the supervisor features that are required by the server environment. As these protocols and features change, CoPP must be modified.

  • We recommend that you continuously monitor CoPP. If drops occur, determine if CoPP dropped traffic unintentionally or in response to a malfunction or attack. In either event, analyze the situation and evaluate the need to modify the CoPP policies.

  • All the traffic that you do not specify in the other class maps is put into the last class, the default class. Monitor the drops in this class and investigate if these drops are based on traffic that you do not want or the result of a feature that was not configured and you need to add.

  • All broadcast traffic is sent through CoPP logic in order to determine which packets (for example, ARP and DHCP) need to be redirected through an access control list (ACL) to the router processor. Broadcast traffic that does not need to be redirected is matched against the CoPP logic, and both conforming and violated packets are counted in the hardware but not sent to the CPU. Broadcast traffic that needs to be sent to the CPU and broadcast traffic that does not need to be sent to the CPU must be separated into different classes.

  • After you have configured CoPP, delete anything that is not being used, such as old class maps and unused routing protocols.

  • You must ensure that the CoPP policy does not filter critical traffic such as routing protocols or interactive access to the device. Filtering this traffic could prevent remote access to the Cisco NX-OS device and require a console connection.

  • The Cisco NX-OS software does not support egress CoPP or silent mode. CoPP is supported only on ingress (you cannot use the service-policy output copp command to the control plane interface).

  • You can use the access control entry (ACE) hit counters in the hardware only for ACL logic. Use the software ACE hit counters and the show access-lists and show policy-map type control-plane commands to evaluate CPU traffic.

  • The Cisco NX-OS device hardware performs CoPP on a per-forwarding-engine basis. CoPP does not support distributed policing. Therefore, you should choose rates so that the aggregate traffic does not overwhelm the supervisor module.

  • If multiple flows map to the same class, individual flow statistics will not be available.

  • If you upgrade from a Cisco NX-OS release that supports the CoPP feature to a Cisco NX-OS release that supports the CoPP feature with additional classes for new protocols, you must either run the setup utility using the setup command or use the copp profile command for the new CoPP classes to be available.

  • Before you downgrade from a Cisco NX-OS release that supports the CoPP feature to an earlier Cisco NX-OS release that supports the CoPP feature, you should verify compatibility using the show incompatibility nxos bootflash: filename command. If an incompatibility exists, disable any features that are incompatible with the downgrade image before downgrading the software.

  • You cannot disable CoPP. If you attempt to disable it, packets are rate limited at 50 packets per seconds.

  • Skip CoPP policy option has been removed from the Cisco NX-OS initial setup utility because using it can impact the control plane of the network.


Note


If you are familiar with the Cisco IOS CLI, be aware that the Cisco NX-OS commands for this feature might differ from the Cisco IOS commands that you would use.


Default Settings for CoPP

This table lists the default settings for CoPP parameters.

Table 1. Default CoPP Parameters Settings

Parameters

Default

Default policy

Strict

Default policy

9 policy entries

Note

 

The maximum number of supported policies with associated class maps is 128.

Scale factor value

1.00

Configuring CoPP

This section describes how to configure CoPP.

Configuring a Control Plane Class Map

You must configure control plane class maps for control plane policies.

You can classify traffic by matching packets based on existing ACLs. The permit and deny ACL keywords are ignored in the matching.

You can configure policies for IP version 4 (IPv4) and IP version 6 (IPv6) packets.

Before you begin

Ensure that you have configured the IP ACLs if you want to use ACE hit counters in the class maps.

SUMMARY STEPS

  1. configure terminal
  2. class-map type control-plane [match-all | match-any] class-map-name
  3. (Optional) match access-group name access-list-name
  4. (Optional) match exception {ip | ipv6} icmp redirect
  5. (Optional) match exception {ip | ipv6} icmp unreachable
  6. (Optional) match exception {ip | ipv6} option
  7. match protocol arp
  8. exit
  9. (Optional) show class-map type control-plane [class-map-name]
  10. (Optional) copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

class-map type control-plane [match-all | match-any] class-map-name

Example:

switch(config)# class-map type control-plane ClassMapA
switch(config-cmap)#

Specifies a control plane class map and enters class map configuration mode. The default class matching is match-any. The name can be a maximum of 64 characters long and is case sensitive.

Note

 

You cannot use class-default, match-all, or match-any as class map names.

Step 3

(Optional) match access-group name access-list-name

Example:

switch(config-cmap)# match access-group name MyAccessList
(Optional)

Specifies matching for an IP ACL.

Note

 

The permit and deny ACL keywords are ignored in the CoPP matching.

Step 4

(Optional) match exception {ip | ipv6} icmp redirect

Example:

switch(config-cmap)# match exception ip icmp redirect
(Optional)

Specifies matching for IPv4 or IPv6 ICMP redirect exception packets.

Step 5

(Optional) match exception {ip | ipv6} icmp unreachable

Example:

switch(config-cmap)# match exception ip icmp unreachable
(Optional)

Specifies matching for IPv4 or IPv6 ICMP unreachable exception packets.

Step 6

(Optional) match exception {ip | ipv6} option

Example:

switch(config-cmap)# match exception ip option
(Optional)

Specifies matching for IPv4 or IPv6 option exception packets.

Step 7

match protocol arp

Example:

switch(config-cmap)# match protocol arp

Specifies matching for IP Address Resolution Protocol (ARP) and Reverse Address Resolution Protocol (RARP) packets.

Step 8

exit

Example:

switch(config-cmap)# exit
switch(config)#

Exits class map configuration mode.

Step 9

(Optional) show class-map type control-plane [class-map-name]

Example:

switch(config)# show class-map type control-plane
(Optional)

Displays the control plane class map configuration.

Step 10

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Configuring a Control Plane Policy Map

You must configure a policy map for CoPP, which includes policing parameters. If you do not configure a policer for a class, the following default is configured:

  • 50 packets per second (pps) with a burst of 32 packets (for Cisco Nexus 9300 and 9500 Series and 3164Q, 31128PQ, 3232C, and 3264Q switches)

Before you begin

Ensure that you have configured a control plane class map.

SUMMARY STEPS

  1. configure terminal
  2. policy-map type control-plane policy-map-name
  3. class {class-map-name [insert-before class-map-name2] | class-default}
  4. Enter one of the following commands:
    • police [cir] {cir-rate [rate-type]}
    • police [cir] {cir-rate [rate-type]} [bc] burst-size [burst-size-type]
    • police [cir] {cir-rate [rate-type]]} conform transmit [violate drop]
  5. (Optional) logging drop threshold [drop-count [level syslog-level]]
  6. (Optional) set cos cos-value
  7. exit
  8. exit
  9. (Optional) show policy-map type control-plane [expand] [name class-map-name]
  10. (Optional) copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

policy-map type control-plane policy-map-name

Example:

switch(config)# policy-map type control-plane ClassMapA
switch(config-pmap)#

Specifies a control plane policy map and enters policy map configuration mode. The policy map name can have a maximum of 64 characters and is case sensitive.

Step 3

class {class-map-name [insert-before class-map-name2] | class-default}

Example:

switch(config-pmap)# class ClassMapA
switch(config-pmap-c)#

Specifies a control plane class map name or the class default and enters control plane class configuration mode.

The class-default class map is always at the end of the class map list for a policy map.

Step 4

Enter one of the following commands:

  • police [cir] {cir-rate [rate-type]}
  • police [cir] {cir-rate [rate-type]} [bc] burst-size [burst-size-type]
  • police [cir] {cir-rate [rate-type]]} conform transmit [violate drop]

Example:

switch(config-pmap-c)# police cir 52000 bc 1000 packets

Specifies the committed information rate (CIR). The rate range is as follows:

  • 1 to 268435456 pps (for Cisco Nexus 9300 and 9500 Series and 3164Q, 31128PQ, 3232C, and 3264Q switches)

The committed burst (BC) range is as follows:

  • 1 to 1073741 packets (for Cisco Nexus 9300 and 9500 Series and 3164Q, 31128PQ, 3232C, and 3264Q switches)

The conform transmit action transmits the packet.

Note

 
You can specify the BC and conform action for the same CIR.

Step 5

(Optional) logging drop threshold [drop-count [level syslog-level]]

Example:

switch(config-pmap-c)# logging drop threshold 100
(Optional)

Specifies the threshold value for dropped packets and generates a syslog if the drop count exceeds the configured threshold. The range for the drop-count argument is from 1 to 8000000000 bytes. The range for the syslog-level argument is from 1 to 7, and the default level is 4.

Step 6

(Optional) set cos cos-value

Example:

switch(config-pmap-c)# set cos 1
(Optional)

Specifies the 802.1Q class of service (CoS) value. The range is from 0 to 7. The default value is 0.

Step 7

exit

Example:

switch(config-pmap-c)# exit
switch(config-pmap)#

Exits policy map class configuration mode.

Step 8

exit

Example:

switch(config-pmap)# exit
switch(config)#

Exits policy map configuration mode.

Step 9

(Optional) show policy-map type control-plane [expand] [name class-map-name]

Example:

switch(config)# show policy-map type control-plane
(Optional)

Displays the control plane policy map configuration.

Step 10

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Configuring the Control Plane Service Policy

You can configure one or more policy maps for the CoPP service policy.


Note


When you try to change the CoPP policy and apply a custom CoPP policy, it is configured in the hardware as non-atomic, and the following system message appears:
This operation can cause disruption of control traffic. Proceed (y/n)?  [no] y
2013 Nov 13 23:16:46 switch %ACLQOS-SLOT24-5-ACLQOS_NON_ATOMIC: Non atomic ACL/QoS policy update done for CoPP
2013 Nov 13 23:16:46 switch %ACLQOS-SLOT23-5-ACLQOS_NON_ATOMIC: Non atomic ACL/QoS policy update done for CoPP
2013 Nov 13 23:16:46 switch %ACLQOS-SLOT21-5-ACLQOS_NON_ATOMIC: Non atomic ACL/QoS policy update done for CoPP
2013 Nov 13 23:16:46 switch %ACLQOS-SLOT25-5-ACLQOS_NON_ATOMIC: Non atomic ACL/QoS policy update done for CoPP
2013 Nov 13 23:16:46 switch %ACLQOS-SLOT26-5-ACLQOS_NON_ATOMIC: Non atomic ACL/QoS policy update done for CoPP
2013 Nov 13 23:16:46 switch %ACLQOS-SLOT22-5-ACLQOS_NON_ATOMIC: Non atomic ACL/QoS policy update done for CoPP
2013 Nov 13 23:16:46 switch %ACLQOS-SLOT4-5-ACLQOS_NON_ATOMIC: Non atomic ACL/QoS policy update done for CoPP


Before you begin

Ensure that you have configured a control plane policy map.

SUMMARY STEPS

  1. configure terminal
  2. control-plane
  3. [no] service-policy input policy-map-name
  4. exit
  5. (Optional) show running-config copp [all]
  6. (Optional) copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

control-plane

Example:

switch(config)# control-plane
switch(config-cp)#

Enters control plane configuration mode.

Step 3

[no] service-policy input policy-map-name

Example:

switch(config-cp)# service-policy input PolicyMapA

Specifies a policy map for the input traffic. Repeat this step if you have more than one policy map.

You cannot disable CoPP. If you enter the no form of this command, packets are rate limited at 50 packets per seconds.

Step 4

exit

Example:

switch(config-cp)# exit
switch(config)#

Exits control plane configuration mode.

Step 5

(Optional) show running-config copp [all]

Example:

switch(config)# show running-config copp
(Optional)

Displays the CoPP configuration.

Step 6

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Configuring the CoPP Scale Factor Per Line Card

You can configure the CoPP scale factor per line card.

The scale factor configuration is used to scale the policer rate of the applied CoPP policy for a particular line card. The accepted value is from 0.10 to 2.00. You can increase or reduce the policer rate for a particular line card without changing the current CoPP policy. The changes are effective immediately, so you do not need to reapply the CoPP policy.

SUMMARY STEPS

  1. configure terminal
  2. control-plane
  3. scale-factor value module multiple-module-range
  4. (Optional) show policy-map interface control-plane
  5. (Optional) copy running-config startup-config

DETAILED STEPS

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

control-plane

Example:

switch(config)# control-plane
switch(config-cp)#

Enters control plane configuration mode.

Step 3

scale-factor value module multiple-module-range

Example:

switch(config-cp)# scale-factor 1.10 module 1-2

Configures the policer rate per line card. The allowed scale factor value is from 0.10 to 2.00. When the scale factor value is configured, the policing values are multiplied by the corresponding scale factor value of the module, and it is programmed in the particular module.

To revert to the default scale factor value of 1.00, use the no scale-factor value module multiple-module-range command, or explicitly set the default scale factor value to 1.00 using the scale-factor 1 module multiple-module-range command.

Step 4

(Optional) show policy-map interface control-plane

Example:

switch(config-cp)# show policy-map interface control-plane
(Optional)

Displays the applied scale factor values when a CoPP policy is applied.

Step 5

(Optional) copy running-config startup-config

Example:

switch(config)# copy running-config startup-config
(Optional)

Copies the running configuration to the startup configuration.

Changing or Reapplying the Default CoPP Policy

You can change to a different default CoPP policy, or you can reapply the same default CoPP policy.

SUMMARY STEPS

  1. [no] copp profile [strict | moderate | lenient | dense ]
  2. (Optional) show copp status
  3. (Optional) show running-config copp

DETAILED STEPS

  Command or Action Purpose

Step 1

[no] copp profile [strict | moderate | lenient | dense ]

Example:

switch(config)# copp profile moderate

Applies the CoPP best practice policy.

You cannot disable CoPP. If you enter the no form of this command, packets are rate limited at 50 packets per seconds.

Step 2

(Optional) show copp status

Example:

switch(config)# show copp status
(Optional)

Displays the CoPP status, including the last configuration operation and its status. This command also enables you to verify that the CoPP best practice policy is attached to the control plane.

Step 3

(Optional) show running-config copp

Example:

switch(config)# show running-config copp
(Optional)

Displays the CoPP configuration in the running configuration.

Copying the CoPP Best Practice Policy

The CoPP best practice policy is read-only. If you want to modify its configuration, you must copy it.

SUMMARY STEPS

  1. copp copy profile {strict | moderate | lenient | dense } {prefix | suffix} string
  2. (Optional) show copp status
  3. (Optional) show running-config copp

DETAILED STEPS

  Command or Action Purpose

Step 1

copp copy profile {strict | moderate | lenient | dense } {prefix | suffix} string

Example:

switch# copp copy profile strict prefix abc

Creates a copy of the CoPP best practice policy.

CoPP renames all class maps and policy maps with the specified prefix or suffix.

Step 2

(Optional) show copp status

Example:

switch# show copp status
(Optional)

Displays the CoPP status, including the last configuration operation and its status. This command also enables you to verify that the copied policy is not attached to the control plane.

Step 3

(Optional) show running-config copp

Example:

switch# show running-config copp
(Optional)

Displays the CoPP configuration in the running configuration, including the copied policy configuration.

Verifying the CoPP Configuration

To display CoPP configuration information, perform one of the following tasks:

Command

Purpose

show policy-map type control-plane [expand] [name policy-map-name]

Displays the control plane policy map with associated class maps and CIR and BC values.

show policy-map interface control-plane

Displays the policy values with associated class maps and drops per policy or class map. It also displays the scale factor values when a CoPP policy is applied. When the scale factor value is the default (1.00), it is not displayed.

Note

 
The scale factor changes the CIR and BC values internally on each module, but the display shows the configured CIR and BC values only. The actual applied value on a module is the scale factor multiplied by the configured value.

show class-map type control-plane [class-map-name]

Displays the control plane class map configuration, including the ACLs that are bound to this class map.

show copp diff profile {strict | moderate | lenient | dense } [prior-ver] profile {strict | moderate | lenient | dense } show copp diff profile

Displays the difference between two CoPP best practice policies.

When you do not include the prior-ver option, this command displays the difference between two currently applied default CoPP best practice policies (such as the currently applied strict and currently applied moderate policies).

When you include the prior-ver option, this command displays the difference between a currently applied default CoPP best practice policy and a previously applied default CoPP best practice policy (such as the currently applied strict and the previously applied lenient policies).

show copp profile {strict | moderate | lenient | dense }

Displays the details of the CoPP best practice policy, along with the classes and policer values.

show running-config aclmgr [all]

Displays the user-configured access control lists (ACLs) in the running configuration. The all option displays both the default (CoPP-configured) and user-configured ACLs in the running configuration.

show running-config copp [all]

Displays the CoPP configuration in the running configuration.

show startup-config aclmgr [all]

Displays the user-configured access control lists (ACLs) in the startup configuration. The all option displays both the default (CoPP-configured) and user-configured ACLs in the startup configuration.

Displaying the CoPP Configuration Status

SUMMARY STEPS

  1. switch# show copp status

DETAILED STEPS

Command or Action Purpose

switch# show copp status

Displays the configuration status for the CoPP feature.

Example

This example shows how to display the CoPP configuration status:

switch# show copp status

Monitoring CoPP

SUMMARY STEPS

  1. switch# show policy-map interface control-plane

DETAILED STEPS

Command or Action Purpose

switch# show policy-map interface control-plane

Displays packet-level statistics for all classes that are part of the applied CoPP policy.

Statistics are specified in terms of OutPackets (packets admitted to the control plane) and DropPackets (packets dropped because of rate limiting).

Example

This example shows how to monitor CoPP:

switch# show policy-map interface control-plane
Control Plane
 
  Service-policy  input: copp-system-p-policy-strict
 
    class-map copp-system-p-class-critical (match-any)
      set cos 7
      police cir 19000 pps , bc 128 packets 
      module 4 :
        transmitted 373977 packets;
        dropped 0 packets;

Clearing the CoPP Statistics

SUMMARY STEPS

  1. (Optional) switch# show policy-map interface control-plane
  2. switch# clear copp statistics

DETAILED STEPS

  Command or Action Purpose

Step 1

(Optional) switch# show policy-map interface control-plane

(Optional)

Displays the currently applied CoPP policy and per-class statistics.

Step 2

switch# clear copp statistics

Clears the CoPP statistics.

Example

This example shows how to clear the CoPP statistics for your installation:

switch# show policy-map interface control-plane
switch# clear copp statistics

Configuration Examples for CoPP

This section includes example CoPP configurations.

CoPP Configuration Example

The following example shows how to configure CoPP using IP ACLs and MAC ACLs:


configure terminal
ip access-list copp-system-p-acl-igmp 
permit igmp any 10.0.0.0/24

ip access-list copp-system-p-acl-msdp
permit tcp any any eq 639

mac access-list copp-system-p-acl-arp
permit any any 0x0806

ip access-list copp-system-p-acl-tacas 
permit udp any any eq 49

ip access-list copp-system-p-acl-ntp
permit udp any 10.0.1.1/23 eq 123

ip access-list copp-system-p-acl-icmp 
permit icmp any any

class-map type control-plane match-any copp-system-p-class-critical
match access-group name copp-system-p-acl-igmp
match access-group name copp-system-p-acl-msdp

class-map type control-plane match-any copp-system-p-class-normal
match access-group name copp-system-p-acl-icmp
match exception ip icmp redirect
match exception ip icmp unreachable
match exception ip option

policy-map type control-plane copp-system-p-policy

class copp-system-p-class-critical
police cir 19000 pps bc 128 packets conform transmit violate drop

class copp-system-p-class-important
police cir 500 pps bc 128 packets conform transmit violate drop

class copp-system-p-class-normal
police cir 300 pps bc 32 packets conform transmit violate drop

class class-default
police cir 50 pps bc 32 packets conform transmit violate drop

control-plane
service-policy input copp-system-p-policy

Create CoPP class and associate ACL:
class-map type control-plane copp-arp-class
match access-group name copp-arp-acl

Add the class to the CoPP policy:
policy-map type control-plane copp-system-policy
class copp-arp-class
police pps 500

Changing or Reapplying the Default CoPP Policy Using the Setup Utility

The following example shows how to change or reapply the default CoPP policy using the setup utility.

switch# setup

         ---- Basic System Configuration Dialog ----

This setup utility will guide you through the basic configuration of
the system. Setup configures only enough connectivity for management
of the system.


*Note: setup is mainly used for configuring the system initially,
when no configuration is present. So setup always assumes system
defaults and not the current system configuration values.


Press Enter at anytime to skip a dialog. Use ctrl-c at anytime
to skip the remaining dialogs.

Would you like to enter the basic configuration dialog (yes/no): yes

Do you want to enforce secure password standard (yes/no)[y]: <CR>

  Create another login account (yes/no) [n]: n

  Configure read-only SNMP community string (yes/no) [n]: n

  Configure read-write SNMP community string (yes/no) [n]: n

  Enter the switch name : <CR>

  Enable license grace period? (yes/no) [n]: n

  Continue with Out-of-band (mgmt0) management configuration? (yes/no) [y]: n

  Configure the default gateway? (yes/no) [y]: n

  Configure advanced IP options? (yes/no) [n]: <CR>

  Enable the telnet service? (yes/no) [n]: y

  Enable the ssh service? (yes/no) [y]: <CR>

    Type of ssh key you would like to generate (dsa/rsa) : <CR>

  Configure the ntp server? (yes/no) [n]: n

  Configure default interface layer (L3/L2) [L3]: <CR>

  Configure default switchport interface state (shut/noshut) [shut]: <CR>

  Configure best practices CoPP profile (strict/moderate/lenient/dense/skip) [strict]: strict


The following configuration will be applied:
  password strength-check
  no license grace-period
  no telnet server enable
  no system default switchport
  system default switchport shutdown
  policy-map type control-plane copp-system-p-policy

Would you like to edit the configuration? (yes/no) [n]: <CR>

Use this configuration and save it? (yes/no) [y]: y

switch#

Additional References for CoPP

This section provides additional information related to implementing CoPP.

Related Documents

Related Topic

Document Title

Licensing

Cisco NX-OS Licensing Guide

Standards

Standards

Title

RFC 2698

A Two Rate Three Color Marker