故障描述
經用戶反饋,一台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