OcNOS-SP : System Management Guide : System Management Command Reference : Control Plane Policing Commands
Control Plane Policing Commands
This chapter is a reference for the Control Plane Policing (CoPP) commands.
clear interface cpu counters
Use this command to clear the CPU queue counters.
Command Syntax
clear interface cpu counters
Parameter
None
Command Mode
Exec mode and Privileged Exec mode
Applicability
This command was introduced before OcNOS version 1.3.
Example
#clear interface cpu counters
cpu-queue
Use this command to set protocol queues shaper and enable/disable queue monitoring for drop.
Command Syntax
cpu-queue (cpu.q0|cpu.q1|cpu.q2|cpu.q3|cpu.q4|cpu.q5|cpu.q6|cpu.q7| arp|bfd|bgp|bpdu|dsp|icmp|icmp-redirect|igmp|isis|link-local|nhop|ospf|pim|reserved-mc|rsvp-ldp|sflow|vrrp-rip-dhcp|vxlan)(monitor|no-monitor|rate <0-100000>)
no cpu-queue (cpu.q0|cpu.q1|cpu.q2|cpu.q3|cpu.q4|cpu.q5|cpu.q6|cpu.q7| arp|bfd|bgp|bpdu|dsp|icmp|icmp-redirect|igmp|isis|link-local|nhop|ospf|pim|reserved-mc|rsvp-ldp|sflow|vrrp-rip-dhcp|vxlan)(monitor|no-monitor|rate <0-100000>)
Parameters
arp
ARP queue parameters
bfd
BFD queue parameters
bgp
BGP queue parameters
bpdu
BPDU queue parameters
cpu.q0
cpu.q0
cpu.q1
cpu.q1
cpu.q2
cpu.q2
cpu.q3
cpu.q3
cpu.q4
cpu.q4
cpu.q5
cpu.q5
cpu.q6
cpu.q6
cpu.q7
cpu.q7
dsp
SP queue parameters
icmp
ICMP queue parameters
icmp-redirect
ICMP-redirect queue parameters
igmp
GMP queue parameters
isis
ISIS queue parameters
link-local
Link-local queue parameters
nhop
Next hop queue parameters
ospf
OSPF queue parameters
pim
PIM queue parameters
reserved-mc
Reserved-mc queue parameters
rsvp-ldp
RSVP/LDP queue parameters
sflow
Sflow queue parameters
vrrp-rip-dhcp
VRRP/RIP/DHCP queue parameters
vxlan
VXLAN queue parameters
monitor
Monitor CPU queue usage
no-monitor
Do not monitor CPU queue usage
rate
Set CPU queue rate <0-100000>
Default
CPU queues are set with the default values as shown in Table 29-1 and Table 29-2.
Command Mode
Exec mode and Privileged exec mode
Applicability
This command was introduced before OcNOS-SP version 2.4.
Example
Use the following command to configure rate/monitor/no-monitor for protocol queues:
#configure terminal
(config)#cpu-queue cpu-q0 rate 400
 
Use the following command to verify the rate received on each protocol queue:
#show int cpu counters rate kbps
 
Load interval: 30 second
+-------------------+--------------+-------------+--------------+-------------+
| CPU Queue(%) | Rx kbps | Rx pps | Tx kbps | Tx pps |
+-------------------+--------------+-------------+--------------+-------------+
CPU0.q0 (100%) - - 470.63 58
bpdu ( 0%) - - 0.54 1
 
Use the following command to verify the maximum, configured, and default configuration values:
#show cpu-queue details
 
* - Can not configure the parameter
Cpu queue Rate In Kbps Monitor Status
Name Configured Default Max Rate Allowed Configured Default
=========== ========== ======= ================ =========== ==========
cpu.q0 400 900 20000 - * no-monitor
cpu.q1 - 900 900 - * no-monitor
cpu.q2 - 900 900 - * no-monitor
cpu.q3 - 900 900 - * no-monitor
cpu.q4 - 900 900 - * no-monitor
cpu.q5 - 900 900 - * no-monitor
cpu.q6 - 900 20000 - * no-monitor
cpu.q7 - 900 900 - * no-monitor
igmp - 1000 1000 - * no-monitor
is-is - 8000 8000 - no-monitor
reserved mc - 8000 8000 - no-monitor
link-local - 1000 1000 - no-monitor
ospf - 8000 8000 - no-monitor
bgp - 8000 8000 - no-monitor
rsvp/ldp - 1500 1500 - no-monitor
vrrp/rip/dhcp - 2000 2000 - no-monitor
pim - 8000 8000 - * no-monitor
icmp - 1000 1000 - no-monitor
arp - 1000 1000 - no-monitor
bpdu - 1000 1000 - no-monitor
bfd - 1000 1000 - no-monitor
sflow - 16384 16384 - no-monitor
dsp - 1500 1500 - no-monitor
vxlan - 500 500 - no-monitor
nhop - 500 500 - no-monitor
icmp-redirect - 400 400 - no-monitor
guest-vm - 8000 8000 - * no-monitor
 
Use the following command to remove the configuration:
(config)#no cpu-queue cpu.q0
(config)#exit
#
#show cpu-queue details
* - Can not configure the parameter
Cpu queue Rate In Kbps Monitor Status
Name Configured Default Max Rate Allowed Configured Default
=========== ========== ======= ================ =========== ==========
cpu.q0 - 900 20000 - * no-monitor
cpu.q1 - 900 900 - * no-monitor
cpu.q2 - 900 900 - * no-monitor
cpu.q3 - 900 900 - * no-monitor
cpu.q4 - 900 900 - * no-monitor
cpu.q5 - 900 900 - * no-monitor
cpu.q6 - 900 20000 - * no-monitor
cpu.q7 - 900 900 - * no-monitor
igmp - 1000 1000 - * no-monitor
is-is - 8000 8000 - no-monitor
reserved mc - 8000 8000 - no-monitor
link-local - 1000 1000 - no-monitor
ospf - 8000 8000 - no-monitor
bgp - 8000 8000 - no-monitor
rsvp/ldp - 1500 1500 - no-monitor
vrrp/rip/dhcp - 2000 2000 - no-monitor
pim - 8000 8000 - * no-monitor
icmp - 1000 1000 - no-monitor
arp - 1000 1000 - no-monitor
bpdu - 1000 1000 - no-monitor
bfd - 1000 1000 - no-monitor
sflow - 16384 16384 - no-monitor
dsp - 1500 1500 - no-monitor
vxlan - 500 500 - no-monitor
nhop - 500 500 - no-monitor
icmp-redirect - 400 400 - no-monitor
guest-vm - 8000 8000 - * no-monitor
show interface cpu counters queue-stats
Use this command to display the counters of packets destined to the CPU.
For details about this command, see show interface counters queue-stats.
Example
#show interface cpu counters queue-stats
E - Egress, I - Ingress, Q-Size is in bytes
+--------------------+--------+-----------------+-------------------+-----------------+-------------------+
| Queue/Class-map | Q-Size | Tx pkts | Tx bytes | Dropped pkts | Dropped bytes |
+--------------------+--------+-----------------+-------------------+-----------------+-------------------+
igmp (E) 2097152 151 16258 0 0
reserved mc (E) 2097152 62826 6324464 0 0
ospf (E) 1048576 3184 308548 0 0
bgp (E) 1048576 27587 3938124 0 0
rsvp/ldp (E) 1048576 29138 3090385 0 0
icmp (E) 1048576 176 20924 0 0
arp (E) 1048576 751 48064 0 0
bpdu (E) 1048576 26833 3129794 0 0
bfd (E) 1048576 38 4028 0 0
dsp (E) 78643200 507 34476 0 0
 
show cpu-queue details
Use this command to display CPU queue details.
Command Syntax
show cpu-queue details
Parameters
None
Default
Not applicable
Command Mode
Exec mode and Privileged exec mode
Applicability
This command was introduced before OcNOS-SP version 2.4.
Example
Use the following command to configure rate/monitor/no-monitor for protocol queues:
#configure terminal
(config)#cpu-queue cpu-q0 rate 400
 
Use the following command to verify the maximum, configured, and default configuration values:
#show cpu-queue details
 
* - Can not configure the parameter
Cpu queue Rate In Kbps Monitor Status
Name Configured Default Max Rate Allowed Configured Default
=========== ========== ======= ================ =========== ==========
cpu.q0 400 900 20000 - * no-monitor
cpu.q1 - 900 900 - * no-monitor
cpu.q2 - 900 900 - * no-monitor
cpu.q3 - 900 900 - * no-monitor
cpu.q4 - 900 900 - * no-monitor
cpu.q5 - 900 900 - * no-monitor
cpu.q6 - 900 20000 - * no-monitor
cpu.q7 - 900 900 - * no-monitor
igmp - 1000 1000 - * no-monitor
is-is - 8000 8000 - no-monitor
reserved mc - 8000 8000 - no-monitor
link-local - 1000 1000 - no-monitor
ospf - 8000 8000 - no-monitor
bgp - 8000 8000 - no-monitor
rsvp/ldp - 1500 1500 - no-monitor
vrrp/rip/dhcp - 2000 2000 - no-monitor
pim - 8000 8000 - * no-monitor
icmp - 1000 1000 - no-monitor
arp - 1000 1000 - no-monitor
bpdu - 1000 1000 - no-monitor
bfd - 1000 1000 - no-monitor
sflow - 16384 16384 - no-monitor
dsp - 1500 1500 - no-monitor
vxlan - 500 500 - no-monitor
nhop - 500 500 - no-monitor
icmp-redirect - 400 400 - no-monitor
guest-vm - 8000 8000 - * no-monitor