On the network shown in Figure 1, users on different network segments access the Internet through the Switch. Because many users connect to the Switch, the CPU of the Switch receives a large number of protocol packets, such as ARP Request packets, ARP Reply packets, and ARP Miss packets, and frequently processes tasks such as the ARPA task. As a result, the CPU usage increases sharply, affecting service processing. The customer expects that the Switch can generate an alarm and rate-limit these protocol packets and tasks when the CPU usage exceeds 90%, so that processing of other services will not be affected and the CPU usage is reduced to a stable range.
The configuration roadmap is as follows:
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] undo cpu-overload-control disable slot 0
[Switch] undo cpu-overload-control packet-type arp-request arp-reply arp-miss disable slot 0
[Switch] cpu-overload-control task ARPA enable slot 0
[Switch] undo cpu-overload-control alarm disable
[Switch] cpu-overload-control threshold1 90 slot 0
Warning: The value of threshold 1 affects the service processing capability when the CPU is overloaded. Continue? [Y/N]:y
[Switch] quit
# View the OLC configuration.
<Switch> display cpu-overload-control configuration slot 0
CPU OLC Status: enable.
Alarm Status : enable.
Low Threshold: 90%.
High Threshold: 98%.
Ajustfactor : 10.
Total Weight : 10000.
----------------------------------
Task Weight Enable
----------------------------------
ARPA 2500 Y
ACL 2500 N
----------------------------------
----------------------------------
Protocol Weight Enable
----------------------------------
8021x 290 Y
8021x-1st 90 Y
8021x-other 200 Y
arp-request 290 Y
arp-reply 290 Y
icmp 290 Y
dhcp 290 Y
arp-miss 290 Y
igmp 290 Y
ttl-one 290 Y
ip-frag 290 Y
fib-hit 290 Y
icmpv6 290 Y
dhcpv6 290 Y
nd 290 Y
mld 290 Y
cos-4 250 Y
cos-3 240 Y
cos-2 200 Y
cos-1 150 Y
cos-0 100 Y
----------------------------------
# View OLC statistics.
<Switch> display cpu-overload-control statistics slot 0
--------------------------------------------------------------------------------
Task Total Runtime Total Delaytime Average Runtime Average Delaytime
(ms) (ms) (ms) (ms)
--------------------------------------------------------------------------------
ARPA 0 0 0 0
ACL 0 0 0 0
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Protocol Total Pass Total Drop Average Pass Average Drop
(packet) (packet) (packet) (packet)
--------------------------------------------------------------------------------
8021x-1st 0 0 0 0
8021x-other 0 0 0 0
arp-request 0 0 0 0
arp-reply 0 0 0 0
icmp 0 0 0 0
dhcp 0 0 0 0
arp-miss 0 0 0 0
igmp 0 0 0 0
ttl-one 0 0 0 0
ip-frag 0 0 0 0
fib-hit 0 0 0 0
icmpv6 0 0 0 0
dhcpv6 0 0 0 0
nd 0 0 0 0
mld 0 0 0 0
cos-4 0 0 0 0
cos-3 0 0 0 0
cos-2 0 0 0 0
cos-1 0 0 0 0
cos-0 0 0 0 0
--------------------------------------------------------------------------------