I've just had an aha! moment with STP that might help other beginners understand the concept. I've just made my core router a root bridge. I was concerned that CPU cycles would increase but it didn't, so I became curious what is exactly the purpose of a root bridge in a redundant network.
Experts correct me if I am wrong:
1. (R/M) STP is not needed unless you have more than one path from one end of your network to the other.
2. A root bridge has nothing to do with packetflow (packets do not flow back to the root bridge and back out).
3. The aha! moment: A root bridge is like GMT for timezone. For timezones to exist, you need a source timezone (zero-point) or GMT. This is all that a root bridge is. It is coordinate zero used to calculate path-cost along the network. Every switch in the network uses this info to determine shortest (smallest) path-cost from itself to the root-bridge. When a switch has more than 1 path to the upstream switch, STP allows the switch to select one path (port) for upstream traffic and block the other one to prevent packet loops. This redundant link will automatically activate when the primary link is interrupted.
----
For example. I have one switch connected to the root bridge in 2 ways:
(1) 4 switches in between it and the router (root bridge), thus path-cost is 50 (every segment between switches is 10).
(2) I then installed a pair of sxt5ac from it direct to router. By default, the path cost of the wireless link is smaller (less segments in between) so the switch would always choose the wireless link as primary, which is not intended. Once I increased the path cost of the wlan port on the sxt5ac to 100 (I did it on both sxt5ac, not sure if I need to do it on both or only one), then automatically the lan link becomes primary.
I hope that helps and I am not missing anything crucial. Now onwards to researching the more complex MSTP.