Use the diameter keyword to specify the Layer 2 network diameter (that is, the maximum number of device hops between any two end stations in the Layer 2 network). When you specify the network diameter, the device automatically sets an optimal hello time, forward-delay time, and maximum-age time for a network of that diameter, which can significantly reduce the convergence time. You can use the hello keyword to override the automatically calculated hello time. To configure the root device, perform this procedure:
Procedure What to do next After configuring the switch as the root switch, we recommend that you avoid manually configuring the hello time, forward-delay time, and maximum-age time through the spanning-tree vlan vlan-id hello-time , spanning-tree vlan vlan-id forward-time , and the spanning-tree vlan vlan-id max-age global configuration commands. (Optional) Configuring a Secondary Root Device When you configure a switch as the secondary root, the switch priority is modified from the default value (32768) to 28672.
With this priority, the switch is likely to become the root switch for the specified VLAN Configuring Spanning Tree Protocol (Optional) Configuring a Secondary Root Device Command or Action Purpose Step 1 enable Example: Device> enable Enables privileged EXEC mode. Enter your password if prompted. Step 2 configure terminal Example: Device# configure terminal Enters global configuration mode. Step 3 spanning-tree vlan vlan-id root primary [diameter net-diameter ] Example: Device(config)# spanning-tree vlan 20-24 root primary diameter 4 Configures a device to become the root for the specified VLAN.
• For vlan-id, you can specify a single VLAN identified by VLAN ID number, a range of VLANs separated by a hyphen, or a series of VLANs separated by a comma. The range is 1 to 4094. • (Optional) For diameter net-diameter, specify the maximum number of devices between any two end stations. The range is 2 to 7. Step 4 end Example: Device(config)# end Returns to privileged EXEC mode. Configuring Spanning Tree Protocol 14