copp user-def
Syntax
copp user-def <copp-id> {ipv4 | ipv6}{any <protocol> <dest-port> | <dest-ipaddress> [<protocol> <dest-port>]}
{limit <limit-val> | none | drop}
[tcp | udp]}
no copp user-def <copp-id> {ipv4 | ipv6}{any <protocol> <dest-port> | <dest-ipaddress> [<protocol> <dest-port>]}
{limit <limit-val> | none | drop}
[tcp | udp]}
Description
Enables control plane policing for a user-defined traffic class. Matches on a particular ip address and layer 4 port for CoPP.
The
no
form of this command disables control plane policing.
Command context
config
Parameters
- user-def <copp-id>
Specifies up to 8 user defined copp configurations.
{ipv4|ipv6}
Specifies control plane policing for IPv4 or IPv6.
any <protocol> <dest-port>
Specify the port number between 0-65535.
<dest-ipaddress>
Specifies the IP address of User Defined Control Plane Policing.
<protocol>
Specifies control plane policing for transport layer protocol (TCP, UDP), the destination port for the given TCP or UDP protocol .
limit <limit-val>
Specifies the rate limit value in packets per second.
none
Allows all traffic matching the user-defined traffic class with no limit.
drop
Blocks user-defined traffic from reaching the switch CPU.
tcp
Telnet protocol for user-defined control plane policing.
udp
Protocol for user-defined control plane policing.
Example
Enable control plane policing only for SNMP traffic reaching the switch at up to 80 packets per second on each slot:
switch(config)# copp user-def ipv4 any udp 161 limit 80
Example
Block all Telnet traffic from reaching the switch:
switch(config)# copp user-def 1 ipv4 any tcp 23 drop
switch(config)# show copp user-def config
CoPP-ID L3 Protocol Port Threshold
------- -- -------- ---- ---------
1 IPv4 udp 161 drop
2 IPv4 udp 69 none