I'm looking for guidance on how to handle a problem I'm having with spanning-tree.
I have a section of my network with 4 switches that handle traffic from 6 routers. I've attached a diagram.
I'm using PVST, and attempting to to force each vlan to use a particular path through the 4 switches.
For example, VLAN 11 comes in on SWT01 and should go to SWT03. However, it is coming in on SWT01, goes to SWT04, up to SWT02 and then to SWT01.
I tried to add a port cost of 100 on the the etherchannel between SWT01 and SWT04 as well as SWT02 and SWT03. This didn't seem to work.
The most simple STP tuning is generally to set the root bridge. For example, by setting swt03 to be the root bridge for vlan 11, you will achieve the required traffic pattern.
However it is not necessarily convenient to change the root. So you can also use the cost on the different link. The cost influences the way a bridge selects its root port (the port the closest to the root bridge), so you need to know where the root bridge is in order to make minimal configuration changes. In that case, just make sure that the path you want has the lowest path cost. For example, assuming that swt01 is the root for vlan 1, you could lower the cost on the port of swt03 leading to swt01, and lower the cost on the path of the port of swt02 leading to swt03. Lowering the cost is generally what requires the least configuration changes, but increasing the cost is also possible: increase the cost of the alternate interfaces.
At last, if you don't even want to think of the position of the root, you can simply decrease the cost on each side of the links you want to privilege (or conversely, increase the cost on each side of the link that you want to avoid).