梦里花 2007-4-21 16:34
谈谈广播风暴的成因、预防及排障
[size=2][color=#800080]一、成因
广播风暴指过多的广播包消耗了大量的网络带宽,导致正常的数据包无法正常在网络中传送,通常指一个广播包引起了多个的响应,而每个响应又引起了多个得响应,就像滚雪球一样,把网络的所有带宽都消耗殆尽。该现象通常是由于网络环路、故障网卡、病毒等引起的。
二、预防(以CISCO catalyst switch为例)
1、首先使用网管分析你网络的baseline,这样可以明确你的网络当中正常情况下的广播包比例是多少。
2、目前绝大多数交换机都支持广播风暴抑制特性,配置了这个特性以后,你可以控制每个端口的广播包维持在特定的比例之下,这样可以保留带宽给必须的应用。
配置:(以CISCO catalyst switch为例)
Int XX
storm-control broadcast level 20.00
switch#sh storm
Interface Filter State Level Current
--------- ------------- ------- -------
Fa1/0/1 Forwarding 20.00% 0.00%
3、针对缺省STP配置无法排除的网络环路问题,利用STP的BPDUguard特性来预防广播风暴。此种环路情况示意图如下:
switch------hub(portA---portB)
Switch启用了STP,而hub则被人有意无意的用一根网线联起来,导致引起了环路。SWITCH的端口不会收到其他交换机或本交换机其他端口的BPDU,不会触发该端口的STP决策过程,也就不可能blocking该端口,这样就会引起广播风暴。我们可以利用CISCO STP的BPDUguard特性来预防这一点。
int xxx
spanning-tree bpduguard enable
***值得注意的是bpduguard可以在全局下配置,也可以在每端口的基础上配置。如果在全局下配置,则只对配置了portfast的端口起作用,如果在端口下配置,则不用配置portfast
三、排障(以CISCO catalyst switch为例)
如果网络中已经产生了网络风暴(现象通常为网络丢包、响应迟缓、时断时通等),则可以利用如下的方法来排障
1、首先确认是否是网络风暴或其他异常流量引起的网络异常,在核心交换机上
Switch〉sh proc cpu | e 0.00
CPU utilization for five seconds: 19%/0%; one minute: 19%; five minutes: 19%
PID Runtime(ms) Invoked uSecs 5Sec 1Min 5Min TTY Process
15 20170516 76615501 263 0.31% 0.13% 0.12% 0 ARP Input
26 7383266801839439482 401 5.03% 4.70% 5.08% 0 Cat4k Mgmt HiPri
27 8870781921122570949 790 5.67% 7.50% 6.81% 0 Cat4k Mgmt LoPri
43 730060152 341404109 2138 6.15% 5.29% 5.28% 0 Spanning Tree
50 59141788 401057972 147 0.47% 0.37% 0.39% 0 IP Input
56 2832760 3795155 746 0.07% 0.03% 0.01% 0 Adj Manager
58 4525900 28130423 160 0.31% 0.25% 0.18% 0 CEF process
96 20789148 344043382 60 0.23% 0.09% 0.08% 0 Standby (HSRP)
如果交换机的CPU利用率较高,且大部分的资源都被“IP Input”进程占用,则基本可以确定网络中有大流量的数据
2、查找异常流量是从交换机的那一个端口来的:
switch #sh int | i protocol|rate|broadcasts
FastEthernet1/0/1 is up, line protocol is up (connected)
Queueing strategy: fifo
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 2000 bits/sec, 3 packets/sec
Received 241676 broadcasts (0 multicast)
如果找到一个端口的input rate非常高,且接收到的广播包也非常多,则基本可以找到来源,如果该端口下联的也是可管理的交换机,则再次执行此过程,直到找到一个连接PC或者HUB的端口
3、shutdown该端口
int xx
shutdown
4、查找产生异常流量的根源
如果是HUB环路,则拆掉环;如果是病毒,则做杀毒处理;如果是网卡异常,则更换网卡。此部分不详述。
5、确认交换机的CEF功能是否启用,如果没有,则需要启用,可以加速流量的转发
switch〉sh ip cef
配置CEF:
全局模式下输入
ip cef[/color][/size][size=6][color=#ff8c00] [/color][/size]
rswzy 2007-6-21 21:41
不错。。。简单明了哈。。。好东西。不过能不能多弄点方法?
rswzy 2007-6-23 15:44
今天又来看了下。。。觉得真的能学好多东西哦。好多都是没学过的。。之前都没听过 。。。
taizigzd 2007-8-5 00:14
怎么了重了呀!
[url]http://www.sharecenter.net/viewthread.php?tid=132934&pid=1658978&page=1&extra=page%3D2#pid1658978[/url]
白胡子 2007-8-8 10:42
现在storm control功能,很多交换机都支持了,也不用动不动就shutdown咯
halfangel 2007-8-22 16:31
这个我认为还是用sniffer比较好~直观快捷,主管们才不会等你敲了半天才反应过来 何况大型网络也不会让你浪费时间的去排错 一般的MRTG+SNIFFER可以解决所有的问题
xiaohe207 2007-8-28 15:49
介绍的很好,现在使用storm-control 也成为一种趋势了
heyilang 2007-11-26 18:12
storm-control {broadcast | multicast |unicast} level {level [level-low] | bps bps[bps-low] | pps pps [pps-low]}
下面是level参数的解释:
For level, specify the rising threshold level for broadcast,
multicast, or unicast traffic as a percentage (up to two decimal
places) of the bandwidth. The port blocks traffic when the
rising threshold is reached. The range is 0.00 to 100.00.
(Optional) For level-low, specify the falling threshold level as
a percentage (up to two decimal places) of the bandwidth. This
value must be less than or equal to the rising suppression
value. The port forwards traffic when traffic drops below this
level. If you do not configure a falling suppression level, it is
set to the rising suppression level. The range is 0.00 to 100.00.
If you set the threshold to the maximum value (100 percent),
no limit is placed on the traffic. If you set the threshold to 0.0,
all broadcast, multicast, and unicast traffic on that port is
blocked.
例如:storm-control broadcast level 50 30
根据上述参数的解释,广播低于总速率的30%开始正常传输,广播高于50%开始阻止传输。
那么介于30%和50%之间的时候,是个什么状态?有何作用?
各位请看下上述英文,难道我理解上述英文错误。
yjwfn2668 2007-11-27 14:18
终于看到一篇好文章了,谢谢楼主了!!!
heyilang 2007-11-29 22:46
storm-control {broadcast | multicast |unicast} level {level [level-low] | bps bps[bps-low] | pps pps [pps-low]}
下面是level参数的解释:
For level, specify the rising threshold level for broadcast,
multicast, or unicast traffic as a percentage (up to two decimal
places) of the bandwidth. The port blocks traffic when the
rising threshold is reached. The range is 0.00 to 100.00.
(Optional) For level-low, specify the falling threshold level as
a percentage (up to two decimal places) of the bandwidth. This
value must be less than or equal to the rising suppression
value. The port forwards traffic when traffic drops below this
level. If you do not configure a falling suppression level, it is
set to the rising suppression level. The range is 0.00 to 100.00.
If you set the threshold to the maximum value (100 percent),
no limit is placed on the traffic. If you set the threshold to 0.0,
all broadcast, multicast, and unicast traffic on that port is
blocked.
例如:storm-control broadcast level 50 30
根据上述参数的解释,广播低于总速率的30%开始正常传输,广播高于50%开始阻止传输。
那么介于30%和50%之间的时候,是个什么状态?有何作用?
各位请看下上述英文,难道我理解上述英文错误。
heyilang 2007-11-30 10:34
还是net130网站高手比较多,菊花论坛真是差劲,半天没人回答。