关于路由器CPU利用率过高的解决办法
发布时间:2013-07-19 17:31:09 作者:佚名
我要评论
对于路由器CPU利用率过高有什么好的解决办法呢?很大一部分朋友都不知道如何解决这个问题。下面小编就为大家介绍一下解决这个问题的方法吧,需要的朋友可以过来参考下
第一步,show process cpu 如显示IP input process is using a lot of CPU resources,检查以下情况:
一、Fast switching
在大流量的外出接口上是否被disabled.可以用 show interfaces switching 命令察看接口流量.然后在接口上重新 Re-enable fast switching .记住 fast switching是配置在output 接口.
二、Fast switching on the same interface是否被disabled. 如一个接口配有多个网段(secondary addresses )并且在这些网段间流量很大时 路由器工作在process-switches方式 .这种情况下要在接口上enable ip route-cache same-interface.
三、不能被fast switched的包有:switching cache没有entry的包、目的地是路由器的包、需要协议转换的包、做了policy routing的包、X.25 encapsulation的包、Multilink PPP、压缩和加密的包目的地是router的包.
举例:1.路由更新信息(取决于路由协议)过快的更新值显示网络不稳定并增加了CPU utilization. 可以用show ip route检查路由表
2.其它人登录运行命令导致大量log输出
3.Spoof 攻击.用show ip traffic 命令确认,可发现大量到本地的包.
第二步,用 show interfaces 和show interfaces switching命令识别大量包进出的端口;一旦你确认进入端口后,打开 ip accounting on the outgoing interface看其特征.如果是攻击,源地址会不断变化但是目的地址不变.可以用access list暂时解决此类问题 (最好在接近攻击源的设备上配置), 最终解决办法是停止攻击源。
一.需policy routing的包.在 Cisco IOS version 11.3以前, policy-routed packets不能被 fast switched. IOS version 11.3 以后允许 policy-routed packets to be fast switched.使用接口命令ip route-cache policy。
二.通过X.25封装的包,因为有 flow control on the second Open System Interconnection (OSI) layer.7.Compressed traffic.如没有Compression Service Adapter (CSA) in the router, compressed packets must be process-switched.8.Encrypted traffic. 如没有 Encryption Service Adapter (ESA) in the router, encrypted packets must be process-switched.
三.大量的User Datagram Protocol (UDP) 流量. 可以用解决 spoof attack的步骤解决.
四.大量组播流穿越路由器。可以enable fast switching of multicast packets using the ip mroute-cache interface configuration command (fast switching of multicast packets is off by default).
五.大量广播包。 Check the number of broadcast packets in the show interfaces command output.
六.路由器被 over-used 不能处理amount of traffic, 可以用 load among other routers 或者 考虑另购买high-end router.
七.路由器配置了IP NAT (Network Address Translation)并且有很多 DNS (Domain Name System) 包穿越 router. UDP or TCP packets with source and/or destination port 53 (DNS) are always punted to process level by NAT.
无论是什么原因导致high CPU utilization in the IP Input process, 都可以用 debugging IP packets察看.因为 CPU utilization已经较高, debugging产生的许多信息只能通过 logging buffered而不能 Logging to a console。 debugging过程不要超过 3-5秒。如果发现可疑的源可以断掉其设备的连接或者用ACL过滤到目的地的包。
一、Fast switching
在大流量的外出接口上是否被disabled.可以用 show interfaces switching 命令察看接口流量.然后在接口上重新 Re-enable fast switching .记住 fast switching是配置在output 接口.
二、Fast switching on the same interface是否被disabled. 如一个接口配有多个网段(secondary addresses )并且在这些网段间流量很大时 路由器工作在process-switches方式 .这种情况下要在接口上enable ip route-cache same-interface.
三、不能被fast switched的包有:switching cache没有entry的包、目的地是路由器的包、需要协议转换的包、做了policy routing的包、X.25 encapsulation的包、Multilink PPP、压缩和加密的包目的地是router的包.
举例:1.路由更新信息(取决于路由协议)过快的更新值显示网络不稳定并增加了CPU utilization. 可以用show ip route检查路由表
2.其它人登录运行命令导致大量log输出
3.Spoof 攻击.用show ip traffic 命令确认,可发现大量到本地的包.
第二步,用 show interfaces 和show interfaces switching命令识别大量包进出的端口;一旦你确认进入端口后,打开 ip accounting on the outgoing interface看其特征.如果是攻击,源地址会不断变化但是目的地址不变.可以用access list暂时解决此类问题 (最好在接近攻击源的设备上配置), 最终解决办法是停止攻击源。
一.需policy routing的包.在 Cisco IOS version 11.3以前, policy-routed packets不能被 fast switched. IOS version 11.3 以后允许 policy-routed packets to be fast switched.使用接口命令ip route-cache policy。
二.通过X.25封装的包,因为有 flow control on the second Open System Interconnection (OSI) layer.7.Compressed traffic.如没有Compression Service Adapter (CSA) in the router, compressed packets must be process-switched.8.Encrypted traffic. 如没有 Encryption Service Adapter (ESA) in the router, encrypted packets must be process-switched.
三.大量的User Datagram Protocol (UDP) 流量. 可以用解决 spoof attack的步骤解决.
四.大量组播流穿越路由器。可以enable fast switching of multicast packets using the ip mroute-cache interface configuration command (fast switching of multicast packets is off by default).
五.大量广播包。 Check the number of broadcast packets in the show interfaces command output.
六.路由器被 over-used 不能处理amount of traffic, 可以用 load among other routers 或者 考虑另购买high-end router.
七.路由器配置了IP NAT (Network Address Translation)并且有很多 DNS (Domain Name System) 包穿越 router. UDP or TCP packets with source and/or destination port 53 (DNS) are always punted to process level by NAT.
无论是什么原因导致high CPU utilization in the IP Input process, 都可以用 debugging IP packets察看.因为 CPU utilization已经较高, debugging产生的许多信息只能通过 logging buffered而不能 Logging to a console。 debugging过程不要超过 3-5秒。如果发现可疑的源可以断掉其设备的连接或者用ACL过滤到目的地的包。
相关文章

售价599元起! 华为路由器X1/Pro发布 配置与区别一览
华为路由器X1/Pro发布,有朋友留言问华为路由X1和X1 Pro怎么选择,关于这个问题,本期图文将对这二款路由器做了期参数对比,大家看看哪款才是你的理想选择2025-04-17
路由器安装以后发现不能上网,这可能是由于路由器未拨号、MAC地址绑定等原因所致,下面我们就来看看详细解决办法2025-04-09
在现代生活中,路由器已成为我们工作和生活的必需品,然而,当路由器出现问题时,我们往往束手无策,本文将为您提供一套实用的路由器故障排除指南,助您轻松应对各种常见问2025-04-09
支持触屏的软路由? GL.iNe BE3600路由器拆机评测
GL.iNet广联智通推出的Wi-Fi 7便携式无线路由器Slate 7横空出世,网速直接起飞!这速度,快到你怀疑人生!但问题来了,这玩意儿真有那么神?详细请看下文测评2025-03-31
TPLINK TL7DR7260 v2.0和v1.0有什么区别? 两款路由器拆机测评
TL-7DR7260易展版有两个版本,分别是v2.0和v1.0,这两个版本有什么区别?下面我们就来看看详细的拆机对比2025-03-31
CPU决定了不能给你10G口! TP-LINK TL-7DR7280路由器拆机测评
实力与颜值并存的TP-Link TL-7DR7280易展Turbo版以够用问准则,是目前市面上好评非常多、用户群体非常广的一款无线路由器,性能稳定,功能强悍,给你最可靠的网络2025-03-31
高性价比WiFi6路由+全屋覆盖穿墙王! 网件RAX50路由器全面测评
网件RAX50路由器表现如何?确实,它以稳定高速的传输能力,让无线连接体验变得轻松愉快,详细测评数据如下图文所述2025-03-15
WiFi6时代来临! 华三H3C NX54路由器还值得购买吗?
WiFi6时代已经来临,众多路由器厂商也纷纷推出了兼容WiFi6协议的路由器,今天我们将深入体验H3C NX54路由器,这款由知名企业H3C新华三集团推出的家用路由器2025-03-14
玩游戏最怕什么?当然是卡顿!延迟!关键时刻掉线简直心态爆炸,该怎么选电竞路由器呢?路由器这玩意儿,可不是越贵越好,适合自己的才是王道,下面我们推荐八款适合玩游戏2025-03-14
FiberHome 5G CPE移动路由器值得入手吗? 烽火5g路由器性能测评
FiberHome烽火 5G CPE移动路由器支持双模4G/5G全网通,支持WiFi 6双频,配备双千兆网口,无线速率高达1800Mbps,这款路由器性能如何?值得购买吗?详细如下2025-03-14












最新评论