Configuring the current device as the root bridge of a specific spanning tree

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Configure the current device as the root bridge.

  • In STP/RSTP mode:stp root primary

  • In PVST mode:stp vlan vlan-id-list root primary

  • In MSTP mode:stp [ instance instance-list ] root primary

By default, a device does not function as the root bridge.