My BS in Computer Science is very old (used punch cards in college), I lost my job, and am trying to upgrade my skills. I am enrolled in the Cisco CCNA Exploration curriculum and am currently using the LAN Switching & Wireless text and study guide (SG). The example in my attachment is from the SG. All the textbook examples in the chapter on STP use 3 switches, which is a no-brainer. SG has problems that use 4 switches. My confusion from the book, my instructor, and the Internet is on exactly what cost path is used for designated/non-designated port election. The attachment shows my root bridge and the root ports. The instructions I have seen for doing designated port election seem to be contradictory. I have been led to understand also that any port opposite a root bridge port (which are all designated) is blocked unless it is a root port.
Consider the SWB-SWC segment. First thing to look at is the root cost path. Is this the cost of traffic going out of SWB-GI0/2 to the root bridge (4+19, SWB-SWC-SWA) or (4+4+4, SWB-SWC-SWD-SWA) or the cost of traffic coming into SWB-GI0/2 and going out the root port of SWB (cost 4, or is the cost of the SWB-SWC segment included, too, which would be 4+4?)?
Looking at the opposite port on the same segment (SWB-SWC), the values I would get using the same logic would be going out of SWC-GI0/2 to the root bridge (4+4, SWC-SWB-SWA) or (4+19+4, SWC-SWB-SWD-SWA) or the cost of traffic coming into SWC-GI0/2 and going out the root port of SWC (cost 4+4, or is the cost of the SWB-SWC segment included, too, which would be 4+4+4?)?
Depending on the answer to this, would you ever use in the calculation a path through a port that has already been configured to be blocked?
I have read where the BID is used if the cost is equal but also read that the port with the lowest ID is used if the cost is equal.
I may be making this harder than it is, but I want to be able to understand how it works. Thank you in advance for any light someone can shed on this.