Why is it when I set the port priority for example to 8192 and I then do a show spanning-tree vlan 1 it shows as 8193, does it add the vlan number? so if it was vlan 10 it would be 8202?
if you set the spanning-tree priority( for root bridge election) not port-priority then indeed you have to add the vlan id. this is the extended system-id
Don't forget to rate helpful posts.
That's correct. The final valued is a bridge ID priority added to the system ID extension. The system ID extension is the VLAN number and can vary from 1 to 4094.
**Please grade this post if you find it useful.
In addition to Alain's and Ivan's answers, let me stress that you have to distinguish between the switch (or bridge) priority and the port priority.
The bridge priority is a 2B number that becomes a part of the Bridge ID. The Bridge ID is used when electing a root bridge, and also forms one of the tiebreakers when various STP port roles and states are being determined (remember, the tiebreakers are, in sequence, Root Bridge ID, Root Path Cost, Sending Bridge ID, Sending Port ID).
Because the 802.1Q standard mandates that each switch has to have a unique Bridge ID, and a bridge with multiple VLANs running per-VLAN STP essentially behaves like multiple switches, it has to have a unique Bridge ID for each VLAN. This is very easily accomplished by "stealing" the lowest 12 bits of the bridge priority field and storing the VLAN ID into them. Out of the 2B long bridge priority, only the topmost 4 bits remain to set the bridge priority (in multiples of 4096, as the first available bit corresponds to the 12th power of 2, or 4096). This way, even if the bridge priority and the MAC address remain the same in multiple VLANs, just the mere inclusion of the VLAN ID into the entire Bridge ID makes it unique for each VLAN. This also creates the notion that the VLAN ID is added to the bridge priority. Technically, it is, however, in reality, these fields are kept separate. Only older IOS code still considers the bridge priority to be a 2B long number, and effectively adds the priority and the VLAN ID together.
The port priority is also a 2B number that forms a part of the Port ID. The second part of the Port ID is the port index, i.e. the number of the port internally assigned by the switch. Port priority can be used to influence the root port selection on the neighboring switch. However, this priority should not be confused with the bridge priority.
I was trying to remember all that Peter lol. I've been dealing with ASA's too much recently, your last paragraph I use to know off the top of my head.
Very good post, and good to go over all that again.