
117
Default level
2: System level
Parameters
None
Description
Use the
stp loop-protection
command to enable the loop guard function on the port(s).
Use the
undo stp loop-protection
command to restore the system default.
By default, the loop guard function is disabled.
Configured in Layer 2 Ethernet interface view, the setting takes effect on the current interface only.
Configured in port group view, the setting takes effect on all ports in the port group.
Configured in Layer 2 aggregate interface view, the setting takes effect only on the aggregate interface.
Configured on a member port in an aggregation group, the setting takes effect only after the port leaves
the aggregation group.
Among loop guard, root guard and edge port settings, only one function (whichever is configured the
earliest) takes effect on a port at the same time.
Related commands:
stp edged-port
and
stp root-protection
.
Examples
# Enable the loop guard function on GigabitEthernet 1/0/1.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] stp loop-protection
stp max-hops
Syntax
stp max-hops
hops
undo stp
max-hops
View
System view
Default level
2: System level
Parameters
hops
: Sets the maximum hops, ranging from 1 to 40.
Description
Use the
stp max-hops
command to set the maximum hops of the MST region on the switch.
Use the
undo stp max-hops
command to restore the maximum hops to the default setting.
Setting the maximum hops of MST regions is to limit the sizes of MST regions. By default, the maximum
number of hops of an MST region is 20.
Related commands:
display stp
.