Command Manual – MSTPH3C S3100-52P Ethernet Switches Chapter 1 MSTP Configuration Commands1-31DescriptionUse the stp loop-protection command to enable the loop prevention function on thecurrent port.Use the undo stp loop-protection command to restore the loop prevention function tothe default state on the current port.By default, the loop prevention function is disabled.A switch maintains the states of the root port and other blocked ports by receiving andprocessing BPDUs from the upstream switch. These BPDUs may get lost because ofnetwork congestion or unidirectional link failures. If a switch does not receive BPDUsfrom the upstream switch for a certain period, the switch selects a new root port; theoriginal root port becomes a designated port; and the blocked ports turn to theforwarding state. This may cause loops in the network.The loop prevention function suppresses loops. With this function enabled, if linkcongestions or unidirectional link failures happen, a root port becomes a designatedport, and the port turns to the discarding state. The blocked port also becomes thedesignated port and the port turns to the discarding state, that is, the port does notforward packets and thereby loops can be prevented.Example# Enable the loop prevention function on Ethernet1/0/1. system-viewSystem View: return to User View with Ctrl+Z.[H3C] interface Ethernet1/0/1[H3C-Ethernet1/0/1] stp loop-protection1.1.29 stp max-hopsSyntaxstp max-hops hopsundo stp max-hopsViewSystem viewParameterhops: Maximum hops to be set. This argument ranges from 1 to 40. The default value ofthe maximum hops of an MST region is 20.