Take the 2-minute tour ×
Network Engineering Stack Exchange is a question and answer site for network engineers. It's 100% free, no registration required.

This question is a repost of the same question in The Cisco Learning Network; however, the answers are unique to Stack Exchange.


I have always accepted that the defualt priority value of STP (802.1d) is 32768 (32768 + sys-id-ext x) as show in "show spanning-tree" below -

SW3#show spanning-tree 
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    24577
             Address     00D0.D3E6.9838
             Cost        19
             Port        1(FastEthernet0/1)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     00D0.BCB5.B556
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/8            Desg FWD 19        128.8    P2p
Fa0/1            Root FWD 19        128.1    P2p
Fa0/24           Altn BLK 19        128.24   P2p

SW3#

Now, when I want to configure priority I don't undertand WHY the priority must be in increments of 4096 ? Is there a specific reason for the default value of both of these numbers?

SW3(config)#spanning-tree vlan 1 priority ?
  <0-61440>  bridge priority in increments of 4096
SW3(config)#spanning-tree vlan 1 priority

Thanks in advance.

share|improve this question

3 Answers 3

up vote 9 down vote accepted

In the spanning tree algorithm the process of determining the root bridge is based on the bridge priority (BID).

When there were no VLANs (meaning that switches had to deal with only one broadcast domain) the BID was equal to:

Bridge priority - MAC Address
   <2 bytes>       <6 bytes>

As Network administrators we can modify the bridge priority value.

When VLANs were introduced the needing of differentiating the STP protocol raised (Per VLAN Spanning Tree - PVST).

To accomplish this the bridge priority value was modified as follows:

Bridge priority - Exstended system ID (VLAN ID)
     4 bit      -           12 bit

We are still able to modify the bridge priority but this means to operate to the 4th most significative bit over 16 bits.

To put it simple:

Legend : C= changeable ; U= unchangeable

CCCCUUUUUUUUUUUU 16 bits

0001UUUUUUUUUUUU 1*2^12 = 4096

0111UUUUUUUUUUUU Default: 32768

0111000000000001 Default for VLAN 1: 32769

share|improve this answer
    
Bonus points for bit map. –  generalnetworkerror Apr 30 at 16:34

The bridge ID is an 8-Byte (64 bit) value composed of the following elements:

  • The bridge priority value and the system ID extension together make up a 16 bit (2-byte) value. The bridge priority value, making up the left most bits, is a value of 0 to 61440. The extended system ID is a value of 1 to 4095 corresponding to the respective VLAN participating in STP. The bridge priority value increments in blocks of 4096 to allow the system ID extension to squeeze in between each increment. By default, Cisco’s Per-VLAN Spanning-Tree plus (PVST+) adds this system ID extension (sys-id-ext) to the bridge priority.

bridge priority and sys-id-ext

  • The 48 bit (6-byte) MAC address of a switch is used in conjunction with the bridge priority value and the system ID extension as criteria for the root bridge election. If the bridge priority value and the system ID extension are identical on two or more switches, the lowest 48-bit MAC address is then used as a tie breaker. These values together make up the cohesive Bridge Identifier used to elect the root bridge. The following Wireshark packet capture of a BPDU illustrates these values. The bridge priority and system ID extension are the 16-bit hexadecimal value 80 01 (to the left of the MAC address) below representing the bridge priority value of 32768 and a system ID extension of 1 (VLAN 1).

enter image description here

This and the basics of the STP root election process can be found on my blog.

share|improve this answer
    
in the bottom of packet tracer what that 80 01 & N –  Trojan Apr 4 at 5:46
    
System id exstension mentioned about what thing? –  Trojan Apr 4 at 6:03
1  
80 01 is the 16bit (2byte) hexadecimal value for the decimal value of 32769. The bridge priority (32768) tacked on to the system ID extension of 1 (VLAN 1) equates to the bridge identifier of 32769. The N is the packet's ASCII. –  one.time Apr 4 at 16:13

This article provides some good information regarding this. Basically this is due the extended vLAN headers length; 12 bits allowing support for 4096 vLANS and only 4 bits for the priority.

The 12 bits of extra VLAN information allows support for 4096 VLANs, so there is full support for extended range VLANs. Therefore because of the use of the Extended System ID in the Bridge ID, there is only the first 4 bits of the original 2 byte number to be used for the bridge priority so it only allows multiplies of 4096.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.