I have a conceptual doubt in Spanning Tree Protocol logic.
I have 3 Switches R0, R1 & R2 connected in Triangular fashion. R0-R1-R2-R0 as shown in diagram attached. R0 is Root Bridge being the Lowest Bridge ID
I am seeing that R2 Port connected to R1 port is blocked as a normal behavior of STP. I assume STP chosen R1 ports as Designated Port because it has Lowest Bridge ID (Since both R1 & R2 has equal cost path to R0).
I am trying to change the Blocked port in R2 so that it will become FWD port and R1 port will become BLK port. So, I entered command âspanning -tree cost 5â in R1.
But I am not seeing this cost get reflected in any of the switches. I even tried to change the Spanning tree cost of R0's Fa0/0 and Fa0/1 Port to 100 for testing. It is also not getting advertised to R1 & R2.
I am confused with my understanding. Can anyone please help me, what does this command âspanning -tree cost â does and how to make R2 switch's all the ports to become FWD state.
Thanks in advance for helping me
Hello Peter, Sairam
Designated port id is 128.2, designated path cost 19
are taken from the BPDU of the port that has winned the DP election on the lan segment.
Sairam, if you swap the ports you should be able to see port-id changing and following the port-id of DP port on segment.
Sometimes it is better to have asymmetrical connections to see what happens.
As a result of the fact that these values are those of the lowest best BPDU on segment they can reflect or not the current root path cost of the local node.
For a lan segment where local switch port is the DP
designated path cost = local switch root path cost
for a port in forwarding state but not DP on the segment that is the root port for non root bridge devices the designated cost is that received from the upstream switch DP port.
Note: looking at bridge-id can help
Also to help understand the output we can look at the bridge-id information
for example in Sairam's lab:
R2 bridge id is:
Bridge ID Priority 32768
>>> Address cc02.0ec0.0000
if we look at the lines
Designated bridge has priority 32768, address cc02.0ec0.0000
for port fas0/0 this tells us that R2 fas0/0 has winned the DP election on this segment as a result of this designated cost is = root path cost of R2 that is 38.
on fas0/1 we see:
Designated bridge has priority 32768, address cc01.0ec0.0000
this bridge-id is different from local switch bridge-id and this tells us that the other switch port has winned the DP election on this other segment.
As a result of this designated path cost is lower then root path cost of R2 switch
and is 19.
Hope to help
I must admit that the output of "show spanning-tree" is confusing at best.
What confuses you is probably the line "Designate port id is XXX.X, designated path cost C". Well, you have to interpret it depending on the state of the port:
1.) If the port is a root port, then the designated path cost shows you the value of the BPDU Root Path Cost as received on that port before adding the port's own cost.
2.) Otherwise (the port is forwarding or blocking), the designated path cost shows you your own distance from the root which is inserted in the BPDUs sent out on that port (if they are sent out, of course).
In essence, the "designated path cost" line always shows you the raw value of the BPDU field "root path cost" - on root port, you see the value from the received BPDU, on all other ports, you see the value in transmitted BPDUs.
Note the sequence of the ports and distances in your last topology where the Fa0/1 on R0 is shutdown:
R0 f0/0 (0) ---> f0/0 (0) R1 f0/1 (19) ---> f0/1 (19) R2 f0/0 (38)
The numbers in parentheses show you the value of the "designated path cost" as described in the "show span" output for the respective port. Note that the value always corresponds to the raw "Root Path Cost" BPDU value that is either received or sent on that port.
Perhaps this helps a bit.