Taming the Err-Disable Trap: How to Recover Errdisabled-Disabled Ports on Cisco Switches

How to Re-Enable Errdisabled Ports Manually or Automatically

Once we know the cause of the errdisabled port, we can take steps to resolve the problem and reactivate the port. There are two ways to re-enable errdisabled ports: manually or automatically.

How to Re-Enable Errdisabled Ports Manually

The way to manually re-enable errdisabled ports is to use the shutdown command and no shutdown in interface configuration mode. This command forcibly deactivates and reactivates the port, removing the errdisabled state from that port. The following is an example of using this command:

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

The above command will re-enable the Gi1/0/1 port which was errdisabled due to link flapping. However, note that this method is only temporary because the port can revert to errdisabled if the error condition still exists or recurs. Therefore, before manually re-enabling an errdisabled port, we must make sure that the problem that caused the errdisabled port is resolved or prevented.

How to Re-Enable Errdisabled Ports Automatically

The way to re-enable errdisabled ports automatically is to use the errdisable recovery feature on the switch. This feature will allow the switch to re-enable errdisabled ports automatically after a certain time, without the need for manual intervention. This feature can save time and effort in resolving errdisabled ports, especially if there are many ports affected.

To enable the errdisable recovery feature, we must use the commands errdisable recovery cause and errdisable recovery interval in global configuration mode. The errdisable recovery cause command will specify what error conditions this feature can handle, while the errdisable recovery interval command will specify the timeout in seconds before the switch reactivates the errdisabled port. The following is an example of using this command:

Switch# configure terminal
Switch(config)# errdisable recovery cause link-flap
Switch(config)# errdisable recovery cause bpduguard
Switch(config)# errdisable recovery cause psecure-violation
Switch(config)# errdisable recovery cause udld
Switch(config)# errdisable recovery cause channel-misconfig
Switch(config)# errdisable recovery interval 300
Switch(config)# end

The above command will enable errdisable recovery for the five most common error conditions, namely link flapping, STP violation, Port Security violation, UDLD violation, and EtherChannel misconfiguration. In addition, the command will also set a timeout of 300 seconds (5 minutes) before the switch re-enables the errdisabled port.

By using the errdisable recovery feature, we can reduce the negative impact of errdisabled ports and speed up network recovery. However, note that this feature is also only temporary, as the port may revert to errdisabled if the error condition persists or recurs. Therefore, this feature should be used as an emergency solution, not as a permanent solution.

How to Prevent Errdisabled Ports by Using the Errdisable Detect and Errdisable Flap Features

In addition to re-enabling errdisabled ports, we can also prevent errdisabled ports by using the errdisable detect and errdisable flap features on the switch. These features will help us identify and isolate ports that have the potential to cause errors, thereby reducing the risk of errdisabled ports.

How to Prevent Errdisabled Ports by Using the Errdisable Detect Feature

The errdisable detect feature is a feature that will detect error conditions that can cause the port to become errdisabled and give a warning to us. This feature can help us find out which ports are problematic and what causes them, so we can take precautions before they become errdisabled.

To enable the errdisable detect feature, we must use the command errdisable detect cause in global configuration mode. This command will determine what error conditions this feature can detect. The following is an example of using this command:

Switch# configure terminal
Switch(config)# errdisable detect cause link-flap
Switch(config)# errdisable detect cause bpduguard
Switch(config)# errdisable detect cause psecure-violation
Switch(config)# errdisable detect cause udld
Switch(config)# errdisable detect cause channel-misconfig
Switch(config)# end

The above command will enable errdisable detection for five of the most common error conditions, namely link flapping, STP violation, Port Security violation, UDLD violation, and EtherChannel misconfiguration.

After the errdisable detect feature is enabled, the switch will send a warning message to the console or syslog if any port encounters the specified error condition. The following is an example of a warning message generated by this feature:

%PM-4-ERR_DISABLE: link-flap error detected on Gi1/0/1, putting Gi1/0/1 in err-disable state
%PM-4-ERR_DISABLE: bpduguard error detected on Gi1/0/2, putting Gi1/0/2 in err-disable state
%PM-4-ERR_DISABLE: psecure-violation error detected on Gi1/0/3, putting Gi1/0/3 in err-disable state
%PM-4-ERR_DISABLE: udld error detected on Gi1/0/4, putting Gi1/0/4 in err-disable state
%PM-4-ERR_DISABLE: channel-misconfig (STP) error detected on Gi1/0/5, putting Gi1/0/5 in err-disable state

By using the errdisable detect feature, we can find out which ports have the potential to cause errors and take precautions before they become errdisabled.

Latest Articles