This example will solve most of the issues in understanding STP:
Lets consider how to get to the designated, root and blocked ports. I will try explaining for each switch one by one. Here all switches are having default ID. If ID were different then it would have automatically choose the lowest bridge ID. But here we will try to get with defaults:
Step 1: finding root switch
After analyzing MAC address of all the switch, we found that MAC of Switch 4 is very low and hence its the Root bridge. Lets check the output of this switch
==========================
Switch#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.43AD.CAD2
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0001.43AD.CAD2
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/4 Desg FWD 19 128.4 P2p
================================================
All the ports are designated ports.
Step 2: Finding root ports for each switch
Switch 3: The port connecting directly to switch 4 is the root port
Switch 5: The port directly connected to the switch 4 is the root port
Switch 2: The port directly connected to the switch 4 is the root port
Switch 1: The port directly connected to the switch 4 is the root port
Switch 0: There are two paths for the Switch 0 to reach root switch
a> via switch 2 whose path cost is 19+19
b> via switch 1 to Switch 4 directly whose path cost is 19+19
so there is Tie here. Hence lets check the MAC here
Mac of switch 1< Mac of Switch 2
Hence it will choose Switch 1 to reach the root bridge
Step 3: Finding Blocked
Now you need to compare the MAC address of each switch, which ever will be low it will be as Designated port and the one with higher MAC it will be blocked. These blocked ports are Amber in the above diagram.
example switch 1 and Switch 3. THe mac of switch 1 is greater than switch 3, so the port of switch 1 connecting to the switch 3 is Amber.
Important Lets consider the switch 0 now which is connected to switch 2. The MAC of switch 2 is higher but still it is green. The reason is the cost of the switch 2 to reach root is less than the cost of the switch 0 to reach root. Hence Switch 0 port is Amber.
Hope this helps!!!
Lets consider how to get to the designated, root and blocked ports. I will try explaining for each switch one by one. Here all switches are having default ID. If ID were different then it would have automatically choose the lowest bridge ID. But here we will try to get with defaults:
Step 1: finding root switch
After analyzing MAC address of all the switch, we found that MAC of Switch 4 is very low and hence its the Root bridge. Lets check the output of this switch
==========================
Switch#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0001.43AD.CAD2
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0001.43AD.CAD2
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/3 Desg FWD 19 128.3 P2p
Fa0/4 Desg FWD 19 128.4 P2p
================================================
All the ports are designated ports.
Step 2: Finding root ports for each switch
Switch 3: The port connecting directly to switch 4 is the root port
Switch 5: The port directly connected to the switch 4 is the root port
Switch 2: The port directly connected to the switch 4 is the root port
Switch 1: The port directly connected to the switch 4 is the root port
Switch 0: There are two paths for the Switch 0 to reach root switch
a> via switch 2 whose path cost is 19+19
b> via switch 1 to Switch 4 directly whose path cost is 19+19
so there is Tie here. Hence lets check the MAC here
Mac of switch 1< Mac of Switch 2
Hence it will choose Switch 1 to reach the root bridge
Step 3: Finding Blocked
Now you need to compare the MAC address of each switch, which ever will be low it will be as Designated port and the one with higher MAC it will be blocked. These blocked ports are Amber in the above diagram.
example switch 1 and Switch 3. THe mac of switch 1 is greater than switch 3, so the port of switch 1 connecting to the switch 3 is Amber.
Important Lets consider the switch 0 now which is connected to switch 2. The MAC of switch 2 is higher but still it is green. The reason is the cost of the switch 2 to reach root is less than the cost of the switch 0 to reach root. Hence Switch 0 port is Amber.
Hope this helps!!!
1 comment:
Really it was very helpful...Excellent way of explanation of STP...
Post a Comment