What Andrew is stating here is that the cost of the last link that was traversed by a BPDU is added by the receiving switch. Let me clarify using the following diagram:
you stated here that to increase the port priority for Gi0/2 in order this become root port . if i am correct, this supposed to be done in the upstream switch , right?
Just to let our other readers know, the quote you are referring to is this one:
The specific scenario that the original poster was describing was two switches connected to each other with two links. One of those switches would become the root bridge, while the other would be a non-root bridge. One of the two ports on the non-root bridge would be set to be the root port and the other would be blocked.
The configuration that I am suggesting in my post should be applied to the non-root switch. Does that make sense?
w.r.t to the third image I have the following questions:
SW2 has a root port and for SW4 the root port is the interface that connects SW2 and Sw4. What if this interface is blocked (made alternate or non designated port) on SW2 ? How does a switch decide to block an interface or keep it in forwarding state ? is there any information on the BPDU frame that decides this in a CST ? while I do get the concept that the designated and alternate ports are chosen I dont understand what happens in situations like this.
Now you’re asking what happens if the port on SW2 becomes blocked, correct? But I’m not sure which port you mean, the one indicated with the red arrow or with the blue arrow? Let’s look at both!
First of all, the port indicated by the red arrow has become a root port. This is because it is directly connected to the root switch, which is SW1. This port will never become blocked as long as SW1 is the root bridge. The only thing that can happen is if this port fails (i.e. the cable is cut or removed) or if it is shut down. If that happens, the whole topology will reconverge, connecting to the root bridge via the 10 Mbit link, and the root ports based on the BPDUs that are being received via SW1–>SW3–>SW4.
Now about the port with the blue arrow, what if that becomes a blocked port? If that is the case, then SW4 will receive the appropriate BPDUs from all neighbor switches, and will determine that the least cost path to the root will be via its link to SW3.