Copp Speed limit
show copp
Section titled “show copp”[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 coppTrapId Queue MeterType CIR ACTION------------- ------- ----------- ------- --------ttl_error 0 packets 150pps trapmtu_error 0 packets 150pps dropdefault 0 packets 2500pps trapacl 0 packets 1250pps trapip2me 1 packets 2500pps trapsnmp 1 packets 2500pps trapiccp 1 packets 3750pps traptelnet 1 packets 2500pps trapssh 1 packets 3750pps trappim 2 packets 1250pps trapptp 2 packets 1250pps trapigmp 2 packets 1250pps trapmld 2 packets 1250pps trapsample_packet 2 packets 1250pps trapdhcp 3 packets 4500pps copydhcpv6 3 packets 4500pps copylldp 4 packets 400pps trapisis 4 packets 1250pps trapbgp 4 packets 4500pps traparp 5 packets 4500pps copyicmp 5 packets 1250pps trapndp 5 packets 4500pps copyeapol 6 packets 1000pps traplacp 6 packets 800pps trapsnp 6 packets 4500pps trapstp 6 packets 800pps trapbfd 7 packets 2000pps trapvrrp 7 packets 1250pps copyvrrpv6 7 packets 1250pps copyospfv6 7 packets 4500pps trapospf 7 packets 4500pps trapbfdv6 7 packets 2000pps trapshow queue cpu-port
Section titled “show queue cpu-port”[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/scopp 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]
| Parameter | Description |
|---|---|
| packet_type | Protocol packet types |
| value | Value range: 125-10000, unit: pps |
| trap | Send only to the CPU |
| copy | Send 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