Configuring loop protection


  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. The default action is tx-disable, which means that the port that transmitted the loop detection packet is disabled. When this action is enabled, environments with N loops must have loop protection configured on at least N-1 ports to ensure a loop free topology.

    When the default action (tx-disable) is used, it is optional to enable loop protect in all interfaces. By enabling loop protect in a single interface, the loop is detected and the default action is executed. So when the packet from a loop protect-enabled port is received back on an interface where loop protect is not enabled, the loop protect receiver action corresponding to the receiving interface is executed. Please note that all the L2 ports will have a default receiver action of tx-disable even when loop protect is not enabled.

  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.


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)# no routing

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