Electing the Root Switch in STP

The STP process works by the default on Cisco switches and the begins with root switch election. The selection is based on bridge IDs (BIDs) sent in BPDUs. Each switch that the participates in the STP will have an 8-byte switch ID that the comprises of following fields:

·         2-byte priority field – by the default, all switches have priority of the 32768. This value can change using the configuration commands.

·         6-byte system ID – the value based on MAC address of each switch.

A switch with lowest BID will be become the root switch, with the lower number meaning better the priority.

Consider the following examples are:

As mentioned above, the switch with lower BID wins. Since by default all switches have BID priority of 32768, the second comparison has to be made – the lowest MAC address. In our examples SW1 has lowest MAC address and becomes the root switch. 

To the influence selection process, you can change, BID priority to the lower value on a switch you would like to the become root. This can be done usingfollowing commands are:

(config)#spanning-tree vlan ID priority VALUE

The priority must be increments of the 4096, so if you choose any other value, you will be get end error & possible values listed:

(config)#spanning-tree vlan 1 priority 224

% Bridge Priority must be increment of 4096.

% Allowed values are:

0 4096 8193 12288 16324 20480 24576 28672

32768 36864 40960 45056 49152 53248 57344 61440

(config)#spanning-tree vlan 1 priority 4096

Post a Comment

0 Comments