交换机端口“假死”问题

几天在维护宿舍网络时碰着一个当时感受很独特的问题:4楼交换机的20口无论怎么连线,链路都不通;进入交换机,端口也启不了;连其他的端口全没有问题。本觉得是端口坏掉了,其后听说是因为环路,20口被关了,错误规复就好了。华为交换机配置

于是上网查了查,大白了个中的原理:

交换机正在事情的端口,溘然变成封锁状态的假死现象,第一可以用重启交换机来办理,第二可以用呼吁规复。

对付用呼吁规复的要领的详细步调如下:

步调1:查察日志/端口的状态

登录进入交换机后,执行showlog,会看到如下的提示:

21w6d:%ETHCNTR-3-LOOP_BACK_DETECTED:Keepalivepacketloop-backdetectedonFastEthernet0/20.

21w6d:%PM-4-ERR_DISABLE:loopbackerrordetectedonFa0/20,puttingFa0/20inerr-disablestate

以上信息就明晰暗示由于检测到第20端口呈现了环路,所以将该端口置于了err-disable状态。

查察端口的状态

Switch#showinterfa0/20status

PortNameStatusVlanDuplexSpeedType

Fa0/20linktodatabackuperr-disabled562autoauto10/100BaseTX

这条信息越发明晰的暗示了该端口处于err-disabled状态。

既然看到了该端口是被置于了错误的状态了,我们就应该有步伐将其再规复成正常的状态。

拯救步调2:将端口从错误状态中规复返来

进入交换机全局设置模式,执行errdisablerecoverycause?,会看到如下信息:

Switch(config)#errdisablerecoverycause?

allEnabletimertorecoverfromallcauses

bpduguardEnabletimertorecoverfromBPDUGuarderrordisablestate

channel-misconfigEnabletimertorecoverfromchannelmisconfigdisablestate

dhcp-rate-limitEnabletimertorecoverfromdhcp-rate-limiterrordisablestate

dtp-flapEnabletimertorecoverfromdtp-flaperrordisablestate

gbic-invalidEnabletimertorecoverfrominvalidGBICerrordisablestate

l2ptguardEnabletimertorecoverfroml2protocol-tunnelerrordisablestate

link-flapEnabletimertorecoverfromlink-flaperrordisablestate

loopbackEnabletimertorecoverfromloopbackdetecteddisablestate

pagp-flapEnabletimertorecoverfrompagp-flaperrordisablestate

psecure-violationEnabletimertorecoverfrompsecureviolationdisablestate

security-violationEnabletimertorecoverfrom802.1xviolationdisablestate

udldEnabletimertorecoverfromudlderrordisablestate

unicast-floodEnabletimertorecoverfromunicastflooddisablestate

vmpsEnabletimertorecoverfromvmpsshutdownerrordisablestate

从列出的选项中,我们可以看出,有很是多的原因会引起端口被置于错误状态,由于我们明晰的知道这台交换机上的端口是由于环路问题而被置于错误状态的,所以就可以直接键入呼吁:

Switch(config)#errdisablerecoverycauseloopback

拯救步调3:显示被置于错误状态端口的规复情形

Switch#showerrdisablerecovery

ErrDisableReasonTimerStatus

-------------------------------

udldDisabled

bpduguardDisabled

security-violatioDisabled

channel-misconfigDisabled

vmpsDisabled

pagp-flapDisabled

dtp-flapDisabled

link-flapDisabled

gbic-invalidDisabled

l2ptguardDisabled

psecure-violationDisabled

gbic-invalidDisabled

dhcp-rate-limitDisabled

unicast-floodDisabled

loopbackEnabled

Timerinterval:300seconds

Interfacesthatwillbeenabledatthenexttimeout:

InterfaceErrdisablereasonTimeleft(sec)

----------------------------------------

Fa0/8loopback276

Fa0/17loopback267

Fa0/20loopback250

从以上显示的信息可以看出,这台交换机有三个端口(Fa0/8、Fa0/17、Fa0/20)会别离在276、267、250秒之后规复为正常的状态,实际情形也是这样,等了几分钟今后,我们找了一台条记本电脑,别离接到这几个端口上试了一下,端口都可以正常事情了。这下总算在不重交换机的情形下,将几个处于“假死”状态的端口“拯救”了返来。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章