辦理交換機端口“假死”問題
幾天在維護宿舍網絡時碰著一個當時感受很獨特的問題:4樓交換機的20口無論怎么連線,鏈路都不通;進入交換機,端口也啟不了;連其他的端口全沒有問題。本覺得是端口壞掉了,其后聽說是因為環(huán)路,20口被關了,錯誤規(guī)復就好了。華為交換機配置
于是上網查了查,大白了個中的原理:
交換機正在事情的端口,溘然變成封鎖狀態(tài)的假死現(xiàn)象,第一可以用重啟交換機來辦理,第二可以用呼吁規(guī)復。
對付用呼吁規(guī)復的要領的詳細步調如下:
步調1:查察日志/端口的狀態(tài)
登錄進入交換機后,執(zhí)行showlog,會看到如下的提示:
21w6d:%ETHCNTR-3-LOOP_BACK_DETECTED:Keepalivepacketloop-backdetectedonFastEthernet0/20.
21w6d:%PM-4-ERR_DISABLE:loopbackerrordetectedonFa0/20,puttingFa0/20inerr-disablestate
以上信息就明晰暗示由于檢測到第20端口呈現(xiàn)了環(huán)路,所以將該端口置于了err-disable狀態(tài)。
查察端口的狀態(tài)
Switch#showinterfa0/20status
PortNameStatusVlanDuplexSpeedType
Fa0/20linktodatabackuperr-disabled562autoauto10/100BaseTX
這條信息越發(fā)明晰的暗示了該端口處于err-disabled狀態(tài)。
既然看到了該端口是被置于了錯誤的狀態(tài)了,我們就應該有步伐將其再規(guī)復成正常的狀態(tài)。
拯救步調2:將端口從錯誤狀態(tài)中規(guī)復返來
進入交換機全局設置模式,執(zhí)行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
從列出的選項中,我們可以看出,有很是多的原因會引起端口被置于錯誤狀態(tài),由于我們明晰的知道這臺交換機上的端口是由于環(huán)路問題而被置于錯誤狀態(tài)的,所以就可以直接鍵入呼吁:
Switch(config)#errdisablerecoverycauseloopback
拯救步調3:顯示被置于錯誤狀態(tài)端口的規(guī)復情形
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秒之后規(guī)復為正常的狀態(tài),實際情形也是這樣,等了幾分鐘今后,我們找了一臺條記本電腦,別離接到這幾個端口上試了一下,端口都可以正常事情了。這下總算在不重交換機的情形下,將幾個處于“假死”狀態(tài)的端口“拯救”了返來。
【編輯推薦】