How to Set Root Bridge on Cisco Switch in GNS3

In Cisco Switches, RBridges automatically select by the Spanning Tree Protocol. When selecting Root Bridge, the smallest MAC address, Priority values, and Cost values ​​consider.

How to Set Root Bridge on Cisco Switch in GNS3

How to Configure a Layer 2 Switch on the Network as a Root Bridge

On topology we designed, we can configure the Switch as Root Bridge manually. We can easily do this by changing the Priority values ​​of the switches. Priority values ​​increase from 0 to 4096 and multiples.

In our previous article, we explained how to select a Switch as RBridge in our article called Understanding STP. In addition, we discussed the port states of the switches (Root, Designated, Blocked).

In this article, we will examine how to select a Switch as Root Bridge on the network.

How to Setup Root Bridge

Selecting RBridge manually is very simple. To do this, the Priority value is determined for the existing VLAN at the Switch CLI prompt, and then the selection of RBridge is completed with the BPDU packets sent between the Switches.

Follow the steps below to configure Root Bridge.

   Step 1

Open the Simulator and create a new project for Root Bridge.

Creating a New Project in GNS3

   Step 2

In GNS3, create a network topology as shown in the image below. Add Layer 2 Switches to the workspace and wire all Switches.

Creating a GNS3 Network Topology

   Step 3

So far, no action has taken on Layer 2 Switches. Find and note the MAC addresses and Priority values ​​of all Switches as in the following image.

You can find the MAC address and Priority values ​​of Cisco Switches with the show spanning-tree command.

After performing the show spanning-tree command at the L2-SW-2 CLI command prompt, you can see that L2-SW-2 is RBridge by examining the following output.

show spanning-tree

   Step 4

In this article, we need to specify the Switch to be configured on the network, as we will manually make the selection. To configure L2-SW-1 as RBridge according to this topology, change the Priority value of the Switch using the command below at the CLI prompt.

SW1# conf t
SW1(config)# spanning-tree vlan 1 priority 4096

 
spanning-tree vlan 1 priority 4096

   Step 5

After changing the priority value on the L2-SW-2 Switch, the Switches on the network will communicate with the BPDU packets and the L2-SW-1 become the Root Bridge.

After applying the show spanning-tree command on the Switch, you can see that the Switch is the Root Bridge. The port status of the Switches on the network will also change.

This Bridge is the Root

   Step 6

After configuring RBridge, since the port status of the Switches has changed, the new status of the ports will be as follows.

Cisco Switch Port States

   Step 7

You can check the L2-SW-2 port status from the following image.

Reviewing Switch Interfaces

   Step 8

Likewise, you can check the L2-SW-3 port states from the following image.

Switch Blocked Port

   Step 9

Finally, check that Switch L2-SW-1 is RBridge and that the GigabitEthernet0/0 and GigabitEthernet0/1 interfaces configured as Designated Port.

Designated Port

Show Commands

SW1#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 0062.dee0.5a00
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
Address 0062.dee0.5a00
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/0 Desg FWD 4 128.1 Shr
Gi0/1 Desg FWD 4 128.2 Shr
Gi0/2 Desg FWD 4 128.3 Shr
Gi0/3 Desg FWD 4 128.4 Shr

SW1#

 


SW2#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 0062.dee0.5a00
Cost 4
Port 1 (GigabitEthernet0/0)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0062.de7b.5600
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/0 Root FWD 4 128.1 Shr
Gi0/1 Desg FWD 4 128.2 Shr
Gi0/2 Desg FWD 4 128.3 Shr
Gi0/3 Desg FWD 4 128.4 Shr

SW2#

 


SW3#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 4097
Address 0062.dee0.5a00
Cost 4
Port 3 (GigabitEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0062.deb5.a800
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300 sec

Interface Role Sts Cost Prio.Nbr Type
------------------- ---- --- --------- -------- --------------------------------
Gi0/0 Desg FWD 4 128.1 Shr
Gi0/1 Altn BLK 4 128.2 Shr
Gi0/2 Root FWD 4 128.3 Shr
Gi0/3 Desg FWD 4 128.4 Shr

SW3#

 


SW1#show spanning-tree detail

VLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 4096, sysid 1, address 0062.dee0.5a00
Configured hello time 2, max age 20, forward delay 15
We are the root of the spanning tree
Topology change flag not set, detected flag not set
Number of topology changes 2 last change occurred 00:03:16 ago
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0, aging 300

Port 1 (GigabitEthernet0/0) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.1.
Designated root has priority 4097, address 0062.dee0.5a00
Designated bridge has priority 4097, address 0062.dee0.5a00
Designated port id is 128.1, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is shared by default
BPDU: sent 99, received 81

Port 2 (GigabitEthernet0/1) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.2.
Designated root has priority 4097, address 0062.dee0.5a00
Designated bridge has priority 4097, address 0062.dee0.5a00
Designated port id is 128.2, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is shared by default
BPDU: sent 179, received 0

Port 3 (GigabitEthernet0/2) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.3.
Designated root has priority 4097, address 0062.dee0.5a00
Designated bridge has priority 4097, address 0062.dee0.5a00
Designated port id is 128.3, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is shared by default
BPDU: sent 100, received 83

Port 4 (GigabitEthernet0/3) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.4.
Designated root has priority 4097, address 0062.dee0.5a00
Designated bridge has priority 4097, address 0062.dee0.5a00
Designated port id is 128.4, designated path cost 0
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is shared by default
BPDU: sent 179, received 0

SW1#

 


SW1#show spanning-tree bridge

Hello Max Fwd
Vlan Bridge ID Time Age Dly Protocol
---------------- --------------------------------- ----- --- --- --------
VLAN0001 4097 ( 4096, 1) 0062.dee0.5a00 2 20 15 ieee
SW1#

 


SW1#show spanning-tree ?
WORD bridge group list, example 1,3-5,7,9
active Report on active interfaces only
backbonefast Show spanning tree backbonefast status
blockedports Show blocked ports
bridge Status and configuration of this bridge
detail Detailed information
inconsistentports Show inconsistent ports
interface Spanning Tree interface status and configuration
mst Multiple spanning trees
pathcost Show Spanning pathcost options
root Status and configuration of the RB
summary Summary of port states
uplinkfast Show spanning tree uplinkfast status
vlan VLAN Switch Spanning Trees
| Output modifiers

SW1#

 

How to Elect RootBridge ⇒ Video

You can watch the video below for more information on how to choose Root Bridge and also subscribe to our YouTube channel to support us!

   Final Word


In this article, we have configured a Switch on a small topology as RootBridge by manually changing the Priority value. Thanks for following us!

   Related Articles


How to Configure Static Routing
How to Configure RIP
How to Configure RIP Version 2
How to Configure EIGRP
How to Configure OSPF

Add a Comment

Your email address will not be published. Required fields are marked *

shares
error: