COPP Speed Limit Configuration
此内容尚不支持你的语言。
COPP Speed Limit Configuration
Section titled “COPP Speed Limit Configuration”show copp
Section titled “show copp”[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 coppTrapId MeterType CIR ACTION-------- ----------- -------- --------acl packets 1250pps traparp packets 4500pps copybfd packets 2000pps trapbfdv6 packets 2000pps trapbgp packets 4500pps trapbgpv6 packets 4500pps trapdhcp packets 4500pps copydhcpv6 packets 4500pps copyiccp packets 3750pps trapicmp packets 1250pps trapigmp packets 1250pps trapip2me packets 15000pps trapisis packets 1250pps traplacp packets 800pps trapldp packets 4500pps copylldp packets 400pps trapmld packets 1250pps trapndp packets 4500pps copyospf packets 4500pps trapospfv6 packets 4500pps trappim packets 1250pps trapptp packets 1250pps trapsnmp packets 2500pps trapsnp packets 4500pps trapssh packets 3750pps trapstp packets 800pps traptelnet packets 2500pps trapvrrp packets 1250pps copyvrrpv6 packets 1250pps copyshow counters copp
Section titled “show counters copp”[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 coppPROTOCOL Total/pkts CPU/pkts CPU/pps Drop/pkts Drop/pps------------------- ------------ ---------- --------- ----------- ----------ACL 0 0 0 0 0ARP_REQ 1268197 1268197 86.02 0 0ARP_RESP 114 114 0 0 0BFD 0 0 0 0 0BFDV6 0 0 0 0 0BFDV6_MICRO 0 0 0 0 0BFD_MICRO 0 0 0 0 0BGP 0 0 0 0 0BGPV6 0 0 0 0 0DHCP 0 0 0 0 0DHCPV6 233 233 0 0 0DHCPV6_L2 0 0 0 0 0DHCP_L2 0 0 0 0 0EAPOL 0 0 0 0 0FTP 0 0 0 0 0GNMI 0 0 0 0 0HTTPCLIENT 0 0 0 0 0HTTPSERVER 0 0 0 0 0ICCP 0 0 0 0 0ICMP_ECHO 1474 1474 0 0 0IGMP_LEAVE 0 0 0 0 0IGMP_QUERY 0 0 0 0 0IGMP_V1_REPORT 0 0 0 0 0IGMP_V2_REPORT 0 0 0 0 0IGMP_V3_REPORT 0 0 0 0 0IP2ME 1643 1643 0 0 0ISIS 0 0 0 0 0LACP 0 0 0 0 0LDP 0 0 0 0 0LLDP 9952 9952 1 0 0MLD_V1_DONE 0 0 0 0 0MLD_V1_REPORT 0 0 0 0 0MLD_V1_V2 0 0 0 0 0MLD_V2_REPORT 48 34 0 0 0NEIGH_ADVERTISEMENT 0 0 0 0 0NEIGH_DISCOVERY 71 71 0 0 0NEIGH_SOLICITATION 0 0 0 0 0NTPCLIENT 0 0 0 0 0NTPSERVER 0 0 0 0 0OSPF 0 0 0 0 0OSPFV6 0 0 0 0 0P4RT 0 0 0 0 0PIM 0 0 0 0 0PPPOE_CONTROL 0 0 0 0 0PPPOE_DISCOVERY 0 0 0 0 0PPPOE_SESSION_MISS 0 0 0 0 0PTP 35173 35173 2.99 0 0SNMP 282 282 0 0 0SNP 0 0 0 0 0SSH 10074 10074 9.98 0 0STP 0 0 0 0 0TELNET 0 0 0 0 0TFTP 0 0 0 0 0VRRP 0 0 0 0 0VRRPV6 0 0 0 0 0copp 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