cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3417
Views
10
Helpful
7
Replies

Spanning tree port priority value

Andy White
Level 3
Level 3

Hello,

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?

Thanks

7 Replies 7

cadet alain
VIP Alumni
VIP Alumni

Hi,

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

feature.

Regards.

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

Ivan Shirshin
Cisco Employee
Cisco Employee

Hi Andy,

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.

Kind Regards,
Ivan Shirshin

**Please grade this post if you find it useful.

Kind Regards,
Ivan

Peter Paluch
Cisco Employee
Cisco Employee

Andy,

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.

Best regards,

Peter

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.

John,

Thank you very much!

Best regards,

Peter

Thanks so much for this guys, I think I need to digest Peters reply a bit (I'm only a CCENT).  Can I ask what 2B means?

Thanks

Hi Andy,

Oh, I see. 2B means "2 bytes", i.e. 16 bits.

Best regards,

Peter

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card