The stp max-hops command sets the maximum hops of a spanning tree in a Multiple Spanning Tree (MST) region.
The undo stp max-hops command restores the default maximum hops of a spanning tree.
By default, the maximum hops are 20 in an MST region.
Usage Scenario
The devices on a Layer 2 network running Multiple Spanning Tree Protocol (MSTP) communicate with each other by exchanging Multiple Spanning Tree (MST) Bridge Protocol Data Units (BPDUs). An MST BPDU has a field that indicates the number of remaining hops.
Precautions
In an MST region, the maximum number of hops set on the root device in a Common and Internal Spanning Tree (CIST) or an MSTI is the maximum number of hops in the CIST or Multiple Spanning Tree instance (MSTI).