[Solved]link flap cisco switch port error disabled

link flap cisco switch port error disabled: A Cisco switch port enters err-disabled state due to link flapping when the interface toggles up/down rapidly (typically 3+ times within 10 seconds), often caused by faulty cables, SFP modules, or speed/duplex mismatches.

link flap cisco switch port error disabled

To resolve, inspect physical Layer 1 components, swap cables, and use shutdown/no shutdown to reset the port, or configure automatic recovery.

Immediate Recovery Steps


Identify the Port: Check logs (show logging) to confirm the port is in err-disabled state due to link-flap.
Reset the Interface: Manually shut down and re-enable the port:
interface
shutdown
no shutdown


Check Physical Layer: Replace the cable and check the SFP/GBIC module on both ends.


Cable Diagnostics: If supported, run a Time-Domain Reflectometer (TDR) test to check cable integrity:


test cable-diagnostics tdr interface
show cable-diagnostics tdr interface

Preventing Future Flapping


Enable Automatic Recovery: Configure the switch to automatically re-enable the port after a set time:
errdisable recovery cause link-flap


errdisable recovery interval 300 (time in seconds, 30-86400)
Verify Settings: Use show errdisable flap-values to check default flapping thresholds.


Common Causes of link flapping and error disabling


Layer 1 Issues: Bad cable, faulty SFP/GBIC, or loose connection.


Configuration Errors: Speed or duplex mismatch between the switch and connected device.
Environmental Factors: Faulty transceiver or power issues.


Software/Driver Issues: Occasional driver incompatibilities with connected network interface cards.

When a Cisco switch port enters the err-disable state due to link flapping, it means the interface has cycled between “Up” and “Down” states too many times within a specific window (typically 5 flaps in 10 seconds).

Identify the Cause of err disabled


Check the logs to confirm the error:
Command: show interfaces status err-disabled
Log Message: Look for %PM-4-ERR_DISABLE: link-flap error detected on [interface]

Common Root Causes:


Layer 1 Issues: Bad cables, loose SFP modules, or faulty patch panels.


Duplex Mismatch: Inconsistent speed/duplex settings between the switch and the connected device.
Incompatible Features: Energy Efficient Ethernet (EEE) or “Smartport” features misidentifying devices.

Manual Recovery



After fixing the physical issue (e.g., replacing the cable), you must manually reset the port:

bash
interface
shutdown
no shutdown

Automatic Recovery


To prevent the port from staying down permanently, you can configure the switch to attempt a self-recovery after a timeout (default is 300 seconds):
bash

Enable auto-recovery for link-flapping

errdisable recovery cause link-flap

(Optional) Set custom recovery time in seconds (30-86400)

errdisable recovery interval 60

Use show errdisable recovery to verify these settings.

Advanced Tuning


If the flapping is expected (e.g., a device that reboots frequently), you can adjust the sensitivity or disable the feature entirely


View current thresholds: show errdisable flap-values.


Adjust thresholds: errdisable flap-setting cause link-flap max-flaps <1-100> time <1-120>.
Disable globally: no errdisable detect cause link-flap

To view and modify the link-flap sensitivity thresholds on a Cisco switch, use the following commands:

View Current Flap Values


Use this command to see how many flaps the switch allows before it disables the port.
Command: show errdisable flap-values


Standard Default Output:


link-flap: 5 flaps in 10 seconds
pagp-flap: 3 flaps in 30 seconds
dtp-flap: 3 flaps in 30 seconds

Configure Custom Flap Values


If you have a device that legitimately cycles its link (like some servers during boot) and you want to be less restrictive, you can change the global threshold.
Command: errdisable flap-setting cause link-flap max-flaps <1-100> time <1-120>
Example: To allow 10 flaps in a 20-second window:
bash
errdisable flap-setting cause link-flap max-flaps 10 time 20

Disable Detection entirely


If you want to stop the switch from ever err-disabling ports for flapping:
Global Command: no errdisable detect cause link-flap
Interface Command: Some models allow you to disable it per-port using no link-flap errdisable under the interface configuration.


Summary of Verification Commands


Action Command
Verify Status show errdisable detect
Verify Thresholds show errdisable flap-values
Check Recovery show errdisable recovery

Running show run | i errdisable will display only the active global configurations for the err-disable feature. If you haven’t made any changes, this command may return nothing, as most default settings (like detection being enabled) are hidden in the running config.


Expected Output Examples


If you have configured custom settings, you will see lines like these:
Auto-Recovery Enabled:
errdisable recovery cause link-flap
Custom Recovery Timer:
errdisable recovery interval 60 (Default is 300)

Disabled Detection:


no errdisable detect cause link-flap
Custom Flap Sensitivity:
errdisable flap-setting cause link-flap max-flaps 10 time 20
Better Verification Commands
Since show run often hides defaults, use these EXEC mode commands for a complete picture:

Better Verification Commands


Since show run often hides defaults, use these EXEC mode commands for a complete picture:
show errdisable detect: Shows which features will trigger a port shutdown.
show errdisable recovery: Shows which features are set to auto-recover and the remaining time for any currently disabled ports.
show errdisable flap-values: Displays the exact thresholds (flaps per second) currently in use.

Latest Posts

1 thought on “[Solved]link flap cisco switch port error disabled”

Leave a Comment