How to Prevent Errdisabled Ports by Using the Errdisable Flap Feature
The errdisable flap feature is a feature that will isolate ports that repeatedly become errdisabled due to the same error conditions. This feature can help us avoid network interference caused by unstable ports and reduce the burden of switches in reactivating errdisabled ports.
To enable the errdisable flap feature, we must use the command errdisable flap setting in global configuration mode. This command determines the maximum number of errdisabled ports that can be handled by a switch at one time and the time interval in seconds between two ports that are the same errdisabled. The following is an example of using this command:
Switch# configure terminal Switch(config)# errdisable flap setting 10 60 Switch(config)# end
The above command will enable the errdisable flap feature by setting the maximum number of errdisabled ports that a switch can handle at 10 and the time interval between two ports that are errdisabled the same at 60 seconds.
After the errdisable flap feature is enabled, the switch will isolate ports that repeatedly become errdisabled due to the same error conditions in the specified time interval. Isolated ports will not be re-enabled by the switch, even if the errdisable recovery feature is enabled. Isolated ports can only be manually re-enabled by using the shutdown and no shutdown commands. The following is an example of a message generated by this feature:
%PM-4-ERR_RECOVER: Attempting to recover from link-flap err-disable state on Gi1/0/1 %PM-4-ERR_DISABLE: link-flap error detected on %PM-4-ERR_DISABLE: link-flap error detected on Gi1/0/1, putting Gi1/0/1 in err-disable state %PM-4-ERR_DISABLE: Too many link-flap error detected on Gi1/0/1, putting Gi1/0/1 in permanent err-disable state
From the above message, we can see that the Gi1/0/1 port became errdisabled due to link flapping and then isolated by the switch due to too much link flapping occurring within 60 seconds.
By using the errdisable flap feature, we can avoid network interference caused by unstable ports and reduce the burden of switches in reactivating errdisabled ports.
How to Monitor the Status of an Errdisabled Port by Using the Show Interfaces Err-disabled Status and Show Errdisable Recovery Commands
In addition to addressing and preventing errdisabled ports, we can also monitor the status of errdisabled ports by using the show interfaces status err-disabled command and show errdisable recovery on the switch. These commands will display information about the port that is errdisabled and the errdisable recovery feature that is running on the switch.
How to Monitor the Status of an Err-disabled Port by Using the Show Interfaces Err-disabled Status Command
The show interfaces status err-disabled command is a command that will display a list of ports that are errdisabled and the reason why those ports are disabled. This command can help us find out which ports are problematic and what causes them so that we can take corrective or preventive action. The following is an example output of this command:
Switch# show interfaces status err-disabled Port Name Status Reason Gi1/0/1 err-disabled link-flap Gi1/0/2 err-disabled bpduguard Gi1/0/3 err-disabled psecure-violation Gi1/0/4 err-disabled udld Gi1/0/5 err-disabled channel-misconfig
From the output above, we can see that port Gi1/0/1 becomes errdisabled due to link flapping, port Gi1/0/2 becomes errdisabled due to STP violation, port Gi1/0/3 becomes errdisabled due to Port Security violation, port Gi1/0/4 becomes errdisabled due to UDLD violation, and port Gi1/0/5 becomes errdisabled due to EtherChannel misconfiguration.