登錄進(jìn)入交換機(jī)后,執(zhí)行show log,會(huì)看到如下的提示:
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
以上信息就明確表示由于檢測(cè)到第20端口出現(xiàn)了環(huán)路,所以將該端口置于了err-disable狀態(tài)。
查看端口的狀態(tài)
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狀態(tài)。
既然看到了該端口是被置于了錯(cuò)誤的狀態(tài)了,我們就應(yīng)該有辦法將其再恢復(fù)成正常的狀態(tài)。
拯救步驟2:將端口從錯(cuò)誤狀態(tài)中恢復(fù)回來(lái)
進(jìn)入交換機(jī)全局配置模式,執(zhí)行errdisable recovery cause ?,會(huì)看到如下信息:
Switch(config)#errdisable recovery cause ?
all Enable timer to recover from all causes
bpduguard Enable timer to recover from BPDU Guard error disable state
channel-misconfig Enable timer to recover from channel misconfig disable state
dhcp-rate-limit Enable timer to recover from dhcp-rate-limit error disable state
dtp-flap Enable timer to recover from dtp-flap error disable state
gbic-invalid Enable timer to recover from invalid GBIC error disable state
l2ptguard Enable timer to recover from l2protocol-tunnel error disable state
link-flap Enable timer to recover from link-flap error disable state
loopback Enable timer to recover from loopback detected disable state
pagp-flap Enable timer to recover from pagp-flap error disable state
psecure-violation Enable timer to recover from psecure violation disable state
security-violation Enable timer to recover from 802.1x violation disable state
udld Enable timer to recover from udld error disable state
unicast-flood Enable timer to recover from unicast flood disable state
vmps Enable timer to recover from vmps shutdown error disable state
從列出的選項(xiàng)中,我們可以看出,有非常多的原因會(huì)引起端口被置于錯(cuò)誤狀態(tài),由于我們明確的知道這臺(tái)交換機(jī)上的端口是由于環(huán)路問(wèn)題而被置于錯(cuò)誤狀態(tài)的,所以就可以直接鍵入命令:
Switch(config)#errdisable recovery cause loopback
是啊,就這么簡(jiǎn)單的一條命令,就把困撓我們很長(zhǎng)時(shí)間的問(wèn)題解決了,真的就這么神奇。那么如何驗(yàn)證這條命令是生效了呢?
拯救步驟3:顯示被置于錯(cuò)誤狀態(tài)端口的恢復(fù)情況
Switch# show errdisable recovery
ErrDisable Reason Timer Status
----------------- --------------
udld Disabled
bpduguard Disabled
security-violatio Disabled
channel-misconfig Disabled
vmps Disabled
pagp-flap Disabled
dtp-flap Disabled
link-flap Disabled
gbic-invalid Disabled
l2ptguard Disabled
psecure-violation Disabled
gbic-invalid Disabled
dhcp-rate-limit Disabled
unicast-flood Disabled
loopback Enabled
Timer interval: 300 seconds
Interfaces that will be enabled at the next timeout:
Interface Errdisable reason Time left(sec)
--------- ----------------- --------------
Fa0/8 loopback 276
Fa0/17 loopback 267
Fa0/20 loopback 250
從以上顯示的信息可以看出,這臺(tái)交換機(jī)有三個(gè)端口(Fa0/8、Fa0/17、Fa0/20)會(huì)分別在276、267、250秒之后恢復(fù)為正常的狀態(tài),實(shí)際情況也是這樣,等了幾分鐘以后,我們找了一臺(tái)筆記本電腦,分別接到這幾個(gè)端口上試了一下,端口都可以正常工作了。這下總算在不重交換機(jī)的情況下,將幾個(gè)處于“假死”狀態(tài)的端口“拯救”了回來(lái)。
作為一名網(wǎng)絡(luò)管理員,除了日常網(wǎng)絡(luò)故障的處理外,還會(huì)不時(shí)碰到自己知識(shí)范圍以外的東西,但只要引起足夠的重視,總會(huì)找到解決問(wèn)題的辦法。如果您在工作中也遇到交換機(jī)端口“假死”的情況,不妨用這個(gè)辦法試一下。