How to Select Root Bridge using Root Primary Command in Cisco Packet Tracer

When configuring the Spanning Tree Protocol to prevent loops in the OSI Layer 2 layer, we also configure which Cisco Switches on the network topology will be Root Bridge.

How to Select Root Bridge using Root Primary Command in Cisco Packet Tracer

How to Configure Bridge Switch with Root Primary

We usually change the Priority command when selecting Cisco Switches on the network as Root Bridge. In our previous article, we looked at the Root Bridge Configuration steps. In this article, we will select RBridge using Root Primary command.

You can configure an Auxiliary Switch to perform this task when the Root Bridge Switch is inaccessible. In general, you can also set the auxiliary RB Switch in the network distribution layer with the Priority value.

Using the Cisco simulator program, we will use the Spanning Tree Vlan Root Primary on small network topology and select the Switch to be the Bridge. With this command, the Priority values ​​of the Switches will be determined automatically.

   Step 1

Now open the Cisco Packet Tracer and create a network topology as in the image below.

Packet Tracer Network Topology

   Step 2

Identify Cisco Switches that will be Root Bridge and Secondary Root Bridge.

Identifying Root and Secondary Bridge Switch

   Step 3

Open the Switch SW1 CLI command prompt and perform the following command in config mode.

SW1>en
SW1#conf t
SW1(config)#
SW1(config)#spanning-tree vlan 1 root primary

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

   Step 4

To verify that the switch is SW1 Root Bridge, use the show spanning-tree command on privileged mode.

SW1#show spanning-tree
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    24577
             Address     00D0.D331.E8B1
             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     00D0.D331.E8B1
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/24           Desg FWD 19        128.24   P2p
Gi0/1            Desg FWD 4         128.25   P2p
Gi0/2            Desg FWD 4         128.26   P2p

SW1#

 
show spanning-tree

As you can see in the spanning-tree output above, the Cisco Switch SW1 is configured as a Root Bridge. We did this easily with the Spanning-Tree Vlan 1 Root Primary without changing the switch’s priority value.

   Step 5

The Cisco Switch Root Secondary command is also very simple to use. To configure the Switch in the Packet Tracer network topology as Root Secondary, open the SW2 CLI command prompt and perform the following command.

SW2>en
SW2#conf t
SW2(config)#spanning-tree vlan 1 root secondary

 
spanning-tree vlan 1 root secondary

   Step 6

At the Cisco Switch SW2 CLI command prompt, run the show spanning-tree command.

SW2#show spanning-tree
VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    24577
             Address     00D0.D331.E8B1
             Cost        4
             Port        25(GigabitEthernet0/1)
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    28673  (priority 28672 sys-id-ext 1)
             Address     00E0.F963.95C8
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/24           Desg FWD 19        128.24   P2p
Fa0/10           Desg FWD 19        128.10   P2p
Gi0/1            Root FWD 4         128.25   P2p
Gi0/2            Desg FWD 4         128.26   P2p

SW2#

 
SW2#show spanning-tree

From the image above, you can see that the Priority value of the Cisco Switch SW2 is set automatically.

   Step 7

When you run the show running-config command on both configured Cisco Switches, you can see that the Priority values ​​of the Switches are automatically changed.

show running-config

Show Commands

SW1#show running-config
Building configuration...

Current configuration : 1109 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW1
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 1 priority 24576
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
end

SW1#

 

SW2#show running-config
Building configuration...

Current configuration : 1109 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname SW2
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 1 priority 28672
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
no ip address
shutdown
!
line con 0
!
line vty 0 4
login
line vty 5 15
login
!
end

SW2#

 

   Video

You can watch the video below to use the STP Primary and Secondary commands and also subscribe to our YouTube channel to support us!

   Final Word


In this article, we have manually set the Switches as Root Bridge on Cisco network simulator software. In more advanced network topologies, you should set the Priority values ​​of the Switches well. Thanks for following us!

   Related Articles


Packet Tracer Port Security
Packet Tracer TFTP
Packet Tracer IOS
Packet Tracer Setup
♦ Root Port, Designated Port, Blocking Port

Add a Comment

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

shares
error: