STP is Layer 2 loop prevention mechanism that will be block one port on network switch if it’s detects a loop of the broadcast messages within it architecture. By defaults, spanning trees enabled on the most interconnected Cisco switches. Switches send out the Bridge Protocol Data Unit (BPDU) on all the active interfaces. BPDU are contains STP information needed to the select the root switch and detect loops.
STP Root Bridge Election
The switch are assigns
the root bridge within interconnected switches. A root bridges is central point
of all switches and will responsible for the forwarding traffic. The switch
selects a root bridges by using the switch priority and MAC address. Each
switch has its own bridges ID and has default priority value of the 32768. The
root bridges are taking precedence over MAC address. If switch has lowest
bridge priority value among the switches within LAN, then it will select as spanning
tree root bridges.
If all spanning tree
bridge priority has same priority value on all switches, then the MAC address
will the tiebreaker. The lowest MAC address will have selected as Root Bridges.
Most of the older switches have a lower values of the MAC address and have
lower bandwidth & limited CPU/memory as compared to the newer switches. Electing
an older switch as root bridge will be cause the suboptimal operation on your
network.
Spanning Tree Priority Root Bridge Optimization
We should be avoid selecting
the root bridge using MAC address, which can be cause a suboptimal network
performance as it will be choose oldest switch with lowest MAC address in
network. The example is spanning tree topology below shows LAN switches that select
Switch6 as Root Bridge by using MAC address selection. Let assume that Switch6
is oldest switch in group. All traffic will be go & process first on Switch6
before it goes to destined switch. That will be create poor performance of networks.
To the prevent having
suboptimal network, we need to the manually choose root bridge within network.
By the doing that, we need to the manually configure value of the root bridge
or manually assign it as root bridge by the using ‘root primary’ commands.
This will be set bridge priority to 24576, which is the lower than default
priority.
What if primary root
bridge fails? To the optimize further, we need to the assign other core switch
as secondary root bridge in the case primary root bridge is not operational. To
do that, we enter ‘root secondary’ command. This will be set bridge
priority to the 28672, which is lower than default priority but higher than
root primary. When the primary switch fail, the switches will be select a new
root bridges. It will be then failover to secondary switch, and it will have
selected as the new roots bridges.
STP Root Primary and Root Secondary Configuration
Based on diagram above,
we need to the manually configure core switch as root bridge as they have
higher bandwidth and the better features in the general as compared to other
switches on group. The below configuration are shows how we configure core
switch, the Switch0, as the root bridges.
Switch0(config)#spanning-tree vlan 1
root primary
To the verify, we can
use ‘show spanning-tree’ command.
Switch0#show spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 0001.9725.3338
This bridge is the root
Hello Time 2s Max Age 20s Forward
Delay 15s
Bridge ID's Priority 24577 (priority
24576 sys-id-ext 1)
Address 000.19725.3338
Hello Time 2s Max Age 20 sec Forward
Delay 15s
Below the
configuration to the assign Switch1 as the secondary roots.
Switch1(config)#spanning-tree vlan 1
root secondary
Again, we can use ‘show
spanning-tree’ commands to the verify our configuration.
Switch1#show spanning-tree vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 0001.9725.3338
Cost 19
Port 1 (FastEthernet0/1)
Hello Time 2 sec Max Age 20sec Forwards Delay 15 sec
Bridge ID's Priority 28673 (priority
28672 sys-id-ext. 1)
Address 0040.0B2C.E63A
Hello Tim 2 sec Max Age 20sec Forwards Delay 15sec
Aging Time 20
0 Comments