Spanning tree configuration examples

Last Updated : Nov 06, 2012 |

The following example enables spanning tree on a port:

Gxxx-001(super)# set port spantree enable 10/5
port 10/5 was enabled on spantree

The following example disables spanning tree on a port:

Gxxx-001(super)# set port spantree disable 10/5
port 10/5 was disabled on spantree

The following example sets the spanning tree cost of port 10/5 to 4096:

Gxxx-001(super)# set port spantree cost 10/5 4096
port 10/5 spantree cost is 4096

The following example configures the version of the spanning tree default path cost used by this bridge:

Gxxx-001(super)# set spantree default-path-cost common-spanning-tree
Spanning tree default path costs is set to common spanning tree.

The following example configures the time used when transferring the port to the forwarding state:

Gxxx-001(super)# set spantree forward-delay 16
bridge forward delay is set to 16.

The following example configures the time interval between the generation of configuration BPDUs by the root:

Gxxx-001(super)# set spantree hello-time 2
bridge hello time is set to 2.

The following example configures the amount of time an information message is kept before being discarded:

Gxxx-001(super)# set spantree max-age 21
bridge max age is set to 21.

The following example configures the bridge priority for spanning tree:

Gxxx-001(super)# set spantree priority 36864
Bridge priority set to 36864.

The following example sets the value in packets used by spanning tree in order to limit the maximum number of BPDUs transmitted during a hello-time period:

Gxxx-001(super)# set spantree tx-hold-count 4
tx hold count is set to 4.

The following example configures the version of spanning tree to use on the device:

Gxxx-001(super)# set spantree version rapid-spanning-tree
Spanning tree version is set to rapid spanning tree.

The following example displays spanning tree information:

Spanning tree state is enabled
Designated Root:  00-04-0d-ea-b0-2d
Designated Root Priority: 32768
Designated Root Cost: 0
Designated Root Port: No root port, Bridge is Designated root
Root Max Age: 20   Hello Time: 2
Root Forward Delay: 15
Bridge ID MAC ADDR: 00-04-0d-ea-b0-2d
Bridge ID priority: 32768
Bridge Max Age: 20        Bridge Hello Time: 2
Bridge Forward Delay: 15  Tx Hold Count 3
Spanning Tree Version is rapid spanning tree
Spanning Tree Default Path Costs is according to common spanning tree
Port   State         Cost       Priority
------ ------------- ---------- ------------
10/3 not-connected 4          128
10/4 not-connected 4          128