Configuring Link Traps and Link Flap Detection

The link traps and link flap detection features provide for the disabling or re-enabling of link traps and to configure the link flapping detection function. By default, all ports are enabled to send SNMP trap messages indicating changes in their link status (up or down).

Use the set port trap command in any command mode to enable the sending of SNMP trap messages when link status changes.

The following example enables SNMP traps on port ge.1.1:

System(rw)->set port trap ge.1.1 enable
System(rw)->show port trap ge.1.1
Link traps enabled on port ge.1.1.
System(rw)->

The link flap function detects when a link is going up and down rapidly (also called “link flapping”) on a physical port, and takes the configured actions (disable port, and eventually send notification trap) to stop such a condition. If left unresolved, the “link flapping” condition can be detrimental to network stability because it can trigger Spanning Tree and routing table recalculation.

The link flap utility is disabled both globally and on ports by default. The link flap utility must be enabled globally and on the ports for which link flap detection is to occur.

Use the set linkflap globalstate command in any command mode to globally enable the link flap utility on this device.

Use the set linkflap portstate command in any command mode to enable the link flap utility on the specified ports.

There are three link flap actions that can be configured as a response to link flapping:

  • Disable the interface
  • Generate a SYSLOG message
  • Generate an SNMP trap

You can also set the action to all three. A link flap action will occur if the number of link flaps exceeds the configured link flap threshold (number of times the link flaps) setting within the period configured by link flap interval.

Use the set linkflap action command in any command mode to set the link flap action for the specified ports.

Use the set linkflap threshold command in any command mode to set the number of link flaps that will trigger a link flap action for the specified ports.

Use the set linkflap interval command in any command mode to set the period of time within which the link flap threshold must be exceeded to cause the link flap action to trigger.

If the link flap action is to disable the interface, a port downtime period in seconds can be configured to specify how long the disabled interface will remain down. A value of 0 indicates forever.

Use the set linkflap downtime command in any command mode to configure the downtime period for the specified ports.

The following example configures the link flap utility on port ge.1.1 to:

  • Set the link flap action to all three actions
  • Set the link flap threshold to 12 link flaps
  • Sets the link flap interval to 6 seconds
  • Sets the downtime period to 600 seconds
    System(rw)->set linkflap action ge.1.1 all
    System(rw)->set linkflap threshold ge.1.1 12
    System(rw)->set linkflap interval ge.1.1 6
    System(rw)->set linkflap downtime ge.1.1 600
    System(rw)->show linkflap parameters ge.1.1
    Linkflap Port Settable Parameter Table (X means error occurred)
    Port      LF Status  Actions  Threshold   Interval    Downtime
    --------  ---------  -------  ----------  ----------  ----------
    ge.1.1    disabled   D..S..T  12          6           600
    1 port(s) found.
    System(rw)->