When I study the CCNP course about spanning-tree, I have a question confusing me.After the root bridge was elected,root port in every other switches should be elected.I don't know whether all ports on one switch have the same path cost to root switch.If not, how to calculate it.
For example,Fastethernet0/0 in Switch A and Fastethernet0/0 in Switch B are in same segment.Fastethernet0/1 in Switch A and Fastethernet0/0 in Switch C are in same segment.Fastethernet 0/1 in Switch B and Fastethernet 0/1 in Switch C are in same segment.
Assumed three segment are all 100M links. switchA was elected as root bridge.I know path cost of fa0/0 in SwitchB and SwitchC are 19.But I don't know whether fa0/1 in SwitchB and SwitchC have the same path cost 19,or 38.How to calculate?
Port 0/2 and 0/3 are initially considered for root election. Actually, if bridge C has a better priority (i.e. inferior numerically) than B, it is possible that one of those port temporarily became root port. But as soon as B hears from A on 0/0 or 0/1, B will realize that it has a better path to the root than C and will put its port 0/2-3 in a designated role. Information is only flowing in one direction with STP. You advertise from the root toward the leaves of the tree. Only the designated port of a given segment is sending BPDUs. So basically, port 0/0 and 0/1 on C will only receive BPDUs in the final state.
Port 0/2 on B is designated because it sends the best information on the segment to which it is connected. Again, on a given segment, only the port that has the best information sends BPDUs. The other ports can only have an alternate, root or backup role and stay silent. When I say better information, I'm of course talking about this message priority vector, that includes root id, root path cost, sender id and port id. That's what gets compared.