Can Link-flap setting use to detect frequent linkup and linkdown on a switch port?

Answered Question
Sep 19th, 2010

Hi :

Since my below question has no answer so far, I think I need to just ask a general question : Can Cisco switch has a feature to detect and shut the port when the linkup and linkdown of the port over the threshold setting ( like linkflap setting )?

Thanks!

The production line now wants to use a Cisco switch ( C2960 ) to detect the end devices linkup and linkdown and then shutdown the port if the linkup and linkdown too frequent, for example linkup and down 2 times in 10 seconds.

I set the config as below :

Switch(config)#errdisable detect cause all

Switch(config)#errdisable flap-setting cause link-flap max-flaps 2 time 10

Switch#sh errdisable flap-values
ErrDisable Reason    Flaps    Time (sec)
-----------------    ------   ----------
pagp-flap              3       30
dtp-flap               3       30
link-flap              2       10

How can I test out this config? Can I disconnect and connect back the LAN line at etherent port 2 times within 10 second to make the errdisable state on so that the switch will shut the port off?

I have tried to do the test but the port is not shut. The port will be link back again after certain time. Any way to set and test it on this request?

I have even losen condition that to 1 flap within 10 sec so that I can unplug and plug the LAN cable easily to see the error but the port still come to linkup after plug in certain time later.

Attach config file for your reference. Thanks!

best regards..

I have this problem too.
0 votes
Correct Answer by Sebastian Helmer about 6 years 2 months ago

Hello,

that is what I found in the Cisco documentation...

"

Link-flap error

Link flap means that the interface continually goes up and down.  The           interface is put into the errdisabled state if it flaps more than five  times in           10 seconds. The common cause of link flap is a Layer 1 issue such as a  bad           cable, duplex mismatch, or bad Gigabit Interface Converter (GBIC)  card. Look at           the console messages or the messages that were sent to the syslog  server that           state the reason for the port shutdown.

"

I see in the configuration that the ports are in default, maybe the switch will not detect the up/down because of spanning tree. So if the statemant I found did not help you, configuret the testport "switchport mode host" to enable portfast.

Hope that helps..

best regards,
Sebastian

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Sebastian Helmer Wed, 09/29/2010 - 12:27

Hello,

that is what I found in the Cisco documentation...

"

Link-flap error

Link flap means that the interface continually goes up and down.  The           interface is put into the errdisabled state if it flaps more than five  times in           10 seconds. The common cause of link flap is a Layer 1 issue such as a  bad           cable, duplex mismatch, or bad Gigabit Interface Converter (GBIC)  card. Look at           the console messages or the messages that were sent to the syslog  server that           state the reason for the port shutdown.

"

I see in the configuration that the ports are in default, maybe the switch will not detect the up/down because of spanning tree. So if the statemant I found did not help you, configuret the testport "switchport mode host" to enable portfast.

Hope that helps..

best regards,
Sebastian

Tang-Suan Tan Thu, 09/30/2010 - 08:53

Hi Helmer :

Thanks for your answer.

I will try and let you know the result. Thanks!

best regards..

Tang-Suan Tan Fri, 10/01/2010 - 09:34

Hi Helmer :

I have tested just now with C3550, it works fine when I set to 2 times in 10 seconds. By this setting, I can plug and unplug the LAN cable three times esaily in 10 seconds and make the port in errdisable state and the port is shut.

In this setting whether I set the port in switchport host or not, the errdisable state also function well.

In fact, I had tried the same setting ( 2 times flap in 10 second ) in C2960 which is 1G port with my 100M LAN port and it cannot shut the port.

The C2960 is not with me now. I can test with it next time by add in the "switchport host" if it is available.

The reason failed in C2960 could be due to it is 1G port and my PC LAN is 100M. These two different port bandwidth may cause link-flap detection not work. Anyway, I will try it by adding in the "switchport host" if the C2960 is with me. If it still failed and passed with 1G PC, this means the link-flap detection will not work unless the port to port is in the same bandwidth.

Thanks for your reply! This case is closed.

Actions

This Discussion