Configuring loop protection

Procedure
  1. Enable loop protection on each layer 2 interface (port, LAG, or VLAN) for which loop protection is needed, with the commands loop-protect and loop-protect vlan.
  2. Define the action to be taken when a loop is detected with the command loop-protect action.
  3. If required, change the interval at which loop protection messages are sent with the command loop-protect transmit-interval.
  4. If required, change the length of time the switch waits before re-enabling an interface with the command loop-protect re-enable-timer.
  5. Review loop protection configuration settings with the command show loop-protect.

Example

This example creates the following configuration:

  • Enables loop protection on data port 1/1/1 and sets the loop detection action to disable the transmit port.
  • Enables loop protection on LAG 25 and sets the loop detection action to disable both transmit and receive ports.
  • Enables loop protection on VLANs 100-125 and 200.
  • Sets the re-enable timer to 10 seconds.
  • Sets the transmit-interval to 30 seconds.
switch(config)# interface 1/1/1 
switch(config-if)# loop-protect
switch(config-if)# loop-protect action tx-disable
switch(config-if)# exit
switch(config)# interface lag 25
switch(config-lag-if)# loop-protect
switch(config-if)# loop-protect action tx-rx-disable
switch(config-if)# loop-protect vlan 100-125,200
switch(config-if)# exit
switch(config)# loop-protect re-enable-timer 30
switch(config)# exit
switch#  show loop-protect

Status and Counters - Loop Protection Information

Transmit Interval             : 30 (sec)
Port Re-enable Timer          : 10 (sec)

Interface 1/1/1
  Loop-protect enabled        : Yes
  Loop-Protect enabled VLANs  :
  Action on loop detection    : TX disable
  Loop detected count         : 0
  Loop detected               : No
  Interface status            : up

Interface lag 25
  Loop-protect enabled        : Yes
  Loop-Protect enabled VLANs  : 100-125,200
  Action on loop detection    : TX-RX disable
  Loop detected count         : 0
  Loop detected               : No
  Interface status            : up