Troubleshooting err-disabled Ports After a Security Violation

An err-disabled port is a common result of a port security violation on Cisco switches. This post walks through how to identify the cause using IOS show commands and explains both manual and automatic recovery methods with real CLI output.

Troubleshooting err-disabled Ports After a Security Violation

If you have ever configured port security on a Cisco switch and suddenly found a port completely unresponsive, you have likely encountered an err-disabled port. This is one of the most common troubleshooting scenarios you will face in real networks, and a key skill for the CCNA exam. The good news is that once you understand why it happens and how to recover from it, the fix is straightforward.

What Is an err-disabled Port?

When a Cisco switch detects a policy violation on a port, it can automatically shut that port down and place it into an err-disabled state. The port is effectively switched off at the software level. Traffic stops flowing, the connected device loses network access, and the port LED typically goes dark or turns amber depending on the switch model.

Port security is one of the most common triggers for this state, but it is not the only one. Other causes include BPDU Guard violations, DHCP snooping rate-limit violations, and ARP inspection failures. For this post, we will focus on port security as the trigger since it falls directly under CCNA blueprint section 5.7 (Layer 2 Security Features).

Identifying the Problem

The first step in err-disabled port recovery is confirming what you are dealing with. Run show interfaces on the suspect port:

Switch# show interfaces fastEthernet 0/1
FastEthernet0/1 is down, line protocol is down (err-disabled)
  Hardware is Fast Ethernet, address is 0023.ab12.3456
  ...

Notice the status line reads down/down with (err-disabled) instead of the usual up/up. To find out exactly why the port went into this state, use show port-security interface:

Switch# show port-security interface fastEthernet 0/1
Port Security              : Enabled
Port Status                : Secure-shutdown
Violation Mode             : Shutdown
Aging Time                 : 0 mins
Aging Type                 : Absolute
SecureStatic Address Aging : Disabled
Maximum MAC Addresses      : 1
Total MAC Addresses        : 1
Configured MAC Addresses   : 0
Sticky MAC Addresses       : 0
Last Source Address:Vlan   : 00aa.bbcc.dd01:1
Security Violation Count   : 1

The status Secure-shutdown confirms that port security triggered the err-disabled state. The Last Source Address field tells you which MAC address caused the violation. This is useful for figuring out whether a rogue device was plugged in or whether a legitimate device simply has an unexpected MAC address.

Recovering the Port

There are two ways to bring an err-disabled port back online.

Manual Recovery

The most common method is a manual shutdown and no-shutdown cycle. Navigate to the interface and toggle it:

Switch# configure terminal
Switch(config)# interface fastEthernet 0/1
Switch(config-if)# shutdown
Switch(config-if)# no shutdown
Switch(config-if)# end

This clears the error condition and brings the port back up. However, if the offending device is still connected, the port will be immediately shut down again. Always investigate the cause before recovering the port.

Automatic Recovery

You can also configure the switch to automatically recover from err-disabled states using the errdisable recovery global command:

Switch(config)# errdisable recovery cause psecure-violation
Switch(config)# errdisable recovery interval 30

The first command tells the switch to automatically recover ports that were disabled specifically due to port security violations. The second sets a recovery timer in seconds. After that interval, the switch will attempt to bring the port back online automatically.

To verify recovery settings, use:

Switch# show errdisable recovery
ErrDisable Reason            Timer Status
-----------------            --------------
psecure-violation            Enabled

Timer interval: 30 seconds

Automatic recovery is convenient in environments where brief violations are expected, but be cautious: if the root cause is not resolved, the port will just keep cycling between up and err-disabled.

Key Takeaways

  • Identify first: use show interfaces and show port-security interface to confirm the cause before taking action.
  • Manual recovery: a shutdown followed by no-shutdown cycle clears the state immediately.
  • Automatic recovery: use errdisable recovery cause to automate the process, paired with an appropriate interval timer.
  • Fix the root cause: recovering the port without addressing the violation just creates a loop of repeated shutdowns.

What's Next

Now that you can identify and recover from err-disabled ports, the natural next step is understanding how to configure port security in the first place, including setting maximum MAC address limits, configuring sticky learning, and choosing the right violation mode for your environment. That is coming up next in the Layer 2 Security Features series.

If you want to go deeper on this topic alongside your CCNA studies, the Cisco Press CCNA 200-301 Official Cert Guide by Wendell Odom covers Layer 2 security in thorough detail and is the best single reference for exam preparation.

๐Ÿ”ง
If you want to catch err-disabled ports the moment they happen rather than waiting for a user to complain, a tool like PRTG Network Monitor can poll your switches via SNMP and alert you instantly when an interface changes state. That kind of visibility saves a lot of reactive troubleshooting time in production environments. PRTG Network Monitor, SolarWinds Network Performance Monitor and Nagios.

Tools and resources for this topic