我的一台3750G透过单模光纤接2960交换机,今天早上之间网络不通,3750G和2960上的SFP模块指示灯都不亮,查看CISCO 3750G的日志,有如下提示:
Apr 27 05:22:03: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to up
Apr 27 05:22:04: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to down
Apr 27 05:22:08: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to up
Apr 27 05:23:47: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to down
Apr 27 05:23:54: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to up
Apr 27 05:24:32: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to down
Apr 27 05:24:35: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to up
Apr 27 05:24:50: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to down
Apr 27 05:24:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to up
Apr 27 05:24:55: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to down
Apr 27 05:24:58: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to up
Apr 27 05:25:01: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to down
Apr 27 05:25:02: %LINK-3-UPDOWN: Interface GigabitEthernet1/1/1, changed state to down
Apr 27 05:25:04: %LINK-3-UPDOWN: Interface GigabitEthernet1/1/1, changed state to up
Apr 27 05:25:06: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to up
Apr 27 05:25:09: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/1/1, changed state to down
Apr 27 05:25:14: %PM-4-ERR_DISABLE: link-flap error detected on Gi1/1/1, putting Gi1/1/1 in err-disable state
Apr 27 05:25:15: %LINK-3-UPDOWN: Interface GigabitEthernet1/1/1, changed state to down
解决如下:
conf t
int gi1/1/1
shut
no shut
end
OK!!!
查阅关于link-flap及err-disable的资料如下:
http://www.net130.com/cms/Pub/Tech/tech_zh/2010_11_07_20606.htm
http://shanliren.blog.51cto.com/159454/165595
Cisco网站上关于link-flap的说明:
Link-flap error
Link flap means that the interface continually goes up and down. The interface is put into the errdisabled state if it flaps more than five times in 10 seconds. The common cause of link flap is a Layer 1 issue such as a bad cable, duplex mismatch, or bad Gigabit Interface Converter (GBIC) card. Look at the console messages or the messages that were sent to the syslog server that state the reason for the port shutdown.
我的翻译:
Link flap的意思是接口持续性的up和down。如果一个接口在10秒内发生超过5次up/down,将被置为errdisable状态。link-flap的原因为layer-1层的诸如网线问题、双工不匹配或者故障的千兆GBIC卡。可以查看console或者syslog服务器下的log日志,获取端口shutdwn的原因。
出现了这个问题,我们不得不重视起交换机端口“假死”的现象,寻求在交换机不重启的状态下将该端口“拯救”回来的方法。
拯救步骤1:查看日志/端口的状态
登录进入交换机后,执行show log,会看到如下的提示:
21w6d: %ETHCNTR-3-LOOP_BACK_DETECTED: Keepalive packet loop-back detected on FastEthernet0/20.
21w6d: %PM-4-ERR_DISABLE: loopback error detected on Fa0/20, putting Fa0/20 in err-disable state
以上信息就明确表示由于检测到第20端口出现了环路,所以将该端口置于了err-disable状态。
查看端口的状态
Switch# show inter fa0/20 status
Port Name Status Vlan Duplex Speed Type
Fa0/20 link to databackup err-disabled 562 auto auto 10/100BaseTX
这条信息更加明确的表示了该端口处于err-disabled状态。
既然看到了该端口是被置于了错误的状态了,我们就应该有办法将其再恢复成正常的状态。
拯救步骤2:将端口从错误状态中恢复回来