I have a basic understanding of Spanning-tree, the port modes, etc.
What I do not understand is the difference between setting up the Port Priority (either by setting it up per switch using "set spantree portpri "or by setting it up per vlan using set spantree "set spantree portvlanpri") or setting up the Port Cost (either by setting it up per switch using "set portcost" or by setting it up per vlan using "set portvlancost").
I was of the understanding that each of these simply tells the switch which port to forward frames out of..
What is the fundamental difference between the two?..( I have read the documentation and still dont understand the difference)
These two values help STP in figure out which port to forward and which to block. Here is the difference,
Port Cost is the value added on incoming BPDU's to find out the Path Cost -the cost to reach the the root switch.
Consider Port 1/1 of Switch 1 connected directly to a Root switch. The BPDU's that Port 1/1 of Switch 1 receives will be having a Path Cost of 0, and the switch will add the Port Cost configured on port 1/1 (say for fast ethernet the default of 19) and will calculate the Path Cost to reach the Root Switch, here the cost via port1/1 will be 19. And remember the switch will mark the port with the lowest Path Cost in the forwarding state and make it the Root Port.
Now what will happen if you have two ports with the same Path Cost to the root switch. (This happens if you connect Port 1/1 and Port 1/2 with the same Port Cost directly to the Root Switch). During such a tie situation, STP uses Port Priority and the port with the lowest priority is elected. And port priority uses both the user configurable value and the port number and hence will be unique and if you leave the default values, the port with the lowest number will become the root port.
In terms of path cost for gigabit and tengig etc.. check this out:
hope it helps