Skip to content
Ask AI

Copp Speed limit

[Command] show copp

[Purpose] View the mapping of packets types and queues

[View] System

[Usage Scenario] In a network, there are various types of packets sent to the CPU, both normal and potentially malicious. If too many packets are sent to the CPU, it can lead to high CPU utilization, performance degradation, and even system interruption. COPP (Control Plane Policing) rate-limits packets that need to be sent to the CPU based on specified queue rates. This ensures that the rate of packets sent to the CPU remains within the CPU’s normal operational capacity, preventing system disruptions.

[Use Cases]

sonic# show copp
TrapId Queue MeterType CIR ACTION
------------- ------- ----------- ------- --------
ttl_error 0 packets 150pps trap
mtu_error 0 packets 150pps drop
default 0 packets 2500pps trap
acl 0 packets 1250pps trap
ip2me 1 packets 2500pps trap
snmp 1 packets 2500pps trap
iccp 1 packets 3750pps trap
telnet 1 packets 2500pps trap
ssh 1 packets 3750pps trap
pim 2 packets 1250pps trap
ptp 2 packets 1250pps trap
igmp 2 packets 1250pps trap
mld 2 packets 1250pps trap
sample_packet 2 packets 1250pps trap
dhcp 3 packets 4500pps copy
dhcpv6 3 packets 4500pps copy
lldp 4 packets 400pps trap
isis 4 packets 1250pps trap
bgp 4 packets 4500pps trap
arp 5 packets 4500pps copy
icmp 5 packets 1250pps trap
ndp 5 packets 4500pps copy
eapol 6 packets 1000pps trap
lacp 6 packets 800pps trap
snp 6 packets 4500pps trap
stp 6 packets 800pps trap
bfd 7 packets 2000pps trap
vrrp 7 packets 1250pps copy
vrrpv6 7 packets 1250pps copy
ospfv6 7 packets 4500pps trap
ospf 7 packets 4500pps trap
bfdv6 7 packets 2000pps trap

[Command] show queue cpu-port

[Purpose] View CPU queue statistics

[View] System view

[Use Cases]

sonic# show queue cpu-port
Port RxQ Counter/pkts Drop/pkts Rate/pkts
------ ----- -------------- ----------- -----------
CPU ALL0 0 0 0.00/s
CPU ALL1 0 0 0.00/s
CPU ALL2 0 0 0.00/s
CPU ALL3 0 0 0.00/s
CPU ALL4 2085 0 0.10/s
CPU ALL5 0 0 0.00/s
CPU ALL6 31298 0 0.50/s
CPU ALL7 0 0 0.00/s

copp packet-type cir trap-action [{trap|copy}]

Section titled “copp packet-type cir trap-action [{trap|copy}]”

[Command] copp packet-type packet_type cir value trap-action [{trap|copy}]

[Purpose] Configure the rate limit for protocol packets sent to the CPU

[Parameter]

ParameterDescription
packet_typeProtocol packet types
valueValue range: 125-10000, unit: pps
trapSend only to the CPU
copySend to the CPU and forward

[View] System configuration view

[Notes] All protocol messages requiring transmission to the CPU have default rate limits. Unless there are specific requirements, it is not recommended to modify them. Excessive rate limits may fill the CPU processing channel with the current protocol messages, preventing protocol messages mapped to other queues from being transmitted to the CPU.

[Use Cases]

sonic(config)# copp packet-type dhcp cir 5000 trap-action copy