What is the bridge priority of switch?

The Cisco Meraki MS series switch is compatible with industry standard STP (IEEE 802.1D) and RSTP (IEEE 802.1w). RSTP is used by default. Information on how to configure RSTP on a Cisco Meraki Switch can be found in the Configuring Spanning Tree on Meraki Switches (MS) article.

Confirming the correct root bridge election in a switched network is important for increasing the stability of a switched network.  The root bridge is a central hub that can interconnects other legs of the network and can be exposed to heavy switching traffic. If  the elected root bridge doesn't have the sufficient resources to handle the task,network performance may be affected.  The root bridge is selected by manually configuring its bridge priority to a low value. 32768 is the default value out of a range from 0 to 61440.  If all switches in a single spanning tree have the same bridge priority, the switch with the lowest MAC address will become the root bridge.

The diagram below is an illustration of a scenario in which the elected root bridge might not be the optimal choice:

What is the bridge priority of switch?

In this diagram, Switches D and B comprise the core of the network, Switch A and C are access layer switches. Assuming all switches with their default bridge priority, because switch A has the lowest MAC address, it will be elected as a root bridge in this network . If the link between switch D and B is 1 gigabit and links between A and D as well as A and D are 100 Mbps,  the Gigabit Ethernet link that connects switch D and swith B will be blocked, as a result  of the election of Switch A as a root. This block causes all the data to flow via a 100-Mbps link across the access layer resulting in a non optimal layer 2 network.

To avoid the scenario above, it is important to determine what device in the switch fabric is acting as the Spanning-tree root bridge. In order to identify which MS switch is the Root Bridge, navigate to Switch > Monitor > Switches and select the desired switch. In the switch status area, take note of the field called RSTP Root as it will identify which switch is the Root Bridge.

What is the bridge priority of switch?

Information on which switch is elected as the root bridge is accessible on the dashboard.  Best practice dictates the root bridge to be the core of the network, this can be accomplished by manually setting the priority of the switch selected to be the root bridge. Information on enabling RSTP and setting the STP root bridge on a Cisco Meraki MS switch can be found in our Configuring Spanning Tree on Meraki Switches article.

bridge-priority priority;

[edit logical-systems logical-system-name protocols (mstp | rstp)], [edit logical-systems logical-system-name protocols mstp msti msti-id], [edit logical-systems logical-system-name protocols vstp vlan vlan-id], [edit logical-systems logical-system-name routing-instances routing-instance-name protocols (mstp | rstp)], [edit logical-systems logical-system-name routing-instances routing-instance-name protocols mstp msti msti-id], [edit logical-systems logical-system-name routing-instances routing-instance-name protocols vstp vlan vlan-id], [edit routing-instances routing-instance-name protocols (mstp | rstp)], [edit routing-instances routing-instance-name protocols mstp msti msti-id], [edit routing-instances routing-instance-name protocols vstp vlan vlan-id] [edit protocols mstp], [edit protocols mstp msti msti-id], [edit protocols rstp], [edit protocols stp], [edit protocols vstp vlan vlan-id]

Configures the bridge priority, which determines which bridge is elected as the root bridge. If two bridges have the same path cost to the root bridge, the bridge priority determines which bridge becomes the designated bridge for a LAN segment.

priority—The bridge priority can be set only in increments of 4096.

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.

Statement introduced in Junos OS Release 8.4.

Statement updated in Junos OS Release 9.4 for EX Series switches to add VSTP support.

Support for logical systems added in Junos OS Release 9.6.

Spanning Tree Protocol is a Layer 2 loop prevention mechanism that will block one port on the network switch if it detects a loop of broadcast messages within its architecture. By default, spanning trees are enabled on most interconnected Cisco switches. Switches send out Bridge Protocol Data Unit (BPDU) on all active interfaces. BPDU contains STP information needed to elect a root switch and detect loops.

STP Root Bridge Election

The switch assigns a root bridge within the interconnected switches. A root bridge is the central point of all switches and will be responsible for forwarding the traffic. The switch selects a root bridge by using the switch priority and the MAC address. Each switch has its own bridge ID and has a default priority value of 32768. The root bridge is taking precedence over the MAC address. If a switch has the lowest bridge priority value among the switches within the LAN, then it will be elected as the spanning tree root bridge.

If all the spanning tree bridge priority has the same priority value on all the switches, then the MAC address will be the tiebreaker. The lowest MAC address will be elected as the Root Bridge. Most of the older switches have a lower value of MAC address and have lower bandwidth and limited CPU/memory as compared to newer switches. Electing an older switch as the root bridge will cause a suboptimal operation on your network.

Spanning Tree Priority Root Bridge Optimization

We should avoid electing a root bridge using the MAC address, which can cause a suboptimal network performance as it will choose the oldest switch with the lowest MAC address in the network. The example spanning tree topology below shows the LAN switches that elect Switch6 as the Root Bridge by using the MAC address election. Let’s assume that Switch6 is the oldest switch in the group. All traffic will go and process first on Switch6 before it goes to the destined switch. That will create a poor performance of the network.

What is the bridge priority of switch?

To prevent having a suboptimal network, we need to manually choose a root bridge within the network. By doing that, we need to manually configure a value of the root bridge or manually assign it as a root bridge by using the ‘root primary’ command. This will set the bridge priority to 24576, which is lower than the default priority.

What if the primary root bridge fails? To optimize further, we need to assign the other core switch as the secondary root bridge in case the primary root bridge is not operational. To do that, we enter the ‘root secondary’ command. This will set the bridge priority to 28672, which is lower than the default priority but higher than the root primary. When the primary switch fails, the switches will elect a new root bridge. It will then failover to the secondary switch, and it will be elected as the new root bridge.

STP Root Primary and Root Secondary Configuration

Based on the diagram above, we need to manually configure the core switch as the root bridge as they have higher bandwidth and better features in general as compared to the other switches on the group. The below configuration shows how we configure the core switch, Switch0, as the root bridge.

Switch0(config)#spanning-tree vlan 1 root primary

To verify, we can use the ‘show spanning-tree’ command.

Switch0#show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 0001.9725.3338 This bridge is the root Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 24577 (priority 24576 sys-id-ext 1) Address 000.19725.3338 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Below is the configuration to assign Switch1 as the secondary root.

Switch1(config)#spanning-tree vlan 1 root secondary

Again, we can use the ‘show spanning-tree’ command to verify our configuration.

Switch1#show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 24577 Address 0001.9725.3338 Cost 19 Port 1 (FastEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 28673 (priority 28672 sys-id-ext 1) Address 0040.0B2C.E63A Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 20

NOTE
The spanning tree port priority value can also be changed to improve the effectiveness of STP.

Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training:

What is the bridge priority of switch?