Setting the Maximum Number of Hops in an MST Region
Context
The number of remaining hops in a BPDU sent by the root bridge equals the maximum number of hops.
The number of remaining hops in a BPDU sent by a non-root bridge equals the maximum number of hops minus the number of hops from the non-root bridge to the root bridge.
If a switch receives a BPDU in which the number of remaining hops is 0, the switch will discard the BPDU.
The maximum number of hops of a spanning tree in an MST region determines the network scale. The stp max-hops command can be used to set the maximum number of hops in an MST domain so that the network scale of a spanning tree can be controlled.
Procedure
- Run:
system-view
The system view is displayed.
- (Optional) Run:
stp process process-id
The MSTP process view is displayed.
Skip this step if you perform configurations in the MSTP process 0.
- Run:
stp max-hops hop
The maximum number of hops in an MST region is set.
By default, the maximum number of hops of the spanning tree in an MST region is 20.