Skip to content

Control Plane Policing

Control Plane Policing (CoPP) protects the supervisor of NX-OS devices by classifying and rate-limiting traffic that is punted to the CPU. A predefined CoPP profile (copp profile strict | moderate | lenient | dense) can be selected, or a custom control-plane policy can be built from control-plane class maps (class-map type control-plane) and policy maps (policy-map type control-plane) and applied with control-plane > service-policy input <name>. Control-plane class maps match access lists, exception packets (for example glean, TTL or MTU failures, IP options, ICMP redirects and multicast RPF failures), redirected packets and protocols. Each class of a control-plane policy map polices matching traffic with a CIR (and optionally PIR) rate and burst, and can mark CoS or DSCP and log dropped packets. The short form police pps <rate> is configured as cir_rate: <rate> with cir_unit: pps. Applying a custom service policy replaces the CoPP profile; to remove it, select a CoPP profile again. Support for individual match and set options depends on the platform.

Diagram
NameTypeConstraintMandatoryDefault Value
devicesListdevicesNo
device_groupsListdevice_groupsNo
globalClassglobalNo
templatesListtemplatesNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
configurationClassconfigurationNo

NameTypeConstraintMandatoryDefault Value
qosClassqosNo
systemClasssystemNo

NameTypeConstraintMandatoryDefault Value
control_plane_class_mapsListcontrol_plane_class_mapsNo
control_plane_policy_mapsListcontrol_plane_policy_mapsNo

NameTypeConstraintMandatoryDefault Value
control_plane_service_policy_inputStringNo
copp_profileChoicestrict, moderate, lenient, denseNo
copp_rate_limitBooleantrue, falseNo

control_plane_class_maps (nxos.devices.configuration.qos)

Section titled “control_plane_class_maps (nxos.devices.configuration.qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
match_typeChoicematch-any, match-allNo
match_access_group_namesListStringNo
match_exceptionsListChoice[glean, mtu-failure, ttl-failure, nat-flow, sflow, span, mvpn, vxlan-stp]No
match_exception_ip_optionBooleantrue, falseNo
match_exception_ip_icmpListChoice[redirect, unreachable]No
match_exception_ipv6_optionBooleantrue, falseNo
match_exception_ipv6_icmpListChoice[redirect, unreachable]No
match_exception_multicastListChoice[dest-miss, rpf-failure, sg-rpf-failure, ipv6-dest-miss, ipv6-rpf-failure, ipv6-sg-rpf-failure]No
match_protocol_arpBooleantrue, falseNo
match_protocol_mplsBooleantrue, falseNo
match_protocol_mpls_router_alertBooleantrue, falseNo
match_protocol_mpls_expIntegermin: 0, max: 7No
match_redirectChoicearp-inspect, dhcp-snoopNo

control_plane_policy_maps (nxos.devices.configuration.qos)

Section titled “control_plane_policy_maps (nxos.devices.configuration.qos)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
classesListclassesNo

classes (nxos.devices.configuration.qos.control_plane_policy_maps)

Section titled “classes (nxos.devices.configuration.qos.control_plane_policy_maps)”
NameTypeConstraintMandatoryDefault Value
nameStringYes
insert_beforeStringNo
policeClasspoliceNo
set_cosIntegermin: 0, max: 7No
set_cos_innerBooleantrue, falseNo
set_dscpIntegermin: 0, max: 63No
set_dscp_tunnelBooleantrue, falseNo
logging_drop_thresholdIntegermin: 0, max: 9223372036854775807No
logging_drop_levelIntegermin: 1, max: 7No

police (nxos.devices.configuration.qos.control_plane_policy_maps.classes)

Section titled “police (nxos.devices.configuration.qos.control_plane_policy_maps.classes)”
NameTypeConstraintMandatoryDefault Value
cir_rateIntegermin: 0, max: 9223372036854775807Yes
cir_unitChoicebps, kbps, mbps, gbps, ppsNo
bc_rateIntegermin: 0, max: 4294967295No
bc_unitChoicebytes, kbytes, mbytes, ms, us, packetsNo
pir_rateIntegermin: 0, max: 9223372036854775807No
be_rateIntegermin: 0, max: 4294967295No
be_unitChoicebytes, kbytes, mbytes, ms, us, packetsNo
conform_actionChoicetransmit, dropNo
exceed_actionChoicetransmit, dropNo
violate_actionChoicetransmit, dropNo

Example 1: Predefined CoPP profile

nxos:
devices:
- name: LEAF1
configuration:
system:
copp_profile: strict

Example 2: Custom control-plane policy that polices management and ARP traffic (class-map type control-plane, policy-map type control-plane, control-plane > service-policy input)

nxos:
devices:
- name: LEAF1
configuration:
ip_access_lists:
- name: ACL-COPP-MGMT
entries:
- sequence_number: 10
action: permit
protocol: tcp
source:
prefix: 10.0.0.0
prefix_length: 8
destination:
prefix: any
port_operator: eq
port_1: 22
qos:
control_plane_class_maps:
- name: CM-COPP-MGMT
match_type: match-any
match_access_group_names:
- ACL-COPP-MGMT
- name: CM-COPP-ARP
match_type: match-any
match_protocol_arp: true
control_plane_policy_maps:
- name: PM-COPP
classes:
- name: CM-COPP-MGMT
police:
cir_rate: 5000
cir_unit: pps
bc_rate: 128
bc_unit: packets
conform_action: transmit
violate_action: drop
- name: CM-COPP-ARP
police:
cir_rate: 1000
cir_unit: pps
bc_rate: 64
bc_unit: packets
conform_action: transmit
violate_action: drop
set_cos: 6
logging_drop_threshold: 1000
logging_drop_level: 5
system:
control_plane_service_policy_input: PM-COPP

Example 3: Control-plane class map matching exception packets (match exception glean, match exception ip option, match exception ip icmp redirect, match exception ipv6 icmp unreachable, match exception multicast rpf-failure)

nxos:
devices:
- name: LEAF1
configuration:
qos:
control_plane_class_maps:
- name: CM-COPP-EXCEPTION
match_type: match-any
match_exceptions:
- glean
- ttl-failure
- mtu-failure
match_exception_ip_option: true
match_exception_ip_icmp:
- redirect
match_exception_ipv6_option: true
match_exception_ipv6_icmp:
- unreachable
match_exception_multicast:
- rpf-failure
- dest-miss
control_plane_policy_maps:
- name: PM-COPP
classes:
- name: CM-COPP-EXCEPTION
police:
cir_rate: 50
cir_unit: pps
bc_rate: 32
bc_unit: packets
conform_action: transmit
violate_action: drop