This is a simple lab that consist of 4 catalyst switches 3560
The main aim of the lab is to introduce the most basic concepts of spanning tree.
Well first of all i connected devices as shown in the diagram , now below are the MAC address values start hex value for each switch
Sw1 : 001b
Sw2 : 001b
Sw3 : 0016
Sw4 : 0026
The main aim of the lab is to introduce the most basic concepts of spanning tree.
Well first of all i connected devices as shown in the diagram , now below are the MAC address values start hex value for each switch
Sw1 : 001b
Sw2 : 001b
Sw3 : 0016
Sw4 : 0026
Now here is the result of the spanning tree process , note that by default the running spanning tree protocol mode is PVST which run a seperate 802.11d instance of spanning tree for each vlan.
Now How did we reach this result topology
1- Elected root switch SW3 (since it has lowest MAC address)
2- Each switch choose the interface closest to the root switch (lowest cost) to be elected as root port
Now the question is why did each switch choose the lower ID as root port. The answer lies in the below sequence that
switch choose based upon the root ports
– Port with the lowest accumulated path cost based on
BW
– Lowest next hop bridge ID to the root bridge
– Lowest port priority (1B and is 128 by default)
– Lowest port ID (1B)
Now since all those links in diagram 1 match in all the parameters except the last tie breaker which is lowest ID we'll notice that root ports are those of lowest interface ID on each link.
Using the same logical thinking you can reach the conclusion on how any STP network converge.
Now How did we reach this result topology
1- Elected root switch SW3 (since it has lowest MAC address)
2- Each switch choose the interface closest to the root switch (lowest cost) to be elected as root port
Now the question is why did each switch choose the lower ID as root port. The answer lies in the below sequence that
switch choose based upon the root ports
– Port with the lowest accumulated path cost based on
BW
– Lowest next hop bridge ID to the root bridge
– Lowest port priority (1B and is 128 by default)
– Lowest port ID (1B)
Now since all those links in diagram 1 match in all the parameters except the last tie breaker which is lowest ID we'll notice that root ports are those of lowest interface ID on each link.
Using the same logical thinking you can reach the conclusion on how any STP network converge.
Verification
Rack1SW3-basicIP#show span
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0016.4737.2100
This bridge is the root <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Sw3 is root switch
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0016.4737.2100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Rack1SW2-basicIP#show span
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0016.4737.2100
Cost 19
Port 18 (FastEthernet0/16)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 001b.0c7c.a200
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/13 Desg FWD 19 128.15 P2p
Fa0/14 Desg FWD 19 128.16 P2p
Fa0/15 Desg FWD 19 128.17 P2p
Fa0/16 Root FWD 19 128.18 P2p
Fa0/17 Altn BLK 19 128.19 P2p
Fa0/18 Altn BLK 19 128.20 P2p
Fa0/19 Desg FWD 19 128.21 P2p
Rack1SW3-basicIP#show span
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0016.4737.2100
This bridge is the root <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Sw3 is root switch
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0016.4737.2100
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Now let's see for example the blocked ports on switch 2
Rack1SW2-basicIP#show span
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0016.4737.2100
Cost 19
Port 18 (FastEthernet0/16)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 001b.0c7c.a200
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Fa0/13 Desg FWD 19 128.15 P2p
Fa0/14 Desg FWD 19 128.16 P2p
Fa0/15 Desg FWD 19 128.17 P2p
Fa0/16 Root FWD 19 128.18 P2p
Fa0/17 Altn BLK 19 128.19 P2p
Fa0/18 Altn BLK 19 128.20 P2p
Fa0/19 Desg FWD 19 128.21 P2p
As you may notice switch 2 blocked small number of ports and many of its ports where chosen as DP or designated port
this happened due to the mechanism the switch use to choose its designated port.
Ok what's the difference between the root port and designated port:
- Root port : is the best port that leads to the root switch
Each 2 adjacent switches must then elect a port that can serve the segment best. The bridge with the DP on a segment is called “Designated Switch” and the selection is upon the
following criteria:
following criteria:
- – Lowest root bridge ID
- – Lowest accumulated root path cost
- – Lowest sender bridge ID
- – Lowest sender port ID
So in our case Switch 2 compared to other switches ties in point 1 and 2 but to point 3 SW2 has lower MAC address than SW1 and SW3 and consequently any link that has a tie break with SW2 , SW2 wins the tie and announce his port as DP
** A port that is not root and doesn't win the tie break over the segment is