免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1004 | 回复: 0
打印 上一主题 下一主题

网络速度变慢,线路丢包率上升现象小析 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-01-09 10:59 |只看该作者 |倒序浏览
网络速度变慢,线路丢包率上升现象小析
最近很多朋友都在问这个问题:为什么速度变慢了,线路质量不行了?其实这些大多由于路由器的资源被消耗过多引起的,造成这种状况的原因很多,顺便发个帖子给大家些意见。
如发现异常情况,首先show process cpu和show process mem,通常会发现IP input process占用过多资源(正常情况下没有这么高)
接着我们检查有无以下情况:
1.Fast switching 在大流量的外出接口上是否被disabled.可以用 show interfaces switching
命令察看接口流量.然后在接口上重新 Re-enable fast switching .记住 fast switching是配置在output
接口.
2.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的包)
接下来,用 show interfaces 和show interfaces
switching命令识别大量包进出的端口;一旦你确认进入端口后,打开 ip accounting on the outgoing
interface看其特征.如果是攻击, 源地址会不断变化但是目的地址不变.可以用access list暂时解决此类问题
(最好在接近攻击源的设备上配置), 最终解决办法是停止攻击源。
【举例:】
1.路由更新信息(取决于路由协议)过快的更新值显示网络不稳定并增加了CPU utilization. 可以用show ip route检查路由表
2.其它人登录运行命令导致大量log输出
3.Spoof 攻击.用show ip traffic 命令确认,可发现大量到本地的包.
【附加:】
几种不能被fast switched的包
1.需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。
2.通过X.25封装的包,因为有 flow control 在Open System Interconnection (OSI) layer第二层.
3.Compressed traffic,如果路由器里没有Compression Service Adapter (CSA)卡, compressed packets 只能被process-switched.
4.Encrypted traffic. 如果路由器里没有 Encryption Service Adapter (ESA)卡, encrypted packets 只能被process-switched.
应用中遇到的其他可能情况:
1.大量的User Datagram Protocol (UDP) 流量. 可以用解决 spoof attack的步骤解决.
2.大量组播流穿越路由器。可以enable fast switching of multicast packets using the ip
mroute-cache interface configuration command (fast switching of
multicast packets is off by default).
3.大量广播包。 Check the number of broadcast packets in the show interfaces command output.
4.路由器被 over-used 不能处理amount of traffic, 可以用 load among other routers 或者 考虑另购买high-end router.
5.路由器配置了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过滤到目的地的包
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/22677/showart_460032.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP