Error-disabled mode is a security feature on Cisco switches that automatically shuts down a port when it detects certain types of errors or violations. When a port enters this state, it stops forwarding traffic and shows as "err-disabled" in the port status. Understanding this feature is essential for network administrators to maintain network stability and security.
This article will guide you through what error-disabled mode is, common causes, how to identify it, and the comprehensive steps to troubleshoot and recover from it including cable diagnostics, physical layer troubleshooting, and all possible scenarios.
Error-disabled is a port state that Cisco switches use as a protective mechanism. When the switch detects a critical error condition on a port, it automatically disables that port to prevent potential network issues from spreading. The port remains disabled until an administrator manually intervenes or automatic recovery is configured.
This occurs when port security is configured and the switch detects more MAC addresses than allowed, or an unauthorized MAC address attempts to connect to the port.
When BPDU Guard is enabled on a port configured as an access port (typically for PortFast), receiving a Bridge Protocol Data Unit (BPDU) triggers error-disabled state. This usually happens when a switch is accidentally connected to an access port.
Inconsistent EtherChannel configurations between two switches can cause ports to enter error-disabled state. This includes mismatched channel modes, different numbers of ports, or incompatible port settings.
When duplex settings don't match on both ends of a link, excessive collisions and errors can trigger error-disabled state.
If the switch detects that frames sent out a port are being received back on the same port, indicating a network loop.
When a port repeatedly goes up and down in a short period, the switch may disable it to prevent instability. This can be caused by faulty cables, bad SFP modules, or power issues.
UDLD detects when traffic can only flow in one direction on a link, which can cause Layer 2 loops.
When broadcast, multicast, or unicast traffic exceeds configured thresholds.
Power oversubscription or inline power faults can cause ports to enter error-disabled state.
Security features detecting spoofed or malicious packets.
The most straightforward way to identify error-disabled ports is to check the interface status:
show interface status
Look for ports showing "err-disabled" in the Status column.
For more detailed information about a specific interface:
show interface GigabitEthernet0/1 status
To see why a port was disabled:
show interfaces status err-disabled
This command displays all error-disabled ports along with the reason for their disabled state.
Get comprehensive details about the interface:
show interface GigabitEthernet0/1
Review the switch logs for error-disabled events:
show logging | include err-disable
show logging | include GigabitEthernet0/1
The logs will provide timestamps and specific details about what triggered the error-disabled state, which is crucial for troubleshooting.
Before diving into configuration issues, always check the physical layer first:
show interface GigabitEthernet0/1
Look for these indicators in the output:
show interface GigabitEthernet0/1 counters
show interface GigabitEthernet0/1 counters errors
Cisco switches support TDR testing to diagnose cable issues. This test can identify:
To run cable diagnostics:
test cable-diagnostics tdr interface GigabitEthernet0/1
Wait a few seconds, then view the results:
show cable-diagnostics tdr interface GigabitEthernet0/1
Cable diagnostics can only be run when the interface is up. If the interface is down, bring it up first, run the test, then check results.
The output shows the status for each pair in the cable:
For fiber connections or copper SFP modules:
show interface GigabitEthernet0/1 transceiver
show interface transceiver
Check for:
show interface GigabitEthernet0/1 transceiver detail
Low or no light levels indicate fiber issues, dirty connectors, or failed transceivers.
show interface GigabitEthernet0/1
show interface GigabitEthernet0/1 status
Look for the speed and duplex settings. Common issues:
show interface GigabitEthernet0/1 | include collision
Late collisions are a strong indicator of duplex mismatch. If you see late collisions, check duplex settings on both ends immediately.
Option 1: Set to Auto-Negotiation (Recommended)
configure terminal interface GigabitEthernet0/1 speed auto duplex auto exit
Option 2: Hardcode Speed and Duplex (Both Sides Must Match)
configure terminal interface GigabitEthernet0/1 speed 1000 duplex full exit
For 100Mbps:
configure terminal interface GigabitEthernet0/1 speed 100 duplex full exit
When hardcoding speed and duplex, BOTH ends of the link must have identical settings. Mixing auto and manual settings will cause duplex mismatch.
If experiencing issues at gigabit speed, try forcing 100Mbps to isolate cable or hardware issues:
configure terminal interface GigabitEthernet0/1 speed 100 duplex full exit
Monitor the interface:
show interface GigabitEthernet0/1
If the interface is stable at 100Mbps but not at 1000Mbps, you likely have:
First, determine why the port entered error-disabled state:
show interfaces status err-disabled
Or check the specific interface:
show interface GigabitEthernet0/1
For Port Security Violations:
show port-security interface GigabitEthernet0/1
show port-security address
show port-security address interface GigabitEthernet0/1
For BPDU Guard:
show spanning-tree interface GigabitEthernet0/1 detail
show spanning-tree summary
For EtherChannel Issues:
show etherchannel summary
show interfaces GigabitEthernet0/1 etherchannel
show etherchannel port-channel
For Duplex Mismatch:
show interface GigabitEthernet0/1 | include duplex
show interface GigabitEthernet0/1 | include collision
For UDLD:
show udld GigabitEthernet0/1
show udld neighbors
For Storm Control:
show storm-control
show storm-control GigabitEthernet0/1
For PoE Issues:
show power inline
show power inline GigabitEthernet0/1
show power inline police
For Link Flap:
show interface GigabitEthernet0/1 | include line protocol
show logging | include GigabitEthernet0/1 | include UPDOWN
Before re-enabling the port, you must fix the root cause. Here are common fixes:
Port Security - Adjust MAC Address Limit:
configure terminal interface GigabitEthernet0/1 no switchport port-security maximum 1 switchport port-security maximum 2 exit
Port Security - Clear Learned MAC Addresses:
clear port-security dynamic interface GigabitEthernet0/1
BPDU Guard - Disable on Trunk Ports:
configure terminal interface GigabitEthernet0/1 no spanning-tree bpduguard enable exit
EtherChannel - Ensure Matching Configuration:
configure terminal interface range GigabitEthernet0/1-2 channel-group 1 mode active exit
Duplex Mismatch - Set to Auto:
configure terminal interface GigabitEthernet0/1 duplex auto speed auto exit
UDLD - Reset or Disable:
udld reset
Or disable UDLD:
configure terminal interface GigabitEthernet0/1 no udld port exit
Storm Control - Adjust Thresholds:
configure terminal interface GigabitEthernet0/1 storm-control broadcast level 70.00 storm-control multicast level 70.00 exit
Replace the cable if you observe:
Step 1: Document Current State
show interface GigabitEthernet0/1
show interface GigabitEthernet0/1 counters errors
Step 2: Run Cable Diagnostics
test cable-diagnostics tdr interface GigabitEthernet0/1
Wait 10-15 seconds, then:
show cable-diagnostics tdr interface GigabitEthernet0/1
Step 3: Clear Counters
clear counters GigabitEthernet0/1
Step 4: Replace Cable
Ensure you're using the correct cable category:
Step 5: Test New Cable
configure terminal interface GigabitEthernet0/1 shutdown no shutdown exit
Wait 30 seconds, then verify:
show interface GigabitEthernet0/1 status
show interface GigabitEthernet0/1 counters errors
Step 6: Run TDR Again
test cable-diagnostics tdr interface GigabitEthernet0/1
show cable-diagnostics tdr interface GigabitEthernet0/1
If the new cable shows "Normal" on all pairs and no errors accumulate, the issue is resolved.
Check SFP Status:
show interface GigabitEthernet0/1 transceiver
Verify SFP Compatibility:
show inventory
Always use Cisco-approved SFP modules. Third-party modules may cause compatibility issues.
Clean Fiber Connectors:
Test with Known-Good SFP:
configure terminal interface GigabitEthernet0/1 shutdown ! Replace SFP module physically no shutdown exit
After fixing the underlying issue, manually recover the port with these commands:
configure terminal interface GigabitEthernet0/1 shutdown no shutdown exit
Verify the port is now active:
show interface GigabitEthernet0/1 status
show interface GigabitEthernet0/1
Always ensure you've resolved the root cause before re-enabling the port. Simply re-enabling without fixing the issue will cause the port to enter error-disabled state again.
If multiple interfaces are error-disabled:
configure terminal interface range GigabitEthernet0/1-5 shutdown no shutdown exit
You can configure the switch to automatically recover error-disabled ports after a specified time period. This should be used cautiously as it may mask recurring problems.
To enable error-disabled recovery for specific causes:
configure terminal errdisable recovery cause psecure-violation errdisable recovery interval 600 exit
Enable recovery for multiple causes:
configure terminal errdisable recovery cause bpduguard errdisable recovery cause security-violation errdisable recovery cause channel-misconfig errdisable recovery cause udld errdisable recovery cause link-flap errdisable recovery interval 300 exit
To check the current error-disabled recovery configuration:
show errdisable recovery
You can enable automatic recovery for these causes:
configure terminal errdisable recovery cause all ! Or individually: errdisable recovery cause bpduguard errdisable recovery cause security-violation errdisable recovery cause channel-misconfig errdisable recovery cause udld errdisable recovery cause link-flap errdisable recovery cause storm-control errdisable recovery cause inline-power errdisable recovery cause loopback errdisable recovery cause dhcp-rate-limit errdisable recovery cause arp-inspection exit
Be cautious when using automatic recovery for all causes. It's better to enable it selectively for specific, well-understood scenarios.
Watch interface status changes in real-time:
terminal monitor
debug interface GigabitEthernet0/1
Use debug commands sparingly in production. They can impact switch performance. Always disable debug when done.
To disable debugging:
no debug all
Sometimes error-disabled states are caused by environmental issues:
show environment all
show environment temperature
show environment power
High CPU or memory usage can cause interface issues:
show processes cpu sorted
show memory
show version
Verify IOS version and check for known bugs:
show version
Compare against Cisco's bug search tool at cisco.com with your IOS version.
On newer switches with EPC (Embedded Packet Capture):
monitor capture CAP interface GigabitEthernet0/1 both monitor capture CAP match any monitor capture CAP buffer size 10 monitor capture CAP start ! Let it run for 30-60 seconds monitor capture CAP stop show monitor capture CAP buffer brief
Export capture for analysis:
monitor capture CAP export tftp://192.168.1.100/capture.pcap
After resolving an error-disabled issue, verify with these commands:
show errdisable detect
show errdisable recovery
show interfaces status err-disabled
show interface GigabitEthernet0/1 status
show interface GigabitEthernet0/1
show interface GigabitEthernet0/1 counters errors
show cable-diagnostics tdr interface GigabitEthernet0/1
show logging | include GigabitEthernet0/1
clear counters GigabitEthernet0/1
Monitor an interface continuously for 5 minutes:
terminal length 0 ! Run this command every 30 seconds manually or create EEM script
Check if errors are incrementing:
show interface GigabitEthernet0/1 | include error
Problem: Port enters error-disabled due to BPDU Guard.
Symptoms:
Diagnosis:
show interfaces status err-disabled show spanning-tree interface GigabitEthernet0/15 detail show logging | include GigabitEthernet0/15
Solution:
configure terminal interface GigabitEthernet0/15 shutdown no shutdown exit
Verify:
show interface GigabitEthernet0/15 status show spanning-tree interface GigabitEthernet0/15 detail
Problem: Port security violation due to excessive MAC addresses.
Symptoms:
Diagnosis:
show interfaces status err-disabled show port-security interface GigabitEthernet0/10 show port-security address show logging | include PSECURE_VIOLATION
Solution:
! Identify the source device show mac address-table interface GigabitEthernet0/10 configure terminal interface GigabitEthernet0/10 shutdown ! Remove the malicious device or adjust security settings clear port-security dynamic interface GigabitEthernet0/10