Spanning-tree:which is the root port, if 2 paths exist with same cost?

Answered Question
Mar 6th, 2007

Please find attached diagram on this.

Hi, can you clarify this?

Imagine my "root" bridge has been identified. Please find attached diagram. Then I have two switches "Switch2" and "Switch3". I understand that at that point a root port for each switch should be determined determined based on the lowest cost to get to root bridge. If I look at "Switch3", what happens if I have two paths with same cost to get to "Root"?

Which path the STP algorithm would take at that point thus making that the "Root Port" and the path with the highest cost the "blocked" port??

I have this problem too.
0 votes
Correct Answer by royalblues about 9 years 9 months ago

Friend,

STP uses the following order sequence to decide on its parameters

Step 1. Lowest Root BID

Step 2. Lowest Path Cost to Root Bridge

Step 3. Lowest Sender BID

Step 4. Lowest Port ID

In your case the step 1 & 2 would yield the same result and hence the deciding factor would be the 3 point which is the lowest sender bridge ID (which could be either be the root or the swith2 in your case)

If you had both the links terminated on the same root switch directly, then the deciding factor would have been the port ID and the lowest port would be in forwarding state by default.

HTH, rate if it does

Narayan

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
royalblues Wed, 03/07/2007 - 03:39

Friend,

STP uses the following order sequence to decide on its parameters

Step 1. Lowest Root BID

Step 2. Lowest Path Cost to Root Bridge

Step 3. Lowest Sender BID

Step 4. Lowest Port ID

In your case the step 1 & 2 would yield the same result and hence the deciding factor would be the 3 point which is the lowest sender bridge ID (which could be either be the root or the swith2 in your case)

If you had both the links terminated on the same root switch directly, then the deciding factor would have been the port ID and the lowest port would be in forwarding state by default.

HTH, rate if it does

Narayan

Danilo Dy Wed, 03/07/2007 - 07:24

Spanning Tree Algorithm is used to calculate a loop-free path.

All switch ports are in blocking mode to begin with. It takes approx 30 seconds until packets can be forwarded.

Step 1 : Elect Root Bridge - Lowest bridge priority, if there is a tie then switch with lowest bridge ID

Step 2 : Elect Root Ports - Locate redundant paths to root bridge; block all but on root. Root Path Cost is cumulative cost of path to root bridge. Ports directly connected to Root Bridge will be root ports, otherwise lowest root path cost used.

Step 3 : Elect Designated Ports - Single port that sends and receives traffic from a switch to and from Root Bridge - Lowest cost path to Root Bridge.

To learn more

http://www.cisco.com/univercd/cc/td/doc/product/rtrmgmt/sw_ntman/cwsimain/cwsi2/cwsiug2/vlan2/stpapp.htm

flashsplash Wed, 03/07/2007 - 07:40

If there is a tie with the cost-path the second criteria stp will look at is the lowest port number if the switch is using multiple interfaces.

Actions

This Discussion