How to Use Root Primary Command in Spanning Tree in GNS3? – When choosing the Root Bridge Switch when we configure the Spanning Tree Protocol on Cisco Switches, we usually use the spanning-tree vlan (vlan number) priority (value) command.
How to Use Root Primary Command in Spanning Tree in GNS3?

How to Use Root Primary Command in Spanning Tree in GNS3?

Spanning Tree Protocol (802.1D) was developed to prevent the loops of Layer 2 Cisco Switches operating on OSI Layer 2. We can manually select the Root Bridge on Cisco Switches enabled the standard STP protocol or Rapid Spanning Tree Protocol.

When selecting the Manual Root Bridge Switch, we can use two methods. The first method is to change the Priority value of the Switch. The second method is to use the Root Primary command.

When the Root Bridge is selected on the Cisco Switches using the Root Primary command, the Priority values of the Switches are automatically set.

Our Recommendation

You can purchase “CCNP Switching” from Amazon.

How to Use Root Primary Command?

Using the GNS3 program, configure Cisco Layer 2 Switches on a small network topology with Root Primary and Root Secondary commands.

   Step 1

Open the GNS3 program and create a new project as shown below. Add Layer 2 Switches to the GNS3 workspace.

How to Use Root Primary Command in Spanning Tree in GNS3?

   Step 2

Specify the Cisco Switch to be selected Root Bridge, and then define the Switch as the Secondary Root Bridge closest to the Root Bridge. Run all Layer 2 Switches in the GNS3 workspace and open the CLI command prompt windows.

How to Use Root Primary Command in Spanning Tree in GNS3?

   Step 3

When Cisco Switches first add to the network, the Priority value is 32769. Therefore you can change the Priority values manually or automatically. To select the Root Bridge with the Root Primary command on the Cisco switches you have specified in GNS3, use the following command at the CLI prompt of the L2-SW-1 Switch in the network topology, and then examine the show spanning-tree output.

L2-SW-1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
L2-SW-1(config)#spanning-tree vlan 1 root primary
L2-SW-1(config)#exit
L2-SW-1#

L2-SW-1#show spanning-tree 

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    24577
             Address     00b4.349f.fe00
             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     00b4.349f.fe00
             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 LIS 4         128.2    Shr 
Gi0/2               Desg FWD 4         128.3    Shr 
Gi0/3               Desg FWD 4         128.4    Shr 


L2-SW-1#

 
How to Use Root Primary Command in Spanning Tree in GNS3?

Once you have selected the Root Bridge with the Root Primary command, you can see that the Priority value of the L2-SW-1 Switch has been set.

   Step 4

To select the second Root Bridge on the Cisco Switch L2-SW-2, execute the following command and check the Priority value with the show spanning-tree command.

L2-SW-2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
L2-SW-2(config)#spanning-tree vlan 1 root secondary
L2-SW-2(config)#exit
L2-SW-2#


L2-SW-2#show spanning-tree

VLAN0001
  Spanning tree enabled protocol ieee
  Root ID    Priority    24577
             Address     00b4.349f.fe00
             Cost        4
             Port        1 (GigabitEthernet0/0)
             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    28673  (priority 28672 sys-id-ext 1)
             Address     00b4.3451.da00
             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               Root FWD 4         128.1    Shr 
Gi0/2               Desg FWD 4         128.3    Shr 
Gi0/3               Desg FWD 4         128.4    Shr 


L2-SW-2#

 
How to Use Root Primary Command in Spanning Tree in GNS3?

We configured the Cisco Switch L2-SW-2 as a Secondary Root Bridge. If you remove the L2-SW-1 Switch over the network, the L2-SW-2 Switch will be the Root Bridge.

   Step 5

You can see the Priority values change automatically at the output of the Cisco Switch L2-SW-1 and L2-SW-2 show running-config commands.

How to Use Root Primary Command in Spanning Tree in GNS3?

Show Commands Related to How to Use Root Primary Command in Spanning Tree in GNS3

L2-SW-1#show spanning-treeL2-SW-2#show running-configL2-SW-3#show spanning-treeL2-SW-4#show spanning-tree
L2-SW-1#show running-config
Building configuration…

Current configuration : 4770 bytes
!
! Last configuration change at 07:49:43 UTC Mon Sep 25 2017
!
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname L2-SW-1
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 1 priority 24576
!
vlan internal allocation policy ascending
!
!
!
interface GigabitEthernet0/0
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
!
!
line con 0
line aux 0
line vty 0 4
!
!
end

L2-SW-1#

L2-SW-2#show running-config
Building configuration…

Current configuration : 4770 bytes
!
! Last configuration change at 07:50:32 UTC Mon Sep 25 2017
!
version 15.0
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname L2-SW-2
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
!
!
!
ip cef
no ipv6 cef
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
spanning-tree vlan 1 priority 28672
!
vlan internal allocation policy ascending
!
!
!
interface GigabitEthernet0/0
media-type rj45
negotiation auto
!
interface GigabitEthernet0/1
media-type rj45
negotiation auto
!
interface GigabitEthernet0/2
media-type rj45
negotiation auto
!
interface GigabitEthernet0/3
media-type rj45
negotiation auto
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
!
!
line con 0
line aux 0
line vty 0 4
!
!
end

L2-SW-2#

L2-SW-3#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 00b4.349f.fe00
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 00b4.3453.4900
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 Desg FWD 4 128.2 Shr
Gi0/2 Root FWD 4 128.3 Shr
Gi0/3 Altn BLK 4 128.4 Shr

L2-SW-3#

L2-SW-4#show spanning-tree

VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 24577
Address 00b4.349f.fe00
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 00b4.3497.7d00
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

L2-SW-4#

How to Configure Root Primary and Root Secondary in GNS3? ⇒ Video

In the GNS3 program, you can watch the video below for configuring Root Bridge using the Root Primary and Root Secondary commands on Layer 2 Switches. You can also subscribe to our YouTube channel to support us …

  Final Word

How to Use Root Primary Command in Spanning Tree in GNS3? – In this article, we used Root Primary and Root Secondary commands manually to select Root Bridge and Secondary Bridge using the GNS3 program.

If this article is helpful, send me feedback by commenting! Thanks in advance, take care of yourself!

Also, you can add to browser bookmarks by pressing the CTRL+D to read this article later!

Articles Related to How to Use Root Primary Command in Spanning Tree in GNS3

Products Related to How to Use Root Primary Command in Spanning Tree in GNS3
Related Products

Leave a Reply

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

18 − eighteen =