Skip to content
Ask AI

COPP Speed Limit Configuration

[Command]

show copp

[Purpose]

View the handling actions and rate limits for packets of different protocol types on the device

[View]

System view

[Use Cases]

sonic# show copp
TrapId MeterType CIR ACTION
-------- ----------- -------- --------
acl packets 1250pps trap
arp packets 4500pps copy
bfd packets 2000pps trap
bfdv6 packets 2000pps trap
bgp packets 4500pps trap
bgpv6 packets 4500pps trap
dhcp packets 4500pps copy
dhcpv6 packets 4500pps copy
iccp packets 3750pps trap
icmp packets 1250pps trap
igmp packets 1250pps trap
ip2me packets 15000pps trap
isis packets 1250pps trap
lacp packets 800pps trap
ldp packets 4500pps copy
lldp packets 400pps trap
mld packets 1250pps trap
ndp packets 4500pps copy
ospf packets 4500pps trap
ospfv6 packets 4500pps trap
pim packets 1250pps trap
ptp packets 1250pps trap
snmp packets 2500pps trap
snp packets 4500pps trap
ssh packets 3750pps trap
stp packets 800pps trap
telnet packets 2500pps trap
vrrp packets 1250pps copy
vrrpv6 packets 1250pps copy

[Command]

show counters copp

[Purpose]

View control plane message speed limit statistics information

[View]

System view

[Notes]

Used to view the packet statistics of various protocols or traffic types of CoPP devices, including packet hit, receive, or discard counts, in order to check whether the CoPP policy is effective and to troubleshoot control plane packet processing exceptions.

[Use Cases]

sonic# show counters copp
PROTOCOL Total/pkts CPU/pkts CPU/pps Drop/pkts Drop/pps
------------------- ------------ ---------- --------- ----------- ----------
ACL 0 0 0 0 0
ARP_REQ 1268197 1268197 86.02 0 0
ARP_RESP 114 114 0 0 0
BFD 0 0 0 0 0
BFDV6 0 0 0 0 0
BFDV6_MICRO 0 0 0 0 0
BFD_MICRO 0 0 0 0 0
BGP 0 0 0 0 0
BGPV6 0 0 0 0 0
DHCP 0 0 0 0 0
DHCPV6 233 233 0 0 0
DHCPV6_L2 0 0 0 0 0
DHCP_L2 0 0 0 0 0
EAPOL 0 0 0 0 0
FTP 0 0 0 0 0
GNMI 0 0 0 0 0
HTTPCLIENT 0 0 0 0 0
HTTPSERVER 0 0 0 0 0
ICCP 0 0 0 0 0
ICMP_ECHO 1474 1474 0 0 0
IGMP_LEAVE 0 0 0 0 0
IGMP_QUERY 0 0 0 0 0
IGMP_V1_REPORT 0 0 0 0 0
IGMP_V2_REPORT 0 0 0 0 0
IGMP_V3_REPORT 0 0 0 0 0
IP2ME 1643 1643 0 0 0
ISIS 0 0 0 0 0
LACP 0 0 0 0 0
LDP 0 0 0 0 0
LLDP 9952 9952 1 0 0
MLD_V1_DONE 0 0 0 0 0
MLD_V1_REPORT 0 0 0 0 0
MLD_V1_V2 0 0 0 0 0
MLD_V2_REPORT 48 34 0 0 0
NEIGH_ADVERTISEMENT 0 0 0 0 0
NEIGH_DISCOVERY 71 71 0 0 0
NEIGH_SOLICITATION 0 0 0 0 0
NTPCLIENT 0 0 0 0 0
NTPSERVER 0 0 0 0 0
OSPF 0 0 0 0 0
OSPFV6 0 0 0 0 0
P4RT 0 0 0 0 0
PIM 0 0 0 0 0
PPPOE_CONTROL 0 0 0 0 0
PPPOE_DISCOVERY 0 0 0 0 0
PPPOE_SESSION_MISS 0 0 0 0 0
PTP 35173 35173 2.99 0 0
SNMP 282 282 0 0 0
SNP 0 0 0 0 0
SSH 10074 10074 9.98 0 0
STP 0 0 0 0 0
TELNET 0 0 0 0 0
TFTP 0 0 0 0 0
VRRP 0 0 0 0 0
VRRPV6 0 0 0 0 0

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

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

[Command]

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

no copp packet-type packet-type

[Purpose]

Configure CoPP to specify the rate limit and message processing actions for sending message types to the CPU

[View]

System configuration view

[Parameter]

packet-type Message protocol type
{trap|copy|drop}

Processing method for sending CPU messages

Trap: Only feed CPU

Copy: Upload to CPU and forward

Drop: Directly discard without sending or forwarding

[Notes]

All protocol messages that need to be sent to the CPU have default speed limit values. If there are no special requirements, it is not recommended to modify them. Excessive speed limit values may cause the current protocol message to occupy the CPU processing channel, resulting in protocol messages mapped to other queues being unable to be uploaded to the CPU.

Note:

ACL and CoPP differ in their processing stages and priorities within the data plane. ACL operates on the forwarding decisions of the data plane, while CoPP is responsible for packet submission and rate limiting in the control plane. First, ACL takes precedence over data plane forwarding, as all packets entering the data plane undergo ACL rule matching. If a deny rule is matched, the packet is directly discarded. Second, CoPP actions determine submission behavior: for packets requiring submission to the CPU, CoPP actions dictate how they enter the control plane, but this cannot bypass L3 ACL interception.

For L2 non-IP packets (such as ARP, LLDP, STP, LACP, PTP, ISIS, EAPOL) CoPP is configured to trap: packets that match CoPP rules are directly sent to the CPU and are not affected by ACL discard policies, ensuring the normal operation of fundamental protocols. CoPP is configured as copy: The packet will be duplicated into two copies. One copy is normally forwarded to the CPU, while the other copy enters the forwarding plane. At this point, this forwarding copy will match the ACL rules. If the ACL rule is deny, the forwarding copy will be discarded.

For L3 IP packets (such as BGP, OSPF, SSH, etc.) If an ACL is configured on the interface and the packet does not match a permit rule, the packet will be directly discarded by the ACL during the L3 forwarding stage, regardless of whether CoPP has configured a forwarding rule for the protocol.

Configuration Recommendation:

For L3 routing protocols (such as BGP/OSPF), when applying ACLs on interfaces, always add a permit rule before deny rules to allow management protocol traffic destined for the local device.

For Layer 2 basic protocols (ARP/LLDP, etc.), if there is no need to forward service traffic, it is recommended to rely solely on the CoPP trap action for upstream transmission, avoiding the configuration of complex rules for such MAC addresses in ACLs.

[Use Cases]

sonic(config)# copp packet-type ptp cir 500 trap-action trap