Examining Spanning Tree Protocol in GNS3 – We have examined the Spanning Tree Protocol in detail in our previous article. The STP protocol is used to prevent loops that occur in the OSI Layer 2 layer.
Examining Spanning Tree Protocol in GNS3

Examining Spanning Tree Protocol in GNS3

In this article, we will examine the operation of the Spanning Tree Protocol on Layer 2 Switches using the GNS3 network simulator program. As we mentioned earlier, the STP protocol on redundancy networks blocks some ports and prevent the network conflicts or loops.

In this article, we will look at what ports will be chosen as Designated, Root and Blocked Port with STP on GNS3.

   Step 1

To examine the Spanning Tree Protocol, open the GNS3 program and create a new project.

Examining Spanning Tree Protocol in GNS3

   Step 2

Add three Layer 2 Switches to the GNS3 workspace. Also, you can provide the process to add Layer 2 Switch to GNS3 program on our YouTube channel.

Examining Spanning Tree Protocol in GNS3

   Step 3

After adding three Layer 2 Switches, run all the Switches and open the command prompt for all of them. In the following topology, in all Switches, GigabitEthernet interfaces are used. Therefore, STP GigabitEthernet Cost is 4.

To select the Root Bridge, we first determine the Switch with the lowest MAC address. If was not manually change the Root Bridge value, we will take these values.

To find the MAC address of Cisco Switch SW1, use the show spanning-tree command at the SW1 CLI command prompt.

Examining Spanning Tree Protocol in GNS3

   Step 4

As you can see in the image below, SW1’s MAC Address is 00ff.9ee9.8a00. By adding clarification to the workspace, you can better understand how it works. Now, let’s learn the SW2 and SW3 MAC addresses.

Examining Spanning Tree Protocol in GNS3

   Step 5

If we run the show spanning-tree command at the Cisco Switch SW2 command prompt, we can see the MAC address of SW2.

Examining Spanning Tree Protocol in GNS3

   Step 6

The MAC address of the SW3 is 00ff.9e54.7700 as you can see below. Now let’s examine the Priority values of all Switches and then compare these values.

Examining Spanning Tree Protocol in GNS3

   Step 7

You can also use the show spanning-tree command to find Cisco Switch Priority values. The default Priority value is 32769 for all Cisco Switches.

As you see SW1’s Priority value is 32769.

Examining Spanning Tree Protocol in GNS3

   Step 8

The SW2 Priority value is also 32769 because the Switch Priority values are not manually changed.

Examining Spanning Tree Protocol in GNS3

   Step 9

From the above steps, we learned the MAC addresses and Priority values of Cisco Switches. All Switches will have the same MAC address as the Switch Root Bridge because their Priority values are equal.

Therefore, SW2 is a Root Bridge. Now let’s examine the ports selected by the Spanning Tree Protocol.

On the output of the show spanning-tree protocol on SW2, you can see that Gig0/0 and Gig0/1 interfaces are selected as Designated Port. Root Bridge Switch interfaces are always set to Designated. Because the Root Bridge will send BPDU packets to other Switches at regular intervals.

Examining Spanning Tree Protocol in GNS3

   Step 10

According to the SW2 Root Bridge, SW1 and SW3 interfaces to SW2 will be set to Root Port because all Cost values are equal. If SW2 and SW3 were connected via FastEthernet, the SW3 GigabitEthernet 0/1 interface would be set to Blocked. Because FastEthernet Cost is 19.

You can see that these ports are set as Root Port on the show spanning-tree output of SW1 and SW3.

Examining Spanning Tree Protocol in GNS3

   Step 11

One of the remaining interfaces must be set to Blocked. Because there will be a loop in the network environment. The SW2 GigabitEthernet 0/1 interface will be set to Blocked because the main purpose of Spanning Tree Protocol is to prevent the Loops.

When interfaces between SW2 and SW3 evaluate, the smallest MAC address handles. As a result, SW3 set to Designated Port because its MAC address is smaller.

Examining Spanning Tree Protocol in GNS3

   Step 12

After examining Spanning Tree Protocol in GNS3, you can analyze packets using the WireShark program in GNS3. Click the right button/start capture on the link to review the submitted packets between SW1 and SW2.

Examining Spanning Tree Protocol in GNS3

   Step 13

Click the OK button in the Packet Capture window.

Examining Spanning Tree Protocol in GNS3

   Step 14

Opening the WireShark program will lead to insufficient packet analysis. As you can see in the image below, the STP protocol works effectively between Layer 2 Switches.

Examining Spanning Tree Protocol in GNS3

Show Commands Related to Examining Spanning Tree Protocol in GNS3

SW1#show spanning-tree summarySW1#show spanning-tree detailSW1#show spanning-tree rootSW1#show spanning-tree interface gigabitEthernet 0/0
SW1#show spanning-tree summary
Switch is in pvst mode
Root bridge for: none
Extended system ID is enabled
Portfast Default is disabled
PortFast BPDU Guard Default is disabled
Portfast BPDU Filter Default is disabled
Loopguard Default is disabled
EtherChannel misconfig guard is enabled
Configured Pathcost method used is short
UplinkFast is disabled
BackboneFast is disabled

Name Blocking Listening Learning Forwarding STP Active
———————- ——– ——— ——– ———- ———-
VLAN0001 1 0 0 3 4
———————- ——– ——— ——– ———- ———-
1 vlan 1 0 0 3 4
SW1#

SW1#show spanning-tree detail

VLAN0001 is executing the ieee compatible Spanning Tree protocol
Bridge Identifier has priority 32768, sysid 1, address 00ff.9ee9.8a00
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32769, address 00ff.9e19.6600
Root port is 1 (GigabitEthernet0/0), cost of root path is 4
Topology change flag not set, detected flag not set
Number of topology changes 1 last change occurred 00:14:22 ago
from GigabitEthernet0/3
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 root forwarding
Port path cost 4, Port priority 128, Port Identifier 128.1.
Designated root has priority 32769, address 00ff.9e19.6600
Designated bridge has priority 32769, address 00ff.9e19.6600
Designated port id is 128.1, designated path cost 0
Timers: message age 2, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is shared by default
BPDU: sent 2, received 446

Port 2 (GigabitEthernet0/1) of VLAN0001 is alternate blocking
Port path cost 4, Port priority 128, Port Identifier 128.2.
Designated root has priority 32769, address 00ff.9e19.6600
Designated bridge has priority 32769, address 00ff.9e54.7700
Designated port id is 128.1, designated path cost 4
Timers: message age 3, forward delay 0, hold 0
Number of transitions to forwarding state: 0
Link type is shared by default
BPDU: sent 1, received 449

Port 3 (GigabitEthernet0/2) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.3.
Designated root has priority 32769, address 00ff.9e19.6600
Designated bridge has priority 32769, address 00ff.9ee9.8a00
Designated port id is 128.3, designated path cost 4
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is shared by default
BPDU: sent 446, received 0

Port 4 (GigabitEthernet0/3) of VLAN0001 is designated forwarding
Port path cost 4, Port priority 128, Port Identifier 128.4.
Designated root has priority 32769, address 00ff.9e19.6600
Designated bridge has priority 32769, address 00ff.9ee9.8a00
Designated port id is 128.4, designated path cost 4
Timers: message age 0, forward delay 0, hold 0
Number of transitions to forwarding state: 1
Link type is shared by default
BPDU: sent 446, received 0

SW1#show spanning-tree root

Root Hello Max Fwd
Vlan Root ID Cost Time Age Dly Root Port
—————- ——————– ——— —– — — ————
VLAN0001 32769 00ff.9e19.6600 4 2 20 15 Gi0/0
SW1#

SW1#show spanning-tree interface gigabitEthernet 0/0

Vlan Role Sts Cost Prio.Nbr Type
——————- —- — ——— ——– ——————————–
VLAN0001 Root FWD 4 128.1 Shr
SW1#

Examining Spanning Tree Protocol in GNS3 ⇒ Video

You can watch the video below for examining Spanning Tree Protocol in GNS3 and you can support us by subscribing to our YouTube channel…

  Final Word

Examining Spanning Tree Protocol in GNS3 – In this article, we used the GNS3 program to examine Spanning Tree Protocol on Layer 2 Switches. In our next tutorial, we will examine the STP protocol in more detail.

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 Examining Spanning Tree Protocol in GNS3

Products Related to Examining Spanning Tree Protocol in GNS3
Related Products

Leave a Reply

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

four × four =