1. 程式人生 > 其它 >cisco交換機埠從errdisable狀態恢復

cisco交換機埠從errdisable狀態恢復

故障描述

經使用者反饋,一臺cisco2960x接入交換機的一個埠插網線不通,ip電話也沒有poe供電。

排查過程

檢視交換機埠狀態,發現變成了errdisable:

ZH_HQN_SW2960X_04#show int g1/0/14
GigabitEthernet1/0/14 is down, line protocol is down (err-disabled)

從官方文件找到恢復的方法:

errdisable recovery cause all

接下來就可以檢視errdisable的詳細資訊了:

ZH_HQN_SW2960X_04#show errdisable recovery
ErrDisable Reason Timer Status
----------------- --------------
arp-inspection Enabled
bpduguard Enabled
channel-misconfig (STP) Enabled
dhcp-rate-limit Enabled
dtp-flap Enabled
gbic-invalid Enabled
inline-power Enabled
link-flap Enabled
mac-limit Enabled
loopback Enabled
pagp-flap Enabled
port-mode-failure Enabled
pppoe-ia-rate-limit Enabled
psecure-violation Enabled
security-violation Enabled
sfp-config-mismatch Enabled
small-frame Enabled
storm-control Enabled
udld Enabled
vmps Enabled
psp Enabled
dual-active-recovery Disabled
evc-lite input mapping fa Disabled
Recovery command: "clear Disabled

Timer interval: 300 seconds

Interfaces that will be enabled at the next timeout:

Interface Errdisable reason Time left(sec)
--------- ----------------- --------------
Gi1/0/14 loopback 293

可以看到,所有的errdisable恢復類別都被啟用,並且底部顯示了處於errdisable狀態的埠,報錯的原因,以及還剩多久自動恢復(time left)。

繼續查詢報錯原因loopback,官方給的解釋如下:

Loopback error:A loopback error occurs when the keepalive packet is looped back to the port
that sent the keepalive. The switch sends keepalives out all the interfaces by default. A device
can loop the packets back to the source interface, which usually occurs because there is a
logical loop in the network that the spanning tree has not blocked. The source interface
receives the keepalive packet that it sent out, and the switch disables the interface
(errdisable).

意思是交換機預設會從所有埠發出keepalive報文,如果發出keepalive的源埠接收到自己傳送的keepalive報文,那麼交換機就會認為產生了環路(這個環路沒有被生成樹阻塞)。

交換機會把這個埠設定為errdisable狀態。

確認埠恢復後,記得關閉errdisable recovery恢復功能:

no errdisable recovery cause all