How to Fix an Err-Disabled Port on a Cisco Switch
An err-disabled port is one the switch shut down on its own after detecting a fault. Read the cause from the log, remove it, then run shutdown and no shutdown on the interface. The commands and messages below are for Catalyst 9000 switches running IOS XE 17.x. Nexus switches (NX-OS) and the Catalyst 1200 and 1300 lines use different commands.
Err-Disabled Port Symptoms and Error Messages
The device on the port loses its link and no traffic passes, even though the configuration still shows the interface as enabled. The interface reports the state directly:
Switch# show interfaces GigabitEthernet1/0/12
GigabitEthernet1/0/12 is down, line protocol is down (err-disabled)
To list every affected port with its cause, run:
Switch# show interfaces status err-disabled
Port Name Status Reason
Gi1/0/12 err-disabled bpduguard
Te1/1/1 err-disabled link-flap
The log shows when it happened and what tripped it. Most causes write a %PM-4-ERR_DISABLE line, and many features log a message of their own just before it. Match the log against this list:
! BPDU guard
%SPANTREE-2-BLOCK_BPDUGUARD: Received BPDU on port Gi1/0/12 with BPDU Guard enabled. Disabling port.
%PM-4-ERR_DISABLE: bpduguard error detected on Gi1/0/12, putting Gi1/0/12 in err-disable state
! Port security
%PORT_SECURITY-2-PSECURE_VIOLATION: Security violation occurred, caused by MAC address 0050.56a1.2b3c on port GigabitEthernet1/0/12.
%PM-4-ERR_DISABLE: psecure-violation error detected on Gi1/0/12, putting Gi1/0/12 in err-disable state
! 802.1X security violation
%PM-4-ERR_DISABLE: security-violation error detected on Gi1/0/12, putting Gi1/0/12 in err-disable state
! Link flap
%PM-4-ERR_DISABLE: link-flap error detected on Te1/1/1, putting Te1/1/1 in err-disable state
! UDLD
%UDLD-4-UDLD_PORT_DISABLED: UDLD disabled interface Te1/1/1, unidirectional link detected
%PM-4-ERR_DISABLE: udld error detected on Te1/1/1, putting Te1/1/1 in err-disable state
! Loopback
%PM-4-ERR_DISABLE: loopback error detected on Gi1/0/12, putting Gi1/0/12 in err-disable state
! PoE power policing
%ILPOWER-3-SHUT_OVERDRAWN: Interface Gi1/0/12 is shutdown as it is consuming more than the maximum configured power (15400) milliwatts.
%ILPOWER-5-IEEE_DISCONNECT: Interface Gi1/0/12: PD removed
%PM-4-ERR_DISABLE: inline-power error detected on Gi1/0/12, putting Gi1/0/12 in err-disable state
! EtherChannel misconfiguration
%SPANTREE-2-CHNL_MISCFG: Detected loop due to etherchannel misconfiguration of Te1/1/1
! ARP inspection
%SW_DAI-4-PACKET_RATE_EXCEEDED: 16 packets received in 739 milliseconds on Gi1/0/24.
%PM-4-ERR_DISABLE: arp-inspection error detected on Gi1/0/24, putting Gi1/0/24 in err-disable state
! DHCP snooping
%DHCP_SNOOPING-4-DHCP_SNOOPING_ERRDISABLE_WARNING: DHCP Snooping received 300 DHCP packets on interface Gi1/0/24
%PM-4-ERR_DISABLE: dhcp-rate-limit error detected on Gi1/0/24, putting Gi1/0/24 in err-disable state
! Storm control
%STORM_CONTROL-3-SHUTDOWN: A packet storm was detected on Gi1/0/24. The interface has been disabled.
The word before “error detected” is the cause, the same name the Reason column shows. To pull both messages for one port:
Switch# show logging | include 1/0/12
A log line that names a VLAN means only that VLAN was disabled and the port still forwards the others:
%SPANTREE-2-BLOCK_BPDUGUARD_VP: Received BPDU on port Gi1/0/12 vlan 20 with BPDU Guard enabled. Disabling vlan.
%PM-4-ERR_DISABLE_VP: bpduguard error detected on Gi1/0/12 vlan 20. Putting in err-disable state.
show errdisable detect confirms this. Its Mode column reads port, vlan or port/vlan. BPDU guard, port security and voice-aware 802.1X can run per VLAN.
Steps to Fix an Err-Disabled Port
Remove the cause first, using the matching section below. Bouncing the port while the cause is still there only repeats the shutdown. Then bring the interface back:
configure terminal
interface GigabitEthernet1/0/12
shutdown
no shutdown
end
For several ports with the same cause, use interface range GigabitEthernet1/0/10 - 14. Confirm with show interfaces status. The port should show connected, or notconnect if nothing is plugged in.
BPDU Guard on a PortFast Port
Unplug the switch or bridge from the port, then bounce it. If the port really does connect to another switch, take it out of edge mode:
interface GigabitEthernet1/0/12
no spanning-tree portfast
spanning-tree bpduguard disable
To keep the port up and disable only the offending VLAN from now on, set errdisable detect cause bpduguard shutdown vlan.
Port Security and 802.1X Violations
The log names the MAC address of the device that tripped the limit. Remove that device if it does not belong on the port. For a Cisco IP phone with a PC behind it, raise the limit to two:
interface GigabitEthernet1/0/12
switchport port-security maximum 2
Check the counters with show port-security interface GigabitEthernet1/0/12. To keep the port up on a violation, switchport port-security violation restrict drops the extra traffic and logs it. switchport port-security violation shutdown vlan disables only the affected VLAN.
For a security-violation reason on an 802.1X port, keep one host on the port. For a phone and a PC on the same port, set access-session host-mode multi-domain, or authentication host-mode multi-domain on the older command style.
Link Flap, UDLD and Loopback
For link-flap, check show interfaces GigabitEthernet1/0/12 for input errors and CRCs, confirm speed and duplex on both ends, then read the optic’s transmit and receive power as described in Cisco SFP TX/RX light levels. Replace the failing cable or optic.
For UDLD, repair the fiber pair or optic and run the same UDLD mode on both ends. Besides shutdown and no shutdown, Cisco’s Catalyst 9300 Layer 2 Configuration Guide for IOS XE 17.18 lists udld reset for bringing a UDLD-disabled port back.
For loopback, look for a downstream device or unmanaged switch that sends the frames back, or a forwarding loop that spanning tree did not block. Remove the loop. Disabling keepalives only removes the detection.
PoE Power Policing
Compare show power inline police with the device’s PoE class and correct the allocation with power inline auto max followed by the milliwatt value. If the allocation is right and the device still overdraws, replace or reconfigure the device. To keep the device powered while you investigate, set power inline police action log. The switch then writes %ILPOWER-4-LOG_OVERDRAWN: Interface Gi1/0/12 is overdrawing power. with the measured and configured milliwatts, and leaves the port up. For ports that never deliver power in the first place, see Cisco switch PoE not working.
EtherChannel Misconfiguration
Run show interfaces status err-disabled to list the local members, then show etherchannel summary on the other switch. Make both sides negotiate, with the same VLAN, trunk, speed and duplex settings on every member. A port in mode on has to leave the channel group before it can change to LACP:
interface range TenGigabitEthernet1/1/1 - 2
no channel-group 1
channel-group 1 mode active
Check the result with show etherchannel summary on both switches.
ARP Inspection, DHCP Snooping and Storm Control
The ARP message gives a rate to compare with the limit: 16 packets in 739 milliseconds is about 22 packets per second, above the default of 15. Trust the uplink with ip arp inspection trust, or set a realistic rate with ip arp inspection limit rate. For DHCP snooping, raise ip dhcp snooping limit rate or remove the source of the flood.
For storm control, find the source of the traffic. The log message does not say whether broadcast, multicast or unicast traffic tripped it. show storm-control GigabitEthernet1/0/24 lists which traffic types have a threshold on the port.
Transceiver Errors
The gbic-invalid reason means the switch rejected the SFP in that port. Unsupported and third-party optics, their commands and their limits are covered in Cisco unsupported transceiver error.
Clear a VLAN-Level Err-Disable
When only a VLAN was disabled, use the clear command instead of bouncing the port:
clear errdisable interface GigabitEthernet1/0/12 vlan
clear errdisable interface GigabitEthernet1/0/12 vlan 20
Without a VLAN list it re-enables every disabled VLAN on that interface. The command only applies to VLAN-level err-disable, not to a port that is err-disabled in port mode, which is the answer to the common “clear errdisable is not working” question. For those ports, Cisco’s Catalyst 9300 Command Reference gives shutdown and no shutdown as the way back.
Auto Recovery Timer
Automatic recovery is off for every cause until you enable it one cause at a time:
configure terminal
errdisable recovery cause link-flap
errdisable recovery cause inline-power
errdisable recovery interval 300
end
The interval defaults to 300 seconds and accepts 30 to 86,400, per Cisco’s Catalyst 9300 Interface and Hardware Configuration Guide for IOS XE 17.18. show errdisable recovery lists the causes with the timer enabled and each port waiting to come back, with the seconds left.
The timer brings the port back and lets the switch check again. If the cause is still present, the port goes down again, and each cycle writes a pair of messages:
%PM-4-ERR_RECOVER: Attempting to recover from link-flap err-disable state on Te1/1/1
%PM-4-ERR_DISABLE: link-flap error detected on Te1/1/1, putting Te1/1/1 in err-disable state
Enable recovery for causes that clear on their own: a flapping link waiting for a cabling fix, a provider fiber that drops for a few minutes, a PoE device that was replaced, a short ARP or DHCP burst after the limits are set correctly. Cisco’s built-in cisco-global macro on the Catalyst 9300 sets recovery for link-flap with a 60-second interval.
Leave bpduguard, psecure-violation and security-violation manual. A timer on those reopens the port to the same unauthorized switch or device every interval. Leave loopback, channel-misconfig, storm-control and gbic-invalid manual too, because the cause will still be there when the timer fires.
Port Keeps Going Back to Err-Disabled
If ERR_RECOVER and ERR_DISABLE messages alternate in the log, roughly one recovery interval apart, the timer is reopening the port and the cause is still there. Stop the cycle for that cause while you work on it. This setting applies to the whole switch:
configure terminal
no errdisable recovery cause link-flap
end
For a configuration or security cause, go back to its section above. For link-flap, UDLD or another physical cause, go through the path in order:
- Read the input errors, CRCs and interface resets in
show interfaces GigabitEthernet1/0/12. - For fiber, read the optic’s transmit and receive power and compare them with the module’s specification.
- Replace the patch cable with a known-good one.
- Swap the optic with a known-good module of the same PID.
- Move the device to another port.
If the error follows the optic, replace the module. Layer23-Switch stocks Cisco optical modules by PID. If it stays with the switch port after a new cable and optic, the port hardware is suspect. Move the connection to a spare port and plan the hardware replacement. If the switch has to be replaced, current models are listed under Catalyst 9300 switches.
Why the Switch Err-Disables a Port
The switch err-disables a port to keep a fault on that port from reaching the rest of the network. The port stays down until someone or a timer brings it back. Out of the box, a Catalyst 9300 runs detection for every cause and automatic recovery for none, according to Cisco’s Catalyst 9300 Command Reference for IOS XE 17.18. Eight of the twelve reasons below exist only because a feature was turned on, and the reason string points straight to that feature. The defaults in the table come from Cisco’s Catalyst 9300 Security Configuration Guide for IOS XE 17.17 and 17.18 and its Layer 2 Configuration Guide for IOS XE 17.18.
| Reason | What trips it | Root cause |
|---|---|---|
| bpduguard | A BPDU arrives on a PortFast port with BPDU guard | A PortFast edge port is meant for one end host, so a BPDU means a switch or bridge was plugged in |
| psecure-violation | More MAC addresses than port security allows | The default is one secure address and shutdown mode. An IP phone takes one address on the voice VLAN, so a PC behind it exceeds the limit |
| security-violation | A second MAC address on an 802.1X port in single-host mode | Single-host mode authorizes one device on the port |
| link-flap | The link keeps going up and down | A failing cable or optic, a dirty optic, or a speed and duplex mismatch |
| udld | UDLD detects a unidirectional link | Normal mode catches misconnected fiber strands. One-way traffic on a correctly connected link stays undetermined and the port stays up. Aggressive mode disables the port in that case too. UDLD is off by default |
| loopback | The port receives its own keepalive | A downstream device reflects the frames, or a loop exists in the network |
| channel-misconfig | Spanning tree detects a loop on a channel | One switch bundles the links and the other does not, typically channel-group 1 mode on facing plain access or trunk ports |
| inline-power | A powered device draws more than its allocation with power inline police on | The switch compares real-time draw with the port’s maximum. Cutting power and err-disabling is the default action |
| arp-inspection | An untrusted port exceeds the ARP rate limit | Untrusted ports are limited to 15 packets per second by default and trusted ports are not limited. An untrusted uplink can exceed that with normal ARP traffic from many hosts. On an EtherChannel the whole channel goes down |
| dhcp-rate-limit | An untrusted port exceeds ip dhcp snooping limit rate | DHCP snooping has no rate limit until one is configured, so this appears only after someone sets it |
| storm-control | A storm on a port set to storm-control action shutdown | A broadcast, multicast or unicast flood. The default action filters the excess traffic and keeps the port up |
| gbic-invalid | The switch rejects the installed SFP | The module is unsupported or fails the switch’s validation |
FAQ
Why does clear errdisable not bring the port back?
clear errdisable interface only re-enables VLANs that were disabled in per-VLAN mode. When the whole port is err-disabled, which is the default for every cause unless per-VLAN mode was configured, the command does not apply. Run shutdown and then no shutdown on the interface after removing the cause.
What is the default auto recovery interval?
300 seconds, with a configurable range of 30 to 86,400 seconds on Catalyst 9300 switches. The timer applies only to causes enabled with errdisable recovery cause. Recovery is disabled for all causes by default.
Can err-disable detection be turned off for one cause?
Yes, for the causes the command accepts, such as link-flap, loopback, inline-power, arp-inspection and dhcp-rate-limit. no errdisable detect cause link-flap stops the switch from err-disabling ports for that reason. The protection is gone too: a flapping link or a loop then stays in the network instead of being isolated. Fix the cause first and treat this as an exception for a specific port design. The command has no option for psecure-violation, udld, storm-control or channel-misconfig, which are controlled by their own feature settings.
Does err-disabled mean the port hardware is bad?
No. Err-disabled is a software state the switch applies when it detects a condition, and most causes are configuration or topology problems. Link-flap, UDLD and gbic-invalid can point to a cable, an optic or a switch port, which is why the swap test above isolates the failed part before anything is replaced.